/* =========================================================
   AperturAI — Design tokens
   ========================================================= */
:root {
  --navy: #0B1220;
  --slate-blue: #1E3A5F;
  --teal: #2DD4BF;
  --soft-cyan: #E6FFFB;
  --sand: #F5F1E8;
  --cloud: #F8FAFC;
  --charcoal: #1F2937;
  --muted: #64748B;
  --gold: #D6A94A;
  --white: #FFFFFF;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 18, 32, 0.14);

  --container-w: 1200px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--charcoal);
  background: var(--cloud);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 3.2vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.7rem, 1.6vw + 1rem, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--charcoal); }
ul, ol { padding: 0; margin: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--white);
  padding: 12px 20px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; border-radius: var(--radius-sm);
  padding: 14px 26px; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }

.btn-primary {
  background: var(--teal); color: var(--navy);
  box-shadow: 0 6px 18px rgba(45, 212, 191, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(45, 212, 191, 0.45); }

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

.btn-outline-light {
  background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: var(--teal); }

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(11,18,32,0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a:not(.btn) { font-weight: 600; font-size: 0.94rem; color: var(--charcoal); position: relative; white-space: nowrap; }
.nav-links a:not(.btn):hover { color: var(--slate-blue); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--teal); transition: width 0.2s ease;
}
.nav-links a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--slate-blue) 100%);
  padding: 96px 0 88px;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 80% 20%, rgba(45,212,191,0.18), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700;
  color: var(--slate-blue); margin: 0 0 14px;
}
.eyebrow-light { color: var(--teal); }

.hero-copy h1 { color: var(--white); }
.hero-lede { color: #C9D4E3; font-size: 1.15rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 26px; }
.hero-actions.center { justify-content: center; }
.hero-trust {
  display: inline-flex; align-items: center; gap: 8px; color: #B9C4D4; font-size: 0.9rem; font-weight: 600;
}

.hero-visual { position: relative; }
.hero-svg { width: 100%; height: auto; }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 96px 0; }
.section-sand { background: var(--sand); }
.section-tint { background: var(--soft-cyan); }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.align-left { margin: 0 0 40px; text-align: left; }
.section-sub { color: var(--muted); font-size: 1rem; margin-top: 8px; }

.section-cta { text-align: center; margin-top: 44px; }

.text-link {
  color: var(--slate-blue); font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 2px solid transparent; transition: border-color 0.15s ease, color 0.15s ease;
}
.text-link:hover { color: var(--navy); border-color: var(--teal); }

/* =========================================================
   Grid & Cards
   ========================================================= */
.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); }

.card {
  background: var(--white); border: 1px solid rgba(11,18,32,0.07); border-radius: var(--radius-md);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon { margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.service-card { display: flex; flex-direction: column; }
.service-card-links { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.service-card-links .text-link.secondary { color: var(--muted); font-weight: 600; }
.service-card-links .text-link.secondary:hover { color: var(--slate-blue); }

.usecase-card ul { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.usecase-card li {
  position: relative; padding-left: 18px; color: var(--charcoal); font-size: 0.96rem;
}
.usecase-card li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
}

/* =========================================================
   Problem section
   ========================================================= */
.narrow-grid { max-width: 820px; }
.problem-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.problem-list li {
  position: relative; padding: 16px 20px 16px 44px; background: var(--white);
  border: 1px solid rgba(11,18,32,0.07); border-radius: var(--radius-sm); font-size: 1.02rem;
}
.problem-list li::before {
  content: ""; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--slate-blue);
}

.analogy-callout {
  background: var(--soft-cyan); border-left: 4px solid var(--teal); border-radius: var(--radius-sm);
  padding: 26px 28px; font-size: 1.05rem; color: var(--navy);
}
.analogy-callout p { margin: 0; }
.analogy-compact { margin-top: 24px; }

/* =========================================================
   Process / How it works
   ========================================================= */
.process {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; position: relative;
}
.process::before {
  content: ""; position: absolute; top: 34px; left: 10%; right: 10%; height: 2px;
  background: repeating-linear-gradient(to right, var(--teal) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.process-step {
  position: relative; z-index: 1; background: var(--white); border: 1px solid rgba(11,18,32,0.07);
  border-radius: var(--radius-md); padding: 26px 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--teal); color: var(--navy); font-weight: 800; font-size: 0.9rem;
  margin-bottom: 14px;
}
.process-step .card-icon { margin: 0 auto 14px; }
.process-step h3 { font-size: 1.05rem; }
.process-step p { font-size: 0.92rem; color: var(--muted); }

/* =========================================================
   Quote callout
   ========================================================= */
.callout-section { padding: 0 0 96px; }
.quote-callout {
  background: var(--navy); border-radius: var(--radius-lg); padding: 56px 60px; position: relative; overflow: hidden;
}
.quote-callout::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 260px at 90% 10%, rgba(45,212,191,0.22), transparent 70%);
}
.quote-mark { position: relative; margin-bottom: 18px; }
.quote-callout p {
  position: relative; color: var(--white); font-size: 1.35rem; font-weight: 600; line-height: 1.5;
  max-width: 900px; margin-bottom: 22px;
}
.quote-callout .text-link { position: relative; color: var(--teal); }
.quote-callout .text-link:hover { color: var(--white); border-color: var(--teal); }

/* =========================================================
   Split layout (Why AperturAI)
   ========================================================= */
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.split-visual {
  background: var(--white); border-radius: var(--radius-lg); padding: 40px; text-align: center;
  border: 1px solid rgba(11,18,32,0.07); box-shadow: var(--shadow-sm);
}
.axiom-intro { font-size: 1.05rem; color: var(--muted); max-width: 52ch; }
.check-list { display: flex; flex-direction: column; gap: 14px; margin: 24px 0 30px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 1.02rem; }
.check-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: var(--navy);
  font-size: 0.8rem; font-weight: 800; margin-top: 2px;
}

