/* ============================================================
   Digimates — Digital Agency Theme
   Palette: deep navy + electric teal + warm amber accents
   ============================================================ */

:root {
  /* Color ramps */
  --navy-900: #0a1628;
  --navy-800: #0f1f38;
  --navy-700: #16294a;
  --navy-600: #1d355d;
  --navy-500: #2a4a7a;
  --navy-400: #3a5e94;
  --navy-300: #6b8cb8;

  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-300: #5eead4;
  --teal-100: #ccfbf1;

  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;

  --ink-900: #0a0f1a;
  --ink-700: #1f2937;
  --ink-500: #4b5563;
  --ink-400: #6b7280;
  --ink-300: #9ca3af;
  --ink-200: #d1d5db;
  --ink-100: #f3f4f6;
  --paper:   #ffffff;
  --paper-2: #f8fafc;

  --success: #10b981;
  --warning: #f59e0b;
  --error:   #ef4444;

  /* Semantic */
  --bg:        var(--paper);
  --bg-soft:   var(--paper-2);
  --surface:   var(--paper);
  --text:      var(--ink-900);
  --text-soft: var(--ink-500);
  --border:    var(--ink-200);
  --primary:   var(--teal-500);
  --primary-dark: var(--teal-600);
  --accent:    var(--amber-400);
  --dark-bg:   var(--navy-900);
  --dark-text: #e2e8f0;

  /* Type */
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(10,22,40,.08);
  --shadow-md: 0 8px 24px rgba(10,22,40,.10);
  --shadow-lg: 0 24px 60px rgba(10,22,40,.14);
  --shadow-glow: 0 0 40px rgba(20,184,166,.25);

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; color: var(--navy-900); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); letter-spacing: -.02em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-soft); }
.lead { font-size: 1.15rem; color: var(--ink-500); }

/* Layout helpers */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-dark { background: var(--navy-900); color: var(--dark-text); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: rgba(226,232,240,.78); }
.section-soft { background: var(--paper-2); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.section-head .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: 1.08rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 20px rgba(20,184,166,.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,184,166,.4); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-lg { padding: 17px 36px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ==============================  Header  ============================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-500), var(--navy-700));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(20,184,166,.35);
}
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--navy-900); letter-spacing: -.02em; }

/* Desktop nav */
.main-nav { display: none; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-item > a {
  display: inline-flex; align-items: center;
  padding: 10px 14px;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  color: var(--ink-700); border-radius: var(--r-sm);
  transition: color .2s ease, background .2s ease;
}
.nav-item > a:hover { color: var(--primary); background: rgba(20,184,166,.08); }
.nav-item.current > a { color: var(--primary); }
.nav-item.has-dropdown > a { padding-right: 30px; }
.dropdown-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--ink-400); border-radius: 4px;
}
.dropdown-toggle .chevron::before { content: ''; display: block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.dropdown-toggle:hover { color: var(--primary); }

.dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 50;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a {
  display: block; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: .92rem; color: var(--ink-700); font-weight: 500;
}
.dropdown li a:hover, .dropdown li a.active { background: var(--paper-2); color: var(--primary); }

.nav-cta {
  background: var(--navy-900) !important; color: #fff !important;
  border-radius: var(--r-pill) !important; padding: 10px 22px !important;
}
.nav-cta:hover { background: var(--primary) !important; }

/* Mobile toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .3s ease, opacity .2s ease; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-overlay { position: fixed; inset: 0; background: rgba(10,22,40,.5); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; z-index: 99; }
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ==============================  Hero  ============================== */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 64px) 0 64px;
  background: radial-gradient(ellipse at top right, rgba(20,184,166,.12), transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(245,158,11,.08), transparent 50%),
              var(--paper);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(10,22,40,.05) 1px, transparent 0);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--r-pill);
  background: var(--teal-100); color: var(--teal-600);
  font-family: var(--font-head); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-title { margin-bottom: 22px; }
