/* Seraph Ai: shared styles for index, training and bookkeeping pages */
:root {
  --gold: #c9a961;
  --gold-deep: #8f7226;
  --night: #0c1626;
  --ink: #12192a;

  /* dark is the default */
  --bg: var(--night);
  --panel-solid: #162032;
  --line: #26324a;
  --head: #f0e7d2;
  --body: #b9c0cf;
  --muted: #8b93a5;
  --accent: var(--gold);
  --btn-text: #0c1626;
  --mark-opacity: .10;
  --tint-a: rgba(47, 130, 145, .13);
  --tint-b: rgba(122, 99, 192, .11);

  --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', Consolas, 'SF Mono', Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf8f3; --panel-solid: #ffffff; --line: #e0dbcd;
    --head: #12192a; --body: #3c4557; --muted: #6d7486;
    --accent: var(--gold-deep); --btn-text: #ffffff;
    --mark-opacity: .16;
    --tint-a: rgba(47, 130, 145, .07); --tint-b: rgba(122, 99, 192, .06);
  }
}
:root[data-theme="light"] {
  --bg: #faf8f3; --panel-solid: #ffffff; --line: #e0dbcd;
  --head: #12192a; --body: #3c4557; --muted: #6d7486;
  --accent: var(--gold-deep); --btn-text: #ffffff;
  --mark-opacity: .16;
  --tint-a: rgba(47, 130, 145, .07); --tint-b: rgba(122, 99, 192, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 1.15rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; z-index: -2; pointer-events: none;
  top: -12vmin; right: -14vmin; width: 78vmin; height: 78vmin;
  background: url('/logo.png') no-repeat center / contain; opacity: var(--mark-opacity);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60rem 42rem at 88% -10%, var(--tint-a), transparent 60%),
    radial-gradient(52rem 40rem at -12% 110%, var(--tint-b), transparent 60%);
}
h1, h2, h3 { font-family: var(--serif); color: var(--head); font-weight: 400; margin: 0; text-wrap: balance; }
a { color: var(--accent); }
.shell { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
section { padding: clamp(3.5rem, 8vh, 6rem) 0; border-top: 1px solid var(--line); }
.sect-head { font-size: clamp(2.1rem, 4vw, 2.8rem); margin-bottom: .8rem; }
.lead { max-width: 40rem; margin: 0 0 2rem; }
.acc { color: var(--accent); }

/* nav */
nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
      max-width: 68rem; margin: 0 auto; padding: 1.4rem clamp(1.25rem, 4vw, 3rem); }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand .name { font-family: var(--serif); font-size: 1.35rem; color: var(--head); letter-spacing: .02em; }
.brand .name .acc { color: var(--accent); }
.brand .tag { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em;
              text-transform: uppercase; color: var(--muted); margin-top: .1rem; white-space: nowrap; }
.navr { display: flex; align-items: center; gap: 1.4rem; }
.navr .lnk { color: var(--head); text-decoration: none; font-size: .95rem; }
.navr .lnk:hover { color: var(--accent); }
.cta { display: inline-block; background: var(--accent); color: var(--btn-text); text-decoration: none; font-weight: 600;
       padding: .7rem 1.4rem; border-radius: 2px; font-size: .95rem; white-space: nowrap; }
.cta:hover { filter: brightness(1.08); }
.ghost { color: var(--head); text-decoration: none; font-size: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .2rem; }

/* hero */
.hero { border-top: none; padding-top: clamp(2rem, 5vh, 4rem); padding-bottom: clamp(3.5rem, 8vh, 6rem); }
.hero .eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 1.2rem; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); line-height: 1.05; letter-spacing: -.015em; max-width: 56rem; }
.hero .say { font-size: clamp(1.25rem, 2.4vw, 1.55rem); color: var(--body); max-width: 44rem; margin: 1.8rem 0 0; }
.hero .acts { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 2.5rem; align-items: center; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--panel-solid); padding: 1.6rem 1.4rem; }
.stat .big { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); line-height: 1; }
.stat p { margin: .7rem 0 .6rem; font-size: 1rem; color: var(--head); }
.stat .src { font-size: .78rem; color: var(--muted); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats.three { grid-template-columns: 1fr; } }

/* steps */
.steps { display: grid; }
.step { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.5rem; padding: 2.2rem 0; border-bottom: 1px solid var(--line); }
.step:first-child { border-top: 1px solid var(--line); }
.step .n { font-family: var(--serif); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.step h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.step p { margin: 0; font-size: 1.15rem; max-width: 42rem; }

/* cards */
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .jobs { grid-template-columns: repeat(2, 1fr); } }
.job { background: var(--panel-solid); padding: 1.6rem 1.5rem; }
.job h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.job p { margin: 0; font-size: 1rem; color: var(--muted); }