/* =========================================================
   Scenario cards
   ========================================================= */
.scenario-card { position: relative; }
.scenario-label {
  display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate-blue); background: var(--soft-cyan); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.scenario-result { font-size: 0.94rem; color: var(--muted); border-top: 1px solid rgba(11,18,32,0.08); padding-top: 14px; margin-top: 14px; }
.scenario-result strong { color: var(--navy); }

/* =========================================================
   About
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 56px; align-items: center; }
.about-badge {
  background: var(--navy); border-radius: var(--radius-lg); padding: 48px 30px; text-align: center;
  box-shadow: var(--shadow-md);
}
.badge-label { color: var(--white); font-weight: 800; font-size: 1.15rem; margin: 16px 0 4px; }
.badge-sub { color: var(--teal); font-weight: 600; margin: 0; }

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--slate-blue) 100%);
  text-align: center;
}
.final-cta-inner { position: relative; max-width: 720px; margin: 0 auto; }
.final-cta img { margin: 0 auto 24px; }
.final-cta h2 { color: var(--white); }
.final-cta p { color: #C9D4E3; }

/* =========================================================
   Contact form
   ========================================================= */
.contact-form {
  margin-top: 36px; text-align: left; background: rgba(248,250,252,0.04);
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  padding: 32px; backdrop-filter: blur(6px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field span { font-size: 0.85rem; font-weight: 700; color: #C9D4E3; }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font); font-size: 0.98rem; color: var(--charcoal);
  background: var(--white); border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,0.25);
}
.form-field textarea { resize: vertical; min-height: 84px; }
.contact-form .btn { width: 100%; justify-content: center; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; font-weight: 600; min-height: 1.2em; }
.form-status.is-success { color: var(--teal); }
.form-status.is-error { color: #F0A9A9; }
.form-status.is-pending { color: #C9D4E3; }
.form-status a { color: var(--teal); text-decoration: underline; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--navy); color: #B9C4D4; padding: 64px 0 28px; }
.footer p { color: #B9C4D4; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand-col img { height: 42px; margin-bottom: 16px; }
.footer-brand-col p { font-size: 0.92rem; max-width: 34ch; }
.footer-sub { color: #8494AC; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a:hover { color: var(--teal); }
.footer-heading { color: var(--white); font-weight: 700; margin-bottom: 12px; }
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-email { color: var(--teal); font-weight: 700; }
.footer-email:hover { text-decoration: underline; }
.footer-bottom { padding-top: 24px; font-size: 0.85rem; color: #8494AC; }

/* =========================================================
   Scroll reveal
   ========================================================= */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
  .process::before { display: none; }
  .split { grid-template-columns: 1fr; }
  .split-visual { order: 2; }
  .about-grid { grid-template-columns: 1fr; }
  .about-badge { order: -1; max-width: 320px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0; height: calc(100vh - 76px);
    background: var(--cloud); flex-direction: column; z-index: 90;
    align-items: flex-start; padding: 32px 24px; gap: 22px; transform: translateX(100%);
    transition: transform 0.25s ease; overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links .btn { width: 100%; justify-content: center; }

  .hero { padding: 64px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 380px; margin: 0 auto; }

  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }

  .quote-callout { padding: 40px 28px; }
  .quote-callout p { font-size: 1.1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .hero-actions, .hero-actions.center { flex-direction: column; align-items: stretch; }
  .btn-lg { width: 100%; }
}

/* =========================================================
   Service detail subpages
   ========================================================= */
.service-breadcrumb { padding: 22px 24px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; }

.service-hero-section { background: var(--cloud); padding: 36px 0 64px; text-align: center; }
.service-hero { max-width: 720px; margin: 0 auto; }
.service-hero-icon { margin: 0 auto 20px; }
.service-hero .eyebrow { text-align: center; }
.service-hero h1 { margin-bottom: 14px; }
.service-hero-lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 auto 28px; }
.service-hero .hero-actions { justify-content: center; }

.service-section h2 { margin-bottom: 22px; }
.service-section > .container > p.section-lede { font-size: 1.05rem; color: var(--muted); max-width: 68ch; margin-bottom: 24px; }

.service-diagram-section {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--slate-blue) 100%);
  padding: 48px 0 56px; text-align: center;
}
.service-diagram-caption {
  position: relative; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem;
  font-weight: 700; color: var(--teal); margin-bottom: 24px;
}
.service-diagram { position: relative; max-width: 680px; margin: 0 auto; }
.service-diagram svg { width: 100%; height: auto; display: block; }

@media (max-width: 700px) {
  /* Below this width, shrinking the diagram to fit makes the labels illegible.
     Hold it near native size and let it scroll horizontally instead. */
  .service-diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .service-diagram svg { width: 560px; max-width: none; }
}

@media (max-width: 480px) {
  .service-hero .hero-actions { flex-direction: column; align-items: stretch; }
}
