/* ============================================================================
   ACNB AI — public site
   Editorial cream + deep green. Auto light/dark. Expressive display type.
   ========================================================================== */

/* ---- Design tokens (light default) --------------------------------------- */
:root {
  --paper:        #F7F3E9;   /* warm cream page */
  --surface:      #FFFDF7;   /* cards */
  --surface-2:    #F1EBDC;   /* subtle fill */
  --ink:          #12241C;   /* headings */
  --body:         #3B4A40;   /* body text */
  --muted:        #6E7B70;
  --green:        #123A2A;   /* deep forest */
  --green-2:      #1C6B47;   /* interactive green */
  --green-ink:    #0E4630;
  --brass:        #A9803F;   /* warm accent */
  --line:         #E5DDCB;
  --line-strong:  #D6CBB2;
  --btn-ink:      #FBF8F0;   /* text on green button */
  --shadow:       0 1px 2px rgba(18,36,28,.05), 0 8px 24px rgba(18,36,28,.06);
  --shadow-lg:    0 20px 50px rgba(18,36,28,.12);

  --accent:       var(--green-2);
  --radius:       16px;
  --radius-sm:    10px;
  --maxw:         1160px;

  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: light;
}

/* Auto dark via system preference … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #0D1411;
    --surface:     #131C17;
    --surface-2:   #18231C;
    --ink:         #F2EEE3;
    --body:        #C7D0C6;
    --muted:       #8B988B;
    --green:       #EAF3EC;
    --green-2:     #57B98A;
    --green-ink:   #57B98A;
    --brass:       #CBA76A;
    --line:        rgba(242,238,227,.12);
    --line-strong: rgba(242,238,227,.22);
    --btn-ink:     #08120D;
    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg:   0 24px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
/* … and explicit manual override */
:root[data-theme="dark"] {
  --paper:       #0D1411;
  --surface:     #131C17;
  --surface-2:   #18231C;
  --ink:         #F2EEE3;
  --body:        #C7D0C6;
  --muted:       #8B988B;
  --green:       #EAF3EC;
  --green-2:     #57B98A;
  --green-ink:   #57B98A;
  --brass:       #CBA76A;
  --line:        rgba(242,238,227,.12);
  --line-strong: rgba(242,238,227,.22);
  --btn-ink:     #08120D;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Type ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); letter-spacing: -.03em; }
h3 { font-size: 1.35rem; letter-spacing: -.02em; }
p  { margin: 0 0 1rem; }
a  { color: var(--green-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brass); }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; position: relative; }
.section { padding: 104px 0; }
.section-sm { padding: 60px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.22rem; line-height: 1.6; color: var(--body); max-width: 660px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700;
  color: var(--green-2); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--brass); border-radius: 2px; }

/* the old "gradient-text" hook → clean brass emphasis, no animation */
.gradient-text { color: var(--brass); font-style: italic; }

.sec-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.bg-soft { background: var(--surface-2); }
.bg-navy { background: var(--green); color: #EAF3EC; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s, background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn-primary { background: var(--green-2); color: var(--btn-ink); }
.btn-primary:hover { background: var(--green-ink); color: var(--btn-ink); transform: translateY(-2px); }
:root[data-theme="dark"] .btn-primary:hover,
.btn-primary:hover { }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--green-2); color: var(--green-2); transform: translateY(-2px); }
.btn-light { background: var(--ink); color: var(--paper); }
.btn-light:hover { transform: translateY(-2px); color: var(--paper); opacity: .9; }
.btn-block { width: 100%; }

/* ---- Header / wordmark --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }

/* Brand is a pure typographic wordmark */
.brand { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; }
.brand:hover { color: inherit; }
.wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  letter-spacing: -.045em; color: var(--ink); line-height: 1;
}
.wordmark .dot { color: var(--brass); }
.wordmark em { font-style: italic; font-weight: 700; color: var(--green-2); }

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--body); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--green-2); transform: translateY(-1px); }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun,
:root:not([data-theme="light"]) .theme-toggle .sun { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 92px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 24px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 22px; margin-top: 32px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---- Workflow Diagnosis theater (hero centerpiece) ----------------------- */
.workflow-theater {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.theater-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.theater-head h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); margin: 0 0 4px; }
.theater-head p { font-size: .86rem; color: var(--muted); margin: 0; max-width: 34ch; }
.workflow-stage { display: grid; gap: 12px; }
.signal-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); transition: opacity .3s; }
.signal-card .n-label { display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.signal-card strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.01em; margin-bottom: 4px; }
.signal-card p { margin: 0; font-size: .92rem; color: var(--body); }
.signal-card [data-typing="true"]::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: 3px;
  border-right: 2px solid currentColor;
  transform: translateY(.12em);
  animation: cursor-blink .9s steps(1) infinite;
}
.signal-card.ai-recommendation { border-color: color-mix(in srgb, var(--green-2) 45%, var(--line)); background: color-mix(in srgb, var(--green-2) 8%, var(--surface)); }
.signal-card.ai-recommendation .n-label { color: var(--green-2); }

.ai-pulse { display: flex; align-items: center; justify-content: center; gap: 7px; height: 14px; }
.ai-pulse span { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); opacity: .35; animation: pulse 1.4s ease-in-out infinite; }
.ai-pulse span:nth-child(2){ animation-delay:.2s } .ai-pulse span:nth-child(3){ animation-delay:.4s }
@keyframes pulse { 0%,100%{opacity:.25;transform:scale(.8)} 50%{opacity:1;transform:scale(1)} }
@keyframes cursor-blink { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }

