/* ==========================================================================
   Saint Michael Web Services Limited — Core stylesheet
   Palette: deep navy + white, electric blue accent
   ========================================================================== */

:root {
  --navy-900: #06122a;
  --navy-800: #0b1d3a;
  --navy-700: #112a52;
  --navy-600: #17376b;
  --blue-500: #2b7fff;
  --blue-400: #4da3ff;
  --blue-300: #8ec5ff;
  --white: #ffffff;
  --off-white: #f5f8fd;
  --grey-100: #e6edf7;
  --grey-400: #97a6bd;
  --grey-600: #5d6b83;
  --ink: #0d1626;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 18px rgba(6, 18, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(6, 18, 42, 0.14);
  --shadow-glow: 0 18px 45px rgba(43, 127, 255, 0.32);
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.center { text-align: center; margin-top: 46px; }
.lead { color: var(--grey-600); font-size: 1.06rem; max-width: 62ch; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--blue-500);
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(100deg, var(--blue-400), #a9d2ff 55%, var(--white));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
              background-color 0.28s var(--ease), color 0.28s var(--ease),
              border-color 0.28s var(--ease);
}
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-primary { background: var(--blue-500); color: var(--white); box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: #1a6ef0; transform: translateY(-3px); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--white); border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--grey-100); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-500); transform: translateY(-3px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color 0.35s var(--ease), padding 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.scrolled {
  background: rgba(6, 18, 42, 0.92);
  backdrop-filter: blur(14px);
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(6, 18, 42, 0.35);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--blue-500), var(--navy-700));
  color: var(--white); font-weight: 800; font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.brand-text { display: flex; flex-direction: column; font-weight: 700; color: var(--white); line-height: 1.15; }
.brand-text small { font-weight: 500; font-size: 0.72rem; color: var(--blue-300); letter-spacing: 0.06em; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  position: relative;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--blue-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--white); }
.nav-cta { margin-left: 10px; padding: 10px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 190px 0 110px;
  background: radial-gradient(120% 120% at 50% 0%, var(--navy-700) 0%, var(--navy-900) 62%);
  color: var(--white);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 72%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  width: 720px; height: 720px;
  top: -290px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(43, 127, 255, 0.4), transparent 62%);
  filter: blur(30px);
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(34px); }
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-title { max-width: 17ch; margin: 0 auto 22px; }
.hero-sub { color: rgba(255, 255, 255, 0.76); font-size: 1.12rem; max-width: 60ch; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--off-white); }
.section-head { max-width: 660px; margin-bottom: 54px; }
.section-head.center-head { margin-inline: auto; text-align: center; }
.section-head.center-head .lead { margin-inline: auto; }
.section-head h2 { margin-bottom: 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--blue-300); }
.card h3 { margin-bottom: 10px; color: var(--navy-800); }
.card p { color: var(--grey-600); font-size: 0.97rem; }
.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--blue-500), var(--navy-700));
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-text h2 { margin-bottom: 16px; }
.split-text p { color: var(--grey-600); margin-bottom: 22px; }
.ticks { list-style: none; margin-bottom: 28px; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--grey-600); }
.ticks li::before {
  content: '';
  position: absolute; left: 0; top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: inset 0 0 0 3px var(--white);
}

.visual-panel {
  background: linear-gradient(150deg, var(--navy-800), var(--navy-600));
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
}
.visual-bar { height: 12px; width: 45%; border-radius: 99px; background: var(--blue-400); }
.visual-row { display: flex; gap: 12px; }
.visual-row span { height: 10px; flex: 1; border-radius: 99px; background: rgba(255, 255, 255, 0.18); }
.visual-row span:first-child { background: rgba(255, 255, 255, 0.34); }
.visual-block {
  height: 130px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* ---------- Process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
.step-item {
  position: relative;
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--grey-100);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.step-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-item::before {
  counter-increment: step;
  content: '0' counter(step);
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-300);
  margin-bottom: 12px;
}
.step-item h3 { margin-bottom: 8px; color: var(--navy-800); font-size: 1.1rem; }
.step-item p { color: var(--grey-600); font-size: 0.94rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-600));
  color: var(--white);
  padding: 84px 0;
  text-align: center;
}
.cta-inner h2 { margin-bottom: 12px; }
.cta-inner p { color: rgba(255, 255, 255, 0.75); margin-bottom: 28px; }

/* ---------- Page banner ---------- */
.page-banner {
  padding: 168px 0 78px;
  background: radial-gradient(110% 130% at 50% 0%, var(--navy-700), var(--navy-900) 65%);
  color: var(--white);
  text-align: center;
}
.page-banner p.lead { color: rgba(255, 255, 255, 0.74); margin-inline: auto; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: start; }
.form-card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--navy-800); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  background: var(--off-white);
  color: var(--ink);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(43, 127, 255, 0.14);
}
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #e0526a; background: #fff5f6; }
.error-text { display: none; color: #d13b52; font-size: 0.82rem; margin-top: 6px; }
.field.invalid .error-text { display: block; }

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(43, 127, 255, 0.1);
  border: 1px solid rgba(43, 127, 255, 0.3);
  color: var(--navy-700);
  font-size: 0.93rem;
}
.form-status.show { display: block; animation: fadeUp 0.5s var(--ease) both; }
.form-status.error {
  background: #fff5f6;
  border-color: rgba(224, 82, 106, 0.4);
  color: #d13b52;
}

.info-list { display: grid; gap: 18px; }
.info-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--off-white);
  border: 1px solid var(--grey-100);
}
.info-item .card-icon { margin-bottom: 0; flex-shrink: 0; width: 42px; height: 42px; }
.info-item h4 { color: var(--navy-800); margin-bottom: 4px; }
.info-item p, .info-item a { color: var(--grey-600); font-size: 0.94rem; }
.info-item a:hover { color: var(--blue-500); }

.map-embed {
  margin-top: 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--grey-100);
  min-height: 220px;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-600));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  text-align: center;
  padding: 24px;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; max-width: 820px; margin-inline: auto; }
.faq-item {
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq-q::after { content: '+'; font-size: 1.35rem; color: var(--blue-500); transition: transform 0.3s var(--ease); }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-a p { padding: 0 24px 20px; color: var(--grey-600); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.68); padding: 70px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h4 { color: var(--white); margin-bottom: 16px; font-size: 0.98rem; }
.footer-grid a, .footer-grid span { display: block; margin-bottom: 10px; font-size: 0.93rem; transition: color 0.25s var(--ease); }
.footer-grid a:hover { color: var(--blue-400); }
.footer-note { margin-top: 16px; font-size: 0.92rem; max-width: 32ch; }
.footer-bottom {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  text-align: center;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--blue-500);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s var(--ease);
  box-shadow: var(--shadow-glow);
  z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: #1a6ef0; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-layout { grid-template-columns: 1fr; gap: 44px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 92px 24px 32px;
    background: rgba(6, 18, 42, 0.98);
    backdrop-filter: blur(16px);
    transform: translateY(-102%);
    transition: transform 0.42s var(--ease);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
  .nav.open { transform: translateY(0); }
  .nav-link { padding: 14px 4px; font-size: 1.02rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-link::after { display: none; }
  .nav-cta { margin: 18px 0 0; justify-content: center; }

  .hero { padding: 150px 0 84px; }
  .section { padding: 72px 0; }
  .page-banner { padding: 140px 0 62px; }
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .form-card { padding: 26px 22px; }
  .btn, .btn-lg { width: 100%; }
  .hero-actions { flex-direction: column; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