/* two doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.door { display: block; text-decoration: none; background: var(--panel-solid); border: 1px solid var(--line);
        padding: 2rem 1.8rem; transition: border-color .15s; }
.door:hover { border-color: var(--accent); }
.door .k { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.door h3 { font-size: 1.9rem; margin: .7rem 0 .6rem; }
.door p { margin: 0 0 1.2rem; color: var(--body); font-size: 1.05rem; }
.door .go { color: var(--accent); font-weight: 600; font-size: 1rem; }
@media (max-width: 820px) { .doors { grid-template-columns: 1fr; } }

/* case */
.case { background: var(--panel-solid); border: 1px solid var(--line); padding: clamp(1.8rem, 4vw, 3rem); }
.case .quote { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--head); line-height: 1.25; margin: 0 0 1.5rem; }
.case p { margin: 0 0 1rem; }
.case .figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.8rem 0 .5rem; }
.case .figs div { border-top: 1px solid var(--line); padding-top: .8rem; }
.case .figs b { display: block; font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--accent); line-height: 1.1; }
.case .figs span { font-size: .92rem; color: var(--muted); }
.case .who { font-size: .95rem; color: var(--muted); margin-top: 1.2rem; }
@media (max-width: 820px) { .case .figs { grid-template-columns: repeat(2, 1fr); } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { border: 1px solid var(--line); background: var(--panel-solid); color: var(--head); padding: .45rem .95rem; border-radius: 999px; font-size: .98rem; }

/* ticks */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.ticks li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); color: var(--head); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: "\2713"; color: var(--accent); font-size: 1.2rem; line-height: 1.5; }
.ticks li span { color: var(--body); display: block; font-size: 1rem; }

/* compare */
.compare { width: 100%; border-collapse: collapse; background: var(--panel-solid); border: 1px solid var(--line); }
.compare th, .compare td { text-align: left; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 1.02rem; }
.compare th { font-family: var(--serif); font-weight: 400; color: var(--head); font-size: 1.2rem; }
.compare td:first-child { color: var(--muted); width: 30%; }
.compare td.us { color: var(--head); }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.35rem; color: var(--head); list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: .8rem 0 0; max-width: 44rem; }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1000px) { .prices { grid-template-columns: repeat(2, 1fr); } }
.price { background: var(--panel-solid); padding: 1.8rem 1.6rem; }
.price .stage { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.price .fig { font-family: var(--serif); font-size: 2rem; color: var(--head); margin: .6rem 0 .5rem; line-height: 1.15; }
.price .fig small { font-family: var(--sans); font-size: .8rem; color: var(--muted); display: block; margin-top: .25rem; }
.price p { margin: 0; font-size: 1rem; color: var(--muted); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); gap: 3rem; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.form { background: var(--panel-solid); border: 1px solid var(--line); padding: 1.8rem; display: grid; gap: 1rem; position: relative; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 2px; color: var(--head);
  font-family: var(--sans); font-size: 1rem; padding: .75rem .85rem; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 7rem; resize: vertical; }
.form button { background: var(--accent); color: var(--btn-text); border: none; border-radius: 2px;
               padding: .8rem 1.6rem; font-size: 1rem; font-weight: 600; font-family: var(--sans); cursor: pointer; justify-self: start; }
.fine { font-size: .85rem; color: var(--muted); margin: 0; }
.channel { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; font-size: 1rem; }
.channel a { font-family: var(--mono); font-size: .95rem; text-decoration: none; }

footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: .85rem; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* cookie bar */
#cookieBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--panel-solid);
  border-top: 1px solid var(--line); padding: 1rem clamp(1.25rem,4vw,3rem); display: none;
  gap: 1.2rem; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .9rem; }
#cookieBar.show { display: flex; }
#cookieBar p { margin: 0; max-width: 44rem; }
#cookieBar button { font-family: var(--sans); font-size: .85rem; padding: .5rem 1.1rem; border-radius: 2px;
  cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--body); }
#cookieBar button.ok { background: var(--accent); color: var(--btn-text); border-color: var(--accent); font-weight: 600; }

/* phones */
@media (max-width: 700px) {
  body { font-size: 1.15rem; line-height: 1.55; }
  .shell { padding: 0 1rem; }
  nav { padding: 1rem; }
  .navr .lnk { display: none; }
  nav .cta { padding: .6rem 1rem; font-size: .88rem; }
  .brand .name { font-size: 1.2rem; }
  .brand .tag { font-size: .66rem; }
  section { padding: 3.2rem 0; }
  .hero h1 { font-size: 2.6rem; line-height: 1.08; }
  .hero .say { font-size: 1.2rem; }
  .hero .acts .cta { width: 100%; text-align: center; padding: 1rem 1.4rem; font-size: 1.1rem; }
  .sect-head { font-size: 2.1rem; line-height: 1.15; }
  .stats, .stats.three { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: .4rem; }
  .step .n { font-size: 1.6rem; }
  .step h3 { font-size: 1.8rem; }
  .jobs, .prices { grid-template-columns: 1fr; }
  .compare td:first-child { width: 38%; }
  .compare th, .compare td { padding: .8rem .7rem; font-size: .95rem; }
  .form { padding: 1.3rem; }
  .form button { width: 100%; padding: 1rem; font-size: 1.1rem; }
  .foot-row { flex-direction: column; gap: .5rem; }
  body::before { width: 92vmin; height: 92vmin; top: -8vmin; right: -22vmin; opacity: calc(var(--mark-opacity) * .8); }
}
