/* Auxeon Custom CRM Builder — bespoke landing styles (PRD-021).
   Self-contained, no build step. Distinct from the voice-agent theme. */

:root {
  /* raw tokens */
  --charcoal: #15171c;
  --charcoal-2: #1d2026;
  --charcoal-3: #262a31;
  --cream: #f6f2ea;
  --paper: #fbfaf6;
  --ink: #16171b;
  --clay: #c8623b;
  --clay-soft: #d98a5f;
  --gold: #d8a657;
  --muted-d: #9aa0aa;   /* muted text on dark */
  --muted-l: #6a6862;   /* muted text on light */
  --line-d: #2e323a;
  --line-l: #e7e0d4;

  /* semantic */
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--charcoal); color: var(--cream);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--clay); color: #fff; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 540; line-height: 1.08; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(38px, 6.4vw, 76px); }
h2 { font-size: clamp(30px, 4.6vw, 52px); }
h3 { font-size: clamp(20px, 2.6vw, 27px); }
.eyebrow { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin: 0 0 18px; }
.lede { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; color: var(--muted-d); max-width: 56ch; }
.section--light .lede, .section--cream .lede { color: var(--muted-l); }
strong { font-weight: 650; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.section { padding: clamp(64px, 9vw, 132px) 0; position: relative; }
.section--light { background: var(--paper); color: var(--ink); }
.section--cream { background: var(--cream); color: var(--ink); }
.section--dark { background: var(--charcoal); color: var(--cream); }
.section--char2 { background: var(--charcoal-2); color: var(--cream); }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--text-r { grid-template-columns: 0.95fr 1.05fr; }
.stack > * + * { margin-top: 22px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-body); font-weight: 600; font-size: 16px; padding: 14px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, filter .15s ease, background .15s ease, color .15s ease; }
.btn--primary { background: var(--clay); color: #fff; }
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; opacity: .9; }
.btn--ghost:hover { opacity: 1; transform: translateY(-1px); }
.btn--lg { padding: 17px 30px; font-size: 17px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(21,23,28,.82); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line-d); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__brand { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; text-decoration: none; color: var(--cream); }
.nav__brand b { color: var(--clay); }
.nav__links { display: flex; gap: 26px; align-items: center; }
.nav__links a { text-decoration: none; font-size: 14.5px; color: var(--muted-d); transition: color .15s; }
.nav__links a:hover, .nav__links a.active { color: var(--cream); }
.nav__cta { display: inline-flex; }
.nav__burger { display: none; background: none; border: 0; color: var(--cream); cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 104px); }
.hero h1 span { color: var(--clay); }
.hero__sub { margin-top: 24px; }
.hero__cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__note { margin-top: 18px; font-size: 14px; color: var(--muted-d); }
.hero__art { position: relative; }

/* browser-frame mock for screenshots */
.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-d); background: var(--charcoal-2); box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.section--light .frame, .section--cream .frame { border-color: var(--line-l); box-shadow: 0 30px 70px -34px rgba(40,30,20,.35); }
.frame__bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: var(--charcoal-3); border-bottom: 1px solid var(--line-d); }
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3f48; display: block; }
.frame__bar i:nth-child(1){ background:#e0664f; } .frame__bar i:nth-child(2){ background:#e0b04f; } .frame__bar i:nth-child(3){ background:#5fae7a; }
.frame__url { margin-left: 10px; font-size: 12px; color: var(--muted-d); font-family: ui-monospace, monospace; }
.frame__body { padding: 0; background: var(--charcoal); }

/* placeholder "screenshot" composition */
.shot { padding: 18px; display: grid; gap: 12px; }
.shot__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 13px 15px; background: var(--charcoal-2); border: 1px solid var(--line-d); border-radius: 10px; }
.shot__row b { font-family: var(--font-body); font-weight: 600; font-size: 14px; }
.shot__row small { color: var(--muted-d); font-size: 12px; }
.shot__score { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--clay-soft); padding: 4px 10px; border: 1px solid var(--line-d); border-radius: 999px; }
.shot__cols { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.shot__col { background: var(--charcoal-2); border: 1px solid var(--line-d); border-radius: 10px; padding: 10px; min-height: 120px; }
.shot__col h5 { margin: 0 0 8px; font-family: var(--font-body); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-d); }
.shot__chip { font-size: 12px; padding: 7px 9px; border-radius: 7px; background: var(--charcoal-3); margin-bottom: 7px; border: 1px solid var(--line-d); }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: 44px; background: var(--line-l); border: 1px solid var(--line-l); border-radius: 14px; overflow: hidden; }
.section--dark .stats { background: var(--line-d); border-color: var(--line-d); }
.stat { background: var(--paper); padding: 30px 24px; }
.section--dark .stat { background: var(--charcoal); }
.stat__num { font-family: var(--font-display); font-size: clamp(36px, 4.6vw, 54px); line-height: 1; color: var(--clay); letter-spacing: -.02em; }
.stat__label { font-size: 14px; color: var(--muted-l); margin-top: 14px; line-height: 1.45; }
.section--dark .stat__label { color: var(--muted-d); }

