/* Crodros AI — night workshop. See ../DESIGN.md */

:root {
  --bg: oklch(0.11 0 0);
  --surface: oklch(0.16 0.006 210);
  --surface-2: oklch(0.21 0.008 210);
  --line: oklch(0.28 0.01 210);
  --ink: oklch(0.95 0.004 210);
  --muted: oklch(0.72 0.012 210);
  --steel: oklch(0.68 0.10 210);
  --steel-fill: oklch(0.52 0.10 215); /* button fills: deep enough for white text ≥4.5:1 */
  --steel-deep: oklch(0.45 0.09 215);
  --live: oklch(0.78 0.16 150);
  --lost: oklch(0.70 0.13 25);
  --amber: oklch(0.80 0.13 85);
  --radius: 8px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --chat: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* the work lamp: one soft cone of steel light from above the hero */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 90vh;
  background: radial-gradient(ellipse 70% 55% at 30% -10%, oklch(0.30 0.04 215 / 0.55), transparent 70%);
  pointer-events: none;
}

/* faint grain so the dark surface reads as material, not flat gradient */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}

header, main, footer, .sticky-cta { position: relative; z-index: 2; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--steel-fill);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: var(--steel); }

section, .hero { position: relative; }

/* ---------- header ---------- */

/* sticky, translucent: the booking button never leaves the screen (Linear/Raycast pattern) */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: oklch(0.11 0 0 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(0.28 0.01 210 / 0.5);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark-ai { color: oklch(0.66 0.19 300); } /* matches the logo's violet "AI" */

.mark { width: 34px; height: 34px; flex: none; }
.mark-foot { width: 26px; height: 26px; }

.led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px oklch(0.78 0.16 150 / 0.7);
  display: inline-block;
  flex: none;
}

.led-pulse { animation: pulse 2.4s var(--ease-out) infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px oklch(0.78 0.16 150 / 0.5); }
  50% { box-shadow: 0 0 12px oklch(0.78 0.16 150 / 0.9); }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--steel-fill);
  color: oklch(0.99 0 0);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.15rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.btn:hover { background: oklch(0.57 0.11 213); transform: translateY(-1px); }
.btn:active { background: oklch(0.42 0.09 215); transform: none; }
.btn:focus-visible { outline: 3px solid var(--live); outline-offset: 3px; }

.btn-small { font-size: 1rem; padding: 0.55rem 1.1rem; white-space: nowrap; }
.btn-big { font-size: 1.35rem; padding: 1rem 2.2rem; }

.quiet-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: color 0.2s var(--ease-out);
}
.quiet-link:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 8vh, 6rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.9rem, 6.5vw, 5.25rem);
  margin-bottom: 1.4rem;
}

.steel { color: var(--steel); }

.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  max-width: 34rem;
  margin-bottom: 0.9rem;
}

.lede-sub {
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-proof {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.stars {
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-right: 0.35rem;
}

/* ---------- trade chips (hero demo) ---------- */

.trade-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.8rem 1.2rem 0;
}

.chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.chip:hover { border-color: var(--steel); }
.chip[aria-pressed="true"] { background: var(--steel-fill); border-color: var(--steel-fill); color: white; }
.chip:focus-visible { outline: 3px solid var(--live); outline-offset: 2px; }

/* ---------- mobile sticky booking bar ---------- */

.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: oklch(0.11 0 0 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid oklch(0.28 0.01 210 / 0.6);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}

.sticky-cta .btn {
  display: block;
  text-align: center;
}

.sticky-cta.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .sticky-cta { display: block; }
  .top .btn-small { display: none; } /* the hero button + bottom bar cover it */
}

/* ---------- phone demo ---------- */

.phone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  max-width: 400px;
  width: 100%;
  justify-self: end;
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.45);
  overflow: hidden;
}

.phone-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.phone-bar-label {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--muted);
}

.chat {
  font-family: var(--chat);
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 430px;
}

.bubble {
  max-width: 85%;
  padding: 0.55rem 0.85rem;
  border-radius: 16px;
}