.hero-title .grad { background: linear-gradient(120deg, var(--teal-500), var(--navy-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: 1.2rem; color: var(--ink-500); max-width: 680px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Home hero with video */
.hero-home {
  padding: calc(var(--header-h) + 40px) 0 0;
  background: var(--navy-900);
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex; align-items: center;
}
.hero-home .bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; z-index: 0; }
.hero-home::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,22,40,.55) 0%, rgba(10,22,40,.85) 100%);
}
.hero-home .container { position: relative; z-index: 2; }
.hero-home h1 { color: #fff; margin-bottom: 24px; }
.hero-home h1 .grad { background: linear-gradient(120deg, var(--teal-400), var(--amber-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-home .hero-subtitle { color: rgba(226,232,240,.85); max-width: 640px; }
.hero-home .hero-eyebrow { background: rgba(20,184,166,.18); color: var(--teal-300); }
.hero-home .hero-actions { margin-top: 8px; }
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  color: rgba(255,255,255,.7); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll .mouse { width: 22px; height: 34px; border: 2px solid rgba(255,255,255,.4); border-radius: 12px; position: relative; }
.hero-scroll .mouse::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: rgba(255,255,255,.6); border-radius: 2px; animation: scrollWheel 1.6s infinite; }
@keyframes scrollWheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 18px; } }

/* ==============================  Cards / Grids  ============================== */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-ico {
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-100), #fff);
  color: var(--teal-600); margin-bottom: 20px;
  transition: transform .3s ease;
}
.card:hover .card-ico { transform: scale(1.08) rotate(-4deg); }
.card-ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .96rem; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--primary);
}
.card-link .arr { transition: transform .2s ease; }
.card-link:hover .arr { transform: translateX(4px); }

/* Feature list card */
.feature-list { display: grid; gap: 14px; margin-top: 20px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--ink-500); }
.feature-list li::before {
  content: ''; flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px;
  background: var(--teal-100); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230d9488' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
  background-size: 14px; background-repeat: no-repeat; background-position: center;
}