/* ---------- before / after ---------- */
.ba { position: relative; user-select: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-d); height: clamp(330px, 44vw, 460px); background: var(--charcoal); }
.ba__pane { position: absolute; inset: 0; padding: 24px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ba__after { background: var(--charcoal); }
.ba__before { background: #eae6dd; color: #3c3a31; clip-path: inset(0 50% 0 0); }
.ba__tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.ba__after .ba__tag { border: 1px solid var(--line-d); color: var(--muted-d); }
.ba__before .ba__tag { background: #d9d3c5; color: #5e5849; }
.sheet { margin-top: 6px; border: 1px solid #cdc7b9; border-radius: 7px; overflow: hidden; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; background: #fff; }
.sheet__row { display: grid; grid-template-columns: 26px repeat(4,1fr); }
.sheet__row > div { border-right: 1px solid #ddd7c9; border-bottom: 1px solid #ddd7c9; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__row > div:last-child { border-right: 0; }
.sheet__row.head > div { background: #ddd7c9; font-weight: 700; text-align: center; color: #6f6857; }
.sheet__row .rh { background: #ddd7c9; text-align: center; color: #8b8472; }
.sheet .err { color: #b23b2e; font-weight: 700; }
.sheet .empty { color: #bdb6a5; }
.ba__divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--clay); transform: translateX(-1px); z-index: 3; }
.ba__handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 42px; height: 42px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; cursor: ew-resize; z-index: 4; box-shadow: 0 6px 18px rgba(0,0,0,.4); }

/* ---------- about credentials ---------- */
.cred { border: 1px solid var(--line-l); border-radius: var(--radius); background: var(--cream); padding: 4px 26px; }
.cred__item { display: grid; grid-template-columns: 70px 1fr; gap: 16px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line-l); }
.cred__item:last-child { border-bottom: 0; }
.cred__item .k { font-family: var(--font-display); font-size: 32px; color: var(--clay); line-height: 1; }
.cred__item b { font-family: var(--font-body); font-weight: 650; display: block; font-size: 16px; }
.cred__item small { color: var(--muted-l); font-size: 13.5px; }

/* ---------- embedded apply form ---------- */
.applyform { border: 1px solid var(--line-d); border-radius: var(--radius); background: var(--charcoal-2); padding: clamp(22px,4vw,34px); }
.applyform .field { display: grid; gap: 7px; margin-bottom: 16px; }
.applyform label { font-size: 14px; font-weight: 600; }
.applyform label .opt { color: var(--muted-d); font-weight: 400; }
.applyform input, .applyform select, .applyform textarea { font: inherit; color: var(--cream); background: var(--charcoal-3); border: 1px solid var(--line-d); border-radius: 10px; padding: 12px 13px; width: 100%; }
.applyform input:focus, .applyform select:focus, .applyform textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(200,98,59,.18); }
.applyform textarea { resize: vertical; min-height: 58px; }
.applyform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.applyform .status { border-radius: 10px; padding: 13px 15px; font-size: 14.5px; display: none; margin-top: 8px; }
.applyform .status.show { display: block; }
.applyform .status.ok { background: rgba(95,174,122,.14); color: #8fd0a6; border: 1px solid rgba(95,174,122,.32); }
.applyform .status.err { background: rgba(178,59,46,.14); color: #e8a99f; border: 1px solid rgba(178,59,46,.32); }
.applyform .fine { font-size: 12.5px; color: var(--muted-d); margin: 6px 0 0; }
.btn--full { width: 100%; justify-content: center; }

/* ---------- domino flow ---------- */
.flow { margin-top: 8px; }
.flow__diagram { display: flex; gap: 0; align-items: stretch; flex-wrap: wrap; }
.flow__node { flex: 1 1 0; min-width: 150px; position: relative; padding: 20px 18px; border-radius: 12px; border: 1px solid var(--line-l); background: #fff; margin: 8px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease; }
.section--dark .flow__node { background: var(--charcoal-2); border-color: var(--line-d); }
.flow__node.lit { border-color: var(--clay); box-shadow: 0 12px 30px -14px rgba(200,98,59,.6); transform: translateY(-4px); }
.flow__node .n { font-family: var(--font-display); font-size: 14px; color: var(--clay); }
.flow__node h4 { margin: 6px 0 4px; font-family: var(--font-body); font-weight: 650; font-size: 16px; }
.flow__node p { margin: 0; font-size: 13.5px; color: var(--muted-l); }
.section--dark .flow__node p { color: var(--muted-d); }
.flow__node::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--muted-l); font-size: 18px; z-index: 2; }
.flow__node:last-child::after { display: none; }
.flow__controls { margin-top: 18px; display: flex; gap: 12px; align-items: center; }

/* ---------- flip cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 32px; }
.flip { background: transparent; perspective: 1200px; min-height: 184px; cursor: pointer; }
.flip__inner { position: relative; height: 100%; transition: transform .55s cubic-bezier(.3,.8,.3,1); transform-style: preserve-3d; }
.flip.flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius); border: 1px solid var(--line-l); padding: 22px; display: flex; flex-direction: column; }
.section--dark .flip__face { border-color: var(--line-d); }
.flip__front { background: var(--paper); }
.section--dark .flip__front { background: var(--charcoal-2); }
.flip__back { background: var(--clay); color: #fff; transform: rotateY(180deg); }
.flip__face h3 { font-size: 21px; }
.flip__face p { font-size: 14.5px; margin: 10px 0 0; }
.flip__front .ico { width: 30px; height: 30px; color: var(--clay); margin-bottom: 12px; }
.flip__hint { margin-top: auto; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-l); }
.section--dark .flip__front .flip__hint { color: var(--muted-d); }

.ind { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 38px; }
.ind__card { border: 1px solid var(--line-l); border-radius: 12px; padding: 18px; background: var(--paper); transition: border-color .2s, transform .2s; }
.section--dark .ind__card { background: var(--charcoal-2); border-color: var(--line-d); }
.ind__card:hover { border-color: var(--clay); transform: translateY(-3px); }
.ind__card .ico { width: 24px; height: 24px; color: var(--clay); }
.ind__card h4 { margin: 12px 0 5px; font-family: var(--font-body); font-weight: 650; font-size: 16px; }
.ind__card p { margin: 0; font-size: 13.5px; color: var(--muted-l); }
.section--dark .ind__card p { color: var(--muted-d); }

/* ---------- calculator ---------- */
.calc { border: 1px solid var(--line-d); border-radius: var(--radius); background: var(--charcoal-2); padding: clamp(22px, 4vw, 38px); margin-top: 40px; }
.calc__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.calc__field { margin-bottom: 22px; }
.calc__field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.calc__field .val { color: var(--clay); }
.calc input[type=range] { width: 100%; accent-color: var(--clay); }
.calc select { width: 100%; padding: 12px; border-radius: 10px; background: var(--charcoal-3); color: var(--cream); border: 1px solid var(--line-d); font: inherit; }
.calc input[type=number] { width: 100%; padding: 12px; border-radius: 10px; background: var(--charcoal-3); color: var(--cream); border: 1px solid var(--line-d); font: inherit; }
.calc input[type=number]:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(200,98,59,.18); }
.calc__toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted-d); margin-top: 6px; cursor: pointer; }
.calc__out { display: grid; gap: 12px; }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: 10px; background: var(--charcoal-3); border: 1px solid var(--line-d); }
.calc__row.win { border-color: var(--clay); background: rgba(200,98,59,.1); }
.calc__row .who { font-weight: 600; font-size: 14.5px; }
.calc__row .who small { display: block; color: var(--muted-d); font-weight: 400; font-size: 12px; }
.calc__row .amt { font-family: var(--font-display); font-size: 26px; }
.calc__row.win .amt { color: var(--clay-soft); }
.calc__delta { font-size: 13px; color: var(--muted-d); margin-top: 4px; }
.calc__note { font-size: 12px; color: var(--muted-d); margin-top: 16px; }

/* ---------- offer ---------- */
.offer { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px,5vw,64px); align-items: start; margin-top: 40px; }
.offer__card { border: 1px solid var(--line-l); border-radius: var(--radius); padding: clamp(26px,4vw,40px); background: var(--paper); position: relative; }
.offer__price { font-family: var(--font-display); font-size: clamp(46px,7vw,68px); line-height: 1; }
.offer__price span { font-size: 18px; color: var(--muted-l); font-family: var(--font-body); }
.offer__spots { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--clay); padding: 6px 13px; border: 1px solid var(--clay); border-radius: 999px; }
.checklist { list-style: none; padding: 0; margin: 20px 0; }
.checklist li { position: relative; padding-left: 30px; margin: 12px 0; font-size: 15.5px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--clay); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat; }
.steps { counter-reset: s; margin-top: 8px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-l); }
.section--dark .step { border-color: var(--line-d); }
.step .num { counter-increment: s; font-family: var(--font-display); font-size: 22px; color: var(--clay); }
.step .num::before { content: counter(s); }
.step h4 { margin: 0 0 3px; font-family: var(--font-body); font-weight: 650; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--muted-l); }
.section--dark .step p { color: var(--muted-d); }