.bubble.out {
  background: var(--steel-deep);
  color: oklch(0.97 0 0);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.bubble.in {
  background: var(--surface-2);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.chat-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.2rem 0;
}

.chat-note.done {
  color: var(--live);
  font-weight: 600;
  padding-top: 0.6rem;
}

/* JS-armed animation: hidden ONLY once .demo-armed is set by script */
.demo-armed [data-step] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.demo-armed [data-step].shown {
  opacity: 1;
  transform: none;
}

.typing {
  align-self: flex-end;
  background: var(--steel-deep);
  border-radius: 16px;
  border-bottom-right-radius: 5px;
  padding: 0.7rem 0.9rem;
  display: flex;
  gap: 4px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.85 0.02 210 / 0.8);
  animation: blink 1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

.replay {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: color 0.2s var(--ease-out);
}
.replay:hover { color: var(--ink); }
.replay[hidden] { display: none; }

/* ---------- shared section rhythm ---------- */

.pricing, .how, .story, .answers, .book {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  margin-bottom: 0.75rem;
}

.section-lede {
  color: var(--muted);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

/* ---------- the cost of a missed call ---------- */

.cost {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.race {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: 3rem;
}

.race-row {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.race-name { font-weight: 600; font-size: 0.95rem; }

.race-bar {
  height: 10px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}

.race-fill { height: 100%; width: 100%; border-radius: 5px; }
.race-crodros { background: var(--live); }
.race-rest { background: var(--lost); }

/* JS arms the race; without JS both bars just sit full with their labels */
.race-armed .race-fill { width: 0; transition: width 1.1s var(--ease-out); }
.race-armed .race-fill.go { width: 100%; }
.race-armed .race-rest { transition-duration: 6s; transition-timing-function: linear; }

.race-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 6.5rem;
  text-align: right;
}
.race-won { color: var(--live); }
.race-lost { color: var(--lost); }

.calc { max-width: 34rem; }

.calc-try { font-weight: 600; margin-bottom: 1rem; }

.calc-field { margin-bottom: 1.2rem; }

.calc-field label { display: block; color: var(--muted); margin-bottom: 0.35rem; }
.calc-field output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.calc-field input[type="range"] {
  width: 100%;
  accent-color: var(--steel-fill);
  cursor: pointer;
}
.calc-field input[type="range"]:focus-visible { outline: 3px solid var(--live); outline-offset: 4px; }

.calc-result { margin-top: 1.6rem; }

.calc-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.calc-fine { color: var(--muted); font-size: 0.9rem; margin-top: 0.8rem; }

.sources {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 44rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

/* ---------- old-quote revival offer ---------- */

.revival {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.revival-panel {
  background: var(--surface);
  border: 1px solid var(--steel-deep);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.revival-copy { max-width: 38rem; }
.revival-copy p { margin-bottom: 0.9rem; }
.revival-copy p:last-child { margin-bottom: 0; }

.revival-fine { color: var(--muted); font-size: 0.95rem; }

.revival .btn { flex: none; }

/* ---------- your tuesday, twice ---------- */

.tuesday {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.tl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
}

.tl-col h3 { font-size: 1.35rem; margin-bottom: 0.8rem; }

.tl ul { list-style: none; }

.tl li {
  display: flex;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.tl time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
  width: 4.2rem;
}

.lost { color: var(--lost); font-weight: 600; }
.won { color: var(--live); font-weight: 600; }

@media (max-width: 700px) {
  .tl { grid-template-columns: 1fr; }
  .race-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .race-time { text-align: left; }
}

/* ---------- pricing ---------- */

.pricing { border-top: 1px solid var(--line); }

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.tier {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.tier-feature {
  background: var(--surface);
  border: 1px solid var(--steel-deep);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  margin-top: -0.5rem;
}

.tier-tag {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  color: var(--live);
  margin-bottom: 0.75rem;
}

.tier h3 { font-size: 1.6rem; margin-bottom: 0.4rem; }

.price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
}

.price-note {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--muted);
}

.tier-line { font-weight: 600; margin-bottom: 0.9rem; }

.tier ul { list-style: none; }

.tier li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.55rem;
  height: 0.14rem;
  background: var(--steel);
}

.pricing-monthly { max-width: 44rem; margin-bottom: 0.5rem; }
.pricing-custom { color: var(--muted); max-width: 44rem; }

/* ---------- how (the one numbered sequence) ---------- */

.how { border-top: 1px solid var(--line); }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.25rem;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--steel);
  display: block;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.steps h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.steps p { color: var(--muted); }

/* ---------- story ---------- */

.story {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(260px, 320px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.story h2 { grid-column: 1 / -1; }

.story-body { max-width: 44rem; }

.rig {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
}

.rig-title {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.rig ul { list-style: none; }

.rig li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.story-body p { margin-bottom: 1.1rem; }

.story-facts {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 1.6rem;
}

/* ---------- answers ---------- */

.answers { border-top: 1px solid var(--line); }

.answers dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.qa {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
}

.qa dt {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.qa dd { color: var(--muted); }

/* ---------- final cta ---------- */

.book {
  border-top: 1px solid var(--line);
  text-align: center;
  padding-bottom: clamp(4rem, 10vh, 7rem);
}

.book h2 { font-size: clamp(2.4rem, 5.5vw, 4rem); }

.book p {
  color: var(--muted);
  max-width: 34rem;
  margin: 1rem auto 2.25rem;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 2.5rem 1.25rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.wordmark-foot {
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.foot-fine { font-size: 0.85rem; margin-top: 0.4rem; }

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .phone { justify-self: center; }
  .tiers { grid-template-columns: 1fr; max-width: 480px; }
  .tier-feature { margin-top: 0; }
  .steps { grid-template-columns: 1fr; max-width: 480px; }
  .story { grid-template-columns: 1fr; }
  .rig { max-width: 480px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led-pulse, .typing i { animation: none; }
  .btn, .quiet-link, .replay, .chip, .sticky-cta { transition: none; }
  .demo-armed [data-step] { opacity: 1; transform: none; transition: none; }
  .race-armed .race-fill { transition: none; width: 100%; }
}