/* Pill tags */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--ink-700);
  font-size: .88rem; font-weight: 500; border: 1px solid var(--border);
}

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; background: var(--navy-100);
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); color: var(--primary); line-height: 1; }
.stat-label { margin-top: 8px; font-size: .92rem; color: var(--ink-400); }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step {
  position: relative; padding: 28px 24px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -14px; left: 24px;
  font-family: var(--font-head); font-weight: 800; font-size: 1rem;
  color: #fff; background: var(--primary); padding: 4px 10px; border-radius: var(--r-pill);
}
.step h4 { margin-bottom: 8px; }
.step p { font-size: .92rem; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; padding: 22px 0;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--navy-900);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .ico { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-100); color: var(--teal-600); display: grid; place-items: center; transition: transform .3s ease; }
.faq-item.open .faq-q .ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 0 22px; color: var(--ink-500); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: clamp(48px, 7vw, 80px) 0;
  position: relative; overflow: hidden;
}
.cta-band::before { content: ''; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%; background: radial-gradient(circle, rgba(20,184,166,.18), transparent 60%); }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-text h2 { color: #fff; margin-bottom: 10px; }
.cta-text p { color: rgba(226,232,240,.8); }

/* Page intro band (subpages) */
.page-intro {
  padding: calc(var(--header-h) + 56px) 0 48px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
}
.page-intro .breadcrumb { font-size: .85rem; color: var(--ink-400); margin-bottom: 16px; }
.page-intro .breadcrumb a:hover { color: var(--primary); }
.page-intro h1 { margin-bottom: 16px; }
.page-intro .lead { max-width: 720px; }

/* Service sub-nav chips */
.subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.subnav a {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--border); font-size: .88rem; font-weight: 500; color: var(--ink-700);
  transition: all .2s ease;
}
.subnav a:hover, .subnav a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Portfolio grid */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.portfolio-item {
  border-radius: var(--r-lg); overflow: hidden; position: relative;
  aspect-ratio: 4/3; box-shadow: var(--shadow-md);
  cursor: pointer; background: var(--navy-100);
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-overlay {
  position: absolute; inset: 0; padding: 24px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to top, rgba(10,22,40,.88), transparent 60%);
  color: #fff; opacity: 0; transition: opacity .3s ease;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay h4 { color: #fff; margin-bottom: 4px; }
.portfolio-overlay span { font-size: .85rem; color: rgba(255,255,255,.75); }

/* Careers */
.job-list { display: grid; gap: 16px; }
.job-card {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.job-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.job-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.job-meta span { font-size: .82rem; color: var(--ink-400); background: var(--paper-2); padding: 4px 10px; border-radius: var(--r-pill); }

/* ==============================  Contact form  ============================== */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.contact-info-card {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: #fff; border-radius: var(--r-lg); padding: 36px;
}
.contact-info-card h3 { color: #fff; margin-bottom: 8px; }
.contact-info-card p { color: rgba(226,232,240,.8); margin-bottom: 24px; }
.contact-info-list { display: grid; gap: 18px; }
.contact-info-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-list .ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(20,184,166,.18); color: var(--teal-300); display: grid; place-items: center; }
.contact-info-list .ico svg { width: 18px; height: 18px; }
.contact-info-list .lbl { font-size: .78rem; color: rgba(226,232,240,.6); text-transform: uppercase; letter-spacing: .08em; }
.contact-info-list .val { color: #fff; font-weight: 500; }

.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 40px; box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .88rem; color: var(--navy-900); margin-bottom: 8px; }
.form-group label .req { color: var(--error); }
.form-control {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--text);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.form-error { display: block; color: var(--error); font-size: .82rem; margin-top: 6px; }
.form-control.is-invalid { border-color: var(--error); }

/* Form alert */
.alert {
  padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 24px;
  display: flex; gap: 12px; align-items: flex-start;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert .alert-ico { flex-shrink: 0; width: 22px; height: 22px; }

/* ==============================  Footer  ============================== */
.site-footer { background: var(--navy-900); color: var(--dark-text); padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { color: rgba(226,232,240,.7); margin: 18px 0; max-width: 280px; font-size: .92rem; }
.brand-footer .brand-text { color: #fff; }
.social-links { display: flex; gap: 10px; }
.social-ico {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.social-ico:hover { background: var(--primary); transform: translateY(-3px); }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: rgba(226,232,240,.7); font-size: .9rem; }
.footer-col a:hover { color: var(--teal-300); }
.footer-contact a { color: var(--teal-300); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: rgba(226,232,240,.6);
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 80;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ==============================  Animations  ============================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float { animation: float 5s ease-in-out infinite; }

/* ==============================  Responsive  ============================== */
@media (min-width: 901px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .contact-layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* Mobile nav drawer */
  .main-nav {
    position: fixed; top: 0; right: -100%; width: min(360px, 88vw); height: 100vh;
    background: #fff; box-shadow: -10px 0 40px rgba(10,22,40,.18);
    padding: calc(var(--header-h) + 16px) 20px 32px;
    overflow-y: auto; z-index: 100;
    transition: right .35s cubic-bezier(.4,0,.2,1);
  }
  .main-nav.open { right: 0; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-item { width: 100%; }
  .nav-item > a { padding: 14px 12px; font-size: 1rem; border-radius: var(--r-sm); }
  .nav-item.has-dropdown > a { padding-right: 48px; }
  .dropdown-toggle { right: 8px; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; padding: 4px 0 4px 12px; background: var(--paper-2);
    border-radius: var(--r-sm); margin-top: 4px;
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav-item.has-dropdown.open .dropdown { max-height: 600px; }
  .nav-item.has-dropdown.open .dropdown-toggle .chevron::before { transform: rotate(225deg) translateY(-2px); }
  .menu-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .cta-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .form-card { padding: 28px 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

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