/* ==========================================================================
   Codenexa Solution — Shared Stylesheet
   ========================================================================== */

:root {
  /* Brand colors */
  --navy-900: #0F2F4A;
  --navy-700: #123F63;
  --navy-600: #174E78;
  --white: #FFFFFF;
  --bg-soft: #F5F8FA;
  --border: #E5EBF0;
  --ink: #1B1F23;
  --ink-muted: #5B6672;
  --ink-faint: #8A94A0;
  --success: #1D7A4C;
  --error: #B3261E;

  /* Type */
  --font-heading: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --header-height: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { color: var(--ink-muted); }

.lede {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 62ch;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy-900); color: var(--white); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { margin-top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-600);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy-700);
  color: var(--white);
  border-color: var(--navy-700);
}
.btn-primary:hover { background: var(--navy-900); border-color: var(--navy-900); }

.btn-secondary {
  background: transparent;
  color: var(--navy-700);
  border-color: var(--navy-700);
}
.btn-secondary:hover { background: var(--navy-700); color: var(--white); }

.btn-light {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--white);
}
.btn-light:hover { background: transparent; color: var(--white); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(15, 47, 74, 0.06); }

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--navy-900);
  white-space: nowrap;
}

.footer-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand-row img { height: 30px; width: auto; }
.footer-brand-row .brand-text { color: var(--white); font-size: 1.05rem; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 16px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  position: relative;
}
.main-nav a:hover { color: var(--navy-700); background: var(--bg-soft); }
.main-nav a[aria-current="page"] { color: var(--navy-700); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--navy-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--white) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero h1 { margin-top: 14px; }
.hero .lede { margin-top: 18px; }

.hero-visual {
  background: var(--navy-900);
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3.2;
  position: relative;
  overflow: hidden;
}
.hero-visual svg { width: 100%; height: 100%; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: 64px 0 56px;
  background: var(--navy-900);
  color: var(--white);
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: #C7D5E0; margin-top: 12px; max-width: 60ch; }
.breadcrumb { font-size: 0.85rem; color: #9FB4C6; margin-bottom: 16px; }
.breadcrumb a { color: #C7D5E0; }
.breadcrumb a:hover { color: var(--white); }

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--navy-600); transform: translateY(-3px); }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.95rem; margin-bottom: 16px; }
.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link:hover { color: var(--navy-900); }

/* Why choose us */
.feature-row {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: 1px solid var(--border); }
.feature-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 8px;
  background: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 20px; height: 20px; stroke: var(--white); }
.feature-row h3 { margin-bottom: 6px; }
.feature-row p { font-size: 0.95rem; }

/* Process / approach */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 4%;
  right: 4%;
  height: 1px;
  background: var(--border);
}
.process-step { position: relative; padding-right: 20px; }
.process-index {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy-600);
  background: var(--white);
  display: inline-block;
  padding-right: 10px;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}
.process-step h3 { margin: 14px 0 8px; }
.process-step p { font-size: 0.93rem; }

/* About / split content */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-media {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.split-media svg { width: 78%; height: 78%; }

.check-list li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.97rem;
  color: var(--ink-muted);
  align-items: flex-start;
}
.check-list svg { flex: none; margin-top: 3px; width: 18px; height: 18px; stroke: var(--navy-600); }

/* CTA band */
.cta-band {
  background: var(--navy-700);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: #CFDDE8; max-width: 46ch; }
.cta-band .btn-light { flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #C7D5E0; padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-tagline {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--navy-600);
  background: rgba(255,255,255,0.06);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  color: #9FB4C6;
}
.footer-grid p { color: #9FB4C6; font-size: 0.92rem; max-width: 32ch; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #9FB4C6; font-size: 0.92rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--white); }
.footer-contact li { color: #9FB4C6; font-size: 0.92rem; margin-bottom: 14px; }
.footer-contact span { display: block; color: #6E869B; font-size: 0.78rem; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-contact a { color: #C7D5E0; }
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #6E869B;
}
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: #6E869B; }
.footer-legal a:hover { color: var(--white); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.form-field .hint { font-size: 0.78rem; color: var(--ink-faint); font-weight: 400; }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--navy-600); outline: none; box-shadow: 0 0 0 3px rgba(23,78,120,0.12); }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select { border-color: var(--error); }
.field-error { font-size: 0.8rem; color: var(--error); display: none; }
.form-field.has-error .field-error { display: block; }

.form-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.form-status.is-success { display: block; background: #EAF5EE; color: var(--success); border: 1px solid #BEE3C9; }
.form-status.is-error { display: block; background: #FBEAE9; color: var(--error); border: 1px solid #F1C3C0; }

.contact-info-list { margin-top: 28px; }
.contact-info-list li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.contact-info-list li:first-child { border-top: none; }
.contact-info-list .ci-icon {
  width: 38px; height: 38px; border-radius: 8px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.contact-info-list .ci-icon svg { width: 18px; height: 18px; stroke: var(--navy-700); }
.contact-info-list span { display: block; font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.contact-info-list strong { font-weight: 600; color: var(--ink); font-size: 0.98rem; }

/* Support topic grid */
.support-topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.topic-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.topic-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.topic-card p { font-size: 0.9rem; }

/* Legal content pages */
.legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.legal-toc h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 12px; }
.legal-toc li { margin-bottom: 9px; }
.legal-toc a { font-size: 0.9rem; color: var(--ink-muted); }
.legal-toc a:hover { color: var(--navy-700); }
.legal-content h2 { margin-top: 40px; margin-bottom: 14px; font-size: 1.25rem; scroll-margin-top: calc(var(--header-height) + 16px); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; font-size: 0.97rem; }
.legal-content ul { margin: 0 0 14px 0; }
.legal-content ul li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 0.97rem; color: var(--ink-muted); }
.legal-content ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--navy-600); }
.legal-updated { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 8px; }
.legal-note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 36px;
}
.placeholder-tag {
  background: #FFF4E5;
  color: #8A5A00;
  border: 1px solid #F3DDB2;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 600;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Mobile nav drawer ---------- */
@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(320px, 84vw);
    height: calc(100vh - var(--header-height));
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 2px;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); box-shadow: -8px 0 24px rgba(15,47,74,0.1); }
  .main-nav a { padding: 14px 12px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/10; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .process::before { display: none; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .support-topics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero { padding: 44px 0 56px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; flex-direction: column; align-items: flex-start; }
  .support-topics { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .header-actions .btn { display: none; }
}