.impact-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.impact-strip > div { border-top: 2px solid var(--line-strong); padding-top: 10px; }
.impact-strip span { display: block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.impact-strip strong { font-family: var(--font-display); font-size: .96rem; color: var(--ink); }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--green-2), transparent); opacity: .0; }
.workflow-theater.scanning .scan-line { animation: scan 1s ease; }
@keyframes scan { 0%{opacity:.9;top:0} 100%{opacity:0;top:100%} }

.theater-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--muted); cursor: pointer; transition: .15s;
}
.chip:hover { color: var(--ink); border-color: var(--green-2); }
.chip.active { background: var(--green-2); color: var(--btn-ink); border-color: var(--green-2); }

/* ---- Trust ticker -------------------------------------------------------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; overflow: hidden; }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; width: max-content; animation: marquee 32s linear infinite; }
.ticker-track span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; letter-spacing: -.01em; }
.ticker-track span::before { content: "✦"; color: var(--brass); font-size: .8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.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(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; height: 100%; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--green-2) 12%, transparent);
  color: var(--green-2); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--green-2) 30%, transparent);
}
.card .tag { display: inline-block; font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-bottom: 12px; }
a.card { color: inherit; }
a.card:hover { color: inherit; }
.card .arrow { color: var(--green-2); font-weight: 600; margin-top: 16px; display: inline-block; transition: transform .2s; }
a.card:hover .arrow { transform: translateX(5px); }

/* ---- Stats --------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 24px 14px; border-left: 2px solid var(--line-strong); }
.stat:first-child { border-left: 0; }
.stat .n { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.stat .l { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ---- Timeline ------------------------------------------------------------ */
.timeline { display: grid; gap: 0; max-width: 840px; margin: 0 auto; }
.timeline .step { display: grid; grid-template-columns: 58px 1fr; gap: 22px; padding-bottom: 36px; position: relative; }
.timeline .step:not(:last-child)::before { content:""; position:absolute; left:28px; top:56px; bottom:0; width:2px; background: var(--line-strong); }
.timeline .step .num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--btn-ink); background: var(--green-2); }
.timeline .step p { color: var(--muted); }

/* ---- CTA band ------------------------------------------------------------ */
.cta-band { background: var(--green); color: #EAF3EC; border-radius: 24px; padding: 64px 44px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(234,243,236,.82); max-width: 560px; margin: 0 auto 24px; font-size: 1.1rem; }

/* ---- Prose --------------------------------------------------------------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--body); }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; border: 1px solid var(--line); }

/* ---- Founder ------------------------------------------------------------- */
.founder { display: grid; grid-template-columns: 168px 1fr; gap: 34px; align-items: center; }
.founder .avatar {
  width: 160px; height: 160px; border-radius: 20px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--btn-ink);
  background: var(--green-2); letter-spacing: -.04em;
}
.founder .avatar span { color: var(--btn-ink); }

/* ---- Live demo ----------------------------------------------------------- */
.demo-wrap { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); max-width: 900px; margin: 0 auto; }
.demo-providers { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.demo-out {
  margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; display: none;
}
.demo-out.show { display: block; }
.demo-grid { display: grid; gap: 14px; }
.diag { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); }
.diag .n-label { display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); margin-bottom: 6px; }
.diag p { margin: 0; color: var(--body); font-size: .95rem; }
.diag ul { margin: 4px 0 0; padding-left: 18px; color: var(--body); font-size: .95rem; }
.demo-note { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-top: 14px; }
.demo-loading { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; }
.demo-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); animation: pulse 1.2s infinite; }
.demo-loading span:nth-child(2){animation-delay:.2s}.demo-loading span:nth-child(3){animation-delay:.4s}

/* ---- Forms --------------------------------------------------------------- */
.form-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .9rem; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); margin-bottom: 16px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 18%, transparent); }
textarea { min-height: 120px; resize: vertical; }

/* ---- Slots --------------------------------------------------------------- */
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.slot { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 16px; background: var(--surface); transition: .2s; }
.slot:hover { border-color: var(--green-2); }
.slot .time { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.slot .loc { color: var(--muted); font-size: .86rem; }

/* ---- Flash --------------------------------------------------------------- */
.flashes { position: fixed; top: 86px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 350px; }
.flash { padding: 13px 17px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 500; box-shadow: var(--shadow); border: 1px solid var(--line-strong); background: var(--surface); }
.flash.success { border-left: 3px solid var(--green-2); }
.flash.danger { border-left: 3px solid #c0492f; }
.flash.warning { border-left: 3px solid var(--brass); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 30px; background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 40px; }
.site-footer h4 { font-family: var(--font-display); color: var(--ink); font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: var(--muted); display: block; padding: 5px 0; font-size: .92rem; }
.site-footer a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); }

/* ---- Reveal -------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"]{transition-delay:.06s}[data-delay="2"]{transition-delay:.12s}[data-delay="3"]{transition-delay:.18s}[data-delay="4"]{transition-delay:.24s}

.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:28px}.mt-4{margin-top:46px}.mb-0{margin-bottom:0}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 940px) {
  .hero { padding: 18px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat, .stat:first-child { border-left: 0; }
  .founder { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 74px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 18px 26px; border-bottom: 1px solid var(--line); gap: 14px; box-shadow: var(--shadow); }
  .nav-toggle { display: block; }
  .section { padding: 70px 0; }
  .cta-band { padding: 44px 24px; }
}
@media (max-width: 560px) {
  .nav { height: 64px; }
  .hero { padding-top: 8px; }
  .hero-grid { gap: 24px; }
  .hero-badge { margin-bottom: 14px; }
  .hero-cta { margin-top: 22px; }
  .hero-badges { margin-top: 22px; gap: 14px; }
  .workflow-theater { padding: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .impact-strip { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .wordmark { font-size: 1.2rem; }
  .nav-cta .btn-primary { display: none; }   /* keep the header uncluttered on phones */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
