/* ============================================================
   AnteLabs — Operations Engineering for Law Firms
   Tokens, base resets, type scale, and components.
   Tailwind (Play CDN) handles layout/spacing utilities;
   this file owns design tokens, fonts, accordion, buttons, modal.
   ============================================================ */

:root {
  --bg:          #FAF6F0; /* warm cream            */
  --text:        #1A1A1A; /* warm near-black       */
  --text-muted:  #6B6B6B; /* warm gray             */
  --accent:      #0E5F4D; /* deep emerald          */
  --accent-dark: #0A4A3C; /* emerald hover/active  */
  --hover:       #F76900; /* Syracuse orange       */
  --hover-dark:  #D85800; /* orange active         */
  --hairline:    #E5DFD5; /* subtle dividers       */
  --card-tint:   #F5F0E8; /* image-card tint       */
  --surface:     #FFFCF7; /* warm white — modal    */
  --charcoal:    #211E1A; /* warm dark band        */

  --maxw-page:  1200px;
  --maxw-prose: 680px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
strong { font-weight: 600; }

/* visible focus everywhere; emerald by default, 3px offset */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw-page); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 1024px) { .container { padding-inline: 64px; } }
.prose { max-width: var(--maxw-prose); }

/* ---------- section bands & accents ---------- */
.band { width: 100%; }
.band--tint { background: var(--card-tint); }
.band--accent { position: relative; overflow: hidden; background: radial-gradient(135% 130% at 78% 12%, #12715B 0%, var(--accent) 58%); color: var(--bg); }
.band--accent p { color: rgba(250, 246, 240, 0.82); }
.band--accent .btn { background: var(--bg); color: var(--accent); border-color: var(--bg); }
.band--accent .btn:hover { background: var(--hover); color: #fff; border-color: var(--hover); }
.band--accent .btn:active { background: var(--hover-dark); border-color: var(--hover-dark); }

/* charcoal "who we are" band */
.band--charcoal { background: var(--charcoal); color: var(--bg); }
.band--charcoal .acc { border-top-color: rgba(250, 246, 240, 0.14); }
.band--charcoal .acc__item { border-bottom-color: rgba(250, 246, 240, 0.14); }
.band--charcoal .acc__trigger { color: var(--bg); }
.band--charcoal .acc__trigger:hover { background: rgba(250, 246, 240, 0.06); }
.band--charcoal .acc__chev { color: #7FC0AC; }
.band--charcoal .acc__trigger:hover .acc__chev { color: var(--hover); }
.band--charcoal .acc__body, .band--charcoal .acc__body p { color: rgba(250, 246, 240, 0.80); }
.band--charcoal :focus-visible { outline-color: var(--bg); }

/* decorative logo watermark inside a band */
.band__watermark { position: absolute; right: -56px; bottom: -84px; width: 360px; height: auto; opacity: 0.07; pointer-events: none; user-select: none; }
@media (min-width: 1024px) { .band__watermark { width: 520px; right: -84px; bottom: -130px; } }

/* framed stat panel — lifts the numbers without a full-width color band */
.stat-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; box-shadow: 0 1px 2px rgba(26, 26, 26, 0.02), 0 18px 40px -24px rgba(26, 26, 26, 0.16); padding: 36px 24px; }
@media (min-width: 1024px) { .stat-panel { padding: 56px 48px; } }

/* two-step cards (surface the process, always visible) */
.step-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 28px 26px; box-shadow: 0 1px 2px rgba(26, 26, 26, 0.02), 0 16px 38px -26px rgba(26, 26, 26, 0.16); }
@media (min-width: 1024px) { .step-card { padding: 40px 36px; } }
.step-card__num { display: block; font-size: 36px; line-height: 1; color: var(--accent); letter-spacing: -0.01em; }
.step-card__title { margin-top: 8px; }
.step-card .acc__list { margin-top: 10px; }

/* pilot-program callout */
.pilot-note { max-width: 720px; margin: 48px auto 0; padding: 18px 28px; background: var(--card-tint); border: 1px solid var(--hairline); border-radius: 14px; text-align: center; }
.pilot-note p { font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.pilot-note strong { color: var(--text); font-weight: 600; }
.pilot-note a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.pilot-note a:hover { color: var(--hover); }
@media (min-width: 1024px) { .pilot-note { margin-top: 64px; } }

/* ---------- type scale (mobile / sm 640 / md 1024) ---------- */
.font-display { font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif; font-weight: 400; }

.t-hero      { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 44px; line-height: 1.05; letter-spacing: -0.015em; }
.t-h1        { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 32px; line-height: 1.2;  letter-spacing: -0.01em; }
.t-h2        { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 24px; line-height: 1.2; }
.t-h3        { font-size: 18px; line-height: 1.2; font-weight: 500; }
.t-body      { font-size: 16px; line-height: 1.6; }
.t-stat      { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 56px; line-height: 1.05; color: var(--accent); letter-spacing: -0.015em; }
.t-accordion { font-size: 18px; line-height: 1.3; }
.t-caption   { font-size: 12px; line-height: 1.5; }

@media (min-width: 640px) {
  .t-hero { font-size: 64px; } .t-h1 { font-size: 44px; } .t-h2 { font-size: 30px; }
  .t-h3 { font-size: 20px; } .t-body { font-size: 17px; } .t-stat { font-size: 80px; }
  .t-accordion { font-size: 20px; } .t-caption { font-size: 13px; }
}
@media (min-width: 1024px) {
  .t-hero { font-size: 80px; } .t-h1 { font-size: 56px; } .t-h2 { font-size: 36px; }
  .t-h3 { font-size: 22px; } .t-body { font-size: 18px; } .t-stat { font-size: 84px; }
  .t-accordion { font-size: 22px; } .t-caption { font-size: 14px; }
}

.text-balance { text-wrap: balance; }
.muted { color: var(--text-muted); }
.italic-source { font-style: italic; color: var(--text-muted); }

/* ---------- thesis (editorial) ---------- */
.thesis__h { font-size: 36px; line-height: 1.15; letter-spacing: -0.01em; }
.thesis__sub { margin-top: 24px; max-width: 640px; font-size: 18px; }
.thesis__stats { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 56px; }
.thesis__stat-num { font-size: 64px; line-height: 1; color: var(--accent); letter-spacing: -0.015em; }
.thesis__stat-cap { margin-top: 10px; max-width: 360px; font-size: 17px; line-height: 1.5; color: var(--text); }
.thesis__line { margin-top: 56px; max-width: 640px; }
.thesis__line + .thesis__line { margin-top: 20px; }
@media (min-width: 640px) {
  .thesis__stats { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (min-width: 1024px) {
  .thesis__h { font-size: 56px; }
  .thesis__sub { font-size: 20px; }
  .thesis__stats { margin-top: 72px; }
  .thesis__stat-num { font-size: 88px; }
  .thesis__line { margin-top: 72px; }
}

/* ---------- buttons ---------- */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 16px; line-height: 1;
  padding: 16px 28px; border-radius: 10px;
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
              border-color 200ms var(--ease), transform 200ms var(--ease);
}
.btn        { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn:hover  { background: var(--hover); border-color: var(--hover); transform: translateY(-2px); }
.btn:active { background: var(--hover-dark); border-color: var(--hover-dark); transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--hover); outline-offset: 3px; }

.btn-ghost        { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover  { color: var(--hover); border-color: var(--hover); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }
.btn-ghost:focus-visible { outline: 2px solid var(--hover); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.nav--scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom-color: var(--hairline);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__logo { width: 30px; height: 30px; flex: none; }
.nav__wordmark {
  font-weight: 500; font-size: 16px; color: var(--accent); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; max-width: 200px;
  transition: opacity 300ms var(--ease), max-width 300ms var(--ease), margin-left 300ms var(--ease);
}
.nav--scrolled .nav__wordmark { opacity: 0; max-width: 0; margin-left: -10px; }
.nav__link { font-weight: 500; font-size: 15px; color: var(--accent); white-space: nowrap; padding: 8px 2px; /* ≥40px tap target */ }
.nav__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- accordion ---------- */
.acc { border-top: 1px solid var(--hairline); }
.acc__item { border-bottom: 1px solid var(--hairline); }
.acc__trigger {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 24px 8px; color: var(--text); font-weight: 500;
  transition: background-color 200ms var(--ease);
}
.acc__trigger:hover { background: rgba(26, 26, 26, 0.035); }
.acc__trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acc__num { color: var(--text-muted); font-weight: 500; font-size: 0.85em; font-variant-numeric: tabular-nums; min-width: 2.5ch; }
.acc__title { flex: 1; }
.acc__chev { margin-left: auto; color: var(--accent); font-size: 0.8em; line-height: 1; transition: color 200ms var(--ease); }
.acc__trigger:hover .acc__chev { color: var(--hover); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms var(--ease); }
.acc__panel-inner { overflow: hidden; }
.acc__item[data-open="true"] .acc__panel { grid-template-rows: 1fr; }
.acc__body { padding: 2px 8px 28px; max-width: var(--maxw-prose); }
.acc__label { display: block; margin-top: 20px; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.acc__list { list-style: none; padding: 0; display: grid; gap: 10px; }
.acc__list li { position: relative; padding-left: 22px; }
.acc__list li::before { content: "•"; position: absolute; left: 4px; color: var(--accent); }
.acc__close { margin-top: 20px; font-style: italic; color: var(--text-muted); }

/* ---------- Who-we-are logo ---------- */
.who__logo { width: 240px; height: 240px; }
@media (min-width: 1024px) { .who__logo { width: 400px; height: 400px; } }

/* ---------- hero art (Monet — Impression, Sunrise) ---------- */
.hero__art { margin: 0; }
.hero__art img {
  width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 60px -20px rgba(26, 26, 26, 0.28);
}
.hero__credit { margin-top: 10px; text-align: right; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal[data-open="true"] { display: grid; place-items: center; padding: 20px; }
.modal__overlay {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.modal__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 480px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
  padding: 32px; box-shadow: 0 24px 60px -12px rgba(26, 26, 26, 0.18);
}
.modal__title { margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1px solid var(--hairline); border-radius: 10px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field input[aria-invalid="true"] { border-color: #B23B2E; }
.field__error { display: none; color: #B23B2E; font-size: 13px; margin-top: 6px; }
.field input[aria-invalid="true"] ~ .field__error { display: block; }
.modal__submit { width: 100%; margin-top: 8px; }
.modal__skip { display: block; margin-top: 16px; text-align: center; font-size: 14px; color: var(--text-muted); }
.modal__skip:hover { color: var(--hover); text-decoration: underline; text-underline-offset: 3px; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-muted); border-radius: 8px; }
.modal__close:hover { color: var(--text); background: var(--card-tint); }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); }
.footer__brand { font-size: 14px; font-weight: 500; color: var(--accent); }
.footer__links a:hover { color: var(--hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- scroll reveal (gated on .js so no-JS users still see content) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* staggered children — used on grids/lists that should cascade in */
.js .reveal-group .reveal-item { opacity: 0; transform: translateY(24px); transition: opacity 550ms var(--ease), transform 550ms var(--ease); }
.js .reveal-group.is-visible .reveal-item { opacity: 1; transform: none; }
.reveal-item:nth-child(1) { transition-delay: 40ms; }
.reveal-item:nth-child(2) { transition-delay: 100ms; }
.reveal-item:nth-child(3) { transition-delay: 160ms; }
.reveal-item:nth-child(4) { transition-delay: 220ms; }
.reveal-item:nth-child(5) { transition-delay: 280ms; }
.reveal-item:nth-child(6) { transition-delay: 340ms; }

/* ---------- hero image entrance (runs once on load) ---------- */
.js .hero__art img { animation: heroIn 1000ms var(--ease) 100ms both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px) scale(1.03); } to { opacity: 1; transform: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .hero__art img { animation: none !important; }
  .btn:hover, .btn-ghost:hover { transform: none; }
  .acc__panel { transition: none; }
  .nav__wordmark { transition: none; }
}