/* ---------- faq ---------- */
.faq { margin-top: 36px; border-top: 1px solid var(--line-l); }
.section--dark .faq { border-color: var(--line-d); }
.faq__item { border-bottom: 1px solid var(--line-l); }
.section--dark .faq__item { border-color: var(--line-d); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font-family: var(--font-display); font-size: clamp(18px,2.2vw,22px); padding: 22px 40px 22px 0; color: inherit; position: relative; }
.faq__q::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--clay); font-size: 26px; transition: transform .2s; }
.faq__item.open .faq__q::after { content: "−"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { margin: 0 0 22px; color: var(--muted-l); max-width: 70ch; }
.section--dark .faq__a p { color: var(--muted-d); }

/* ---------- final cta + footer ---------- */
.final { text-align: left; }
.final h2 { max-width: 16ch; }
.foot { background: #101216; color: var(--muted-d); padding: 40px 0; font-size: 14px; border-top: 1px solid var(--line-d); }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted-d); text-decoration: none; }
.foot a:hover { color: var(--cream); }

.backtop { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--clay); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.backtop.show { opacity: 1; pointer-events: auto; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split, .split--text-r, .calc__grid, .offer { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .ind { grid-template-columns: 1fr 1fr; }
  .shot__cols { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .nav__links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--charcoal-2); padding: 18px var(--gut); border-bottom: 1px solid var(--line-d); gap: 18px; }
  .nav__burger { display: inline-flex; }
  .flow__node::after { content: "↓"; right: 50%; top: auto; bottom: -20px; transform: translateX(50%); }
}
@media (max-width: 560px) {
  .stats, .grid-3, .grid-2, .ind { grid-template-columns: 1fr; }
  .nav__cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
