/* ============ Fonts (self-hosted: Roboto, Google's open typeface) ============ */
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Roboto Mono"; src: url("/assets/fonts/roboto-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ============ Tokens ============ */
:root {
  --porcelain: #F0EEE6;   /* ivory page */
  --paper: #FAF9F5;       /* cards, ticket */
  --ink: #141413;         /* near-black */
  --ink-soft: #5E5D59;    /* secondary text */
  --go: #5A7A52;          /* verified / paid, muted sage */
  --signal: #D97757;      /* clay accent, small doses */
  --line: #E0DDD3;
  --display: "Roboto", -apple-system, "Segoe UI", sans-serif;
  --body: "Roboto", -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", monospace;
  --radius: 12px;
  --shell: 1120px;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
}
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
h1, h2 { font-family: var(--display); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.7rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-family: var(--body); font-size: 1.1rem; font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 14px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 9px; vertical-align: 1px; }
.lede, .section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--signal); border-color: var(--signal); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.92rem; }

/* ============ Top bar ============ */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(240,238,230,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.topnav { display: flex; gap: 22px; margin-left: auto; }
.topnav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); }
.topnav a:hover { color: var(--ink); }

.beacon-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(217,119,87,0.5);
  animation: pulse 2.4s ease-out infinite;
  flex: none;
}
.beacon-dot.sm { width: 9px; height: 9px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217,119,87,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(217,119,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,119,87,0); }
}

/* ============ Hero ============ */
.hero { padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 18px; flex-wrap: wrap; }
.hero-note { font-size: 0.9rem; color: var(--ink-soft); }

/* ============ Ticket (signature element) ============ */
.ticket-wrap { display: flex; justify-content: center; }
.ticket {
  width: min(400px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 40px -24px rgba(20,20,19,0.28);
  font-family: var(--mono);
  font-size: 0.84rem;
  transform: rotate(-1.2deg);
}
.ticket-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--line);
  letter-spacing: 0.08em;
}
.ticket-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.ticket-id { color: var(--ink-soft); }
.ticket-body { padding: 16px 18px 8px; }
.t-row {
  display: flex; gap: 12px; margin-bottom: 12px;
  opacity: 0; transform: translateY(6px);
  animation: rowIn .5s ease forwards;
  animation-delay: var(--d, 0s);
}
.t-label { color: var(--ink-soft); flex: none; }
.t-ok { color: var(--go); }
.t-row strong { font-weight: 500; color: var(--ink); }
.t-ok strong { color: var(--go); }
@keyframes rowIn { to { opacity: 1; transform: translateY(0); } }

.ticket-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 18px;
  border-top: 1px dashed var(--line);
}
.stamp {
  display: inline-block;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--go);
  border: 2.5px solid var(--go);
  border-radius: 4px;
  padding: 5px 10px;
  transform: rotate(-6deg) scale(1.6);
  opacity: 0;
  animation: stampIn .35s cubic-bezier(.2,1.4,.4,1) forwards;
  animation-delay: var(--d, 3.8s);
}
@keyframes stampIn { to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.ticket-meta { color: var(--ink-soft); font-size: 0.78rem; }

/* ============ Sections ============ */
.section { padding: 88px 0; border-top: 1px solid var(--line); background: var(--porcelain); }

.steps {
  list-style: none;
  padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  counter-reset: none;
}
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.step-k { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--signal); display: block; margin-bottom: 12px; }
.steps p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ============ Night band ============ */
.night { background: var(--ink); color: #F0EEE6; padding: 84px 0; }
.night-inner { max-width: 800px; }
.night-q { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.25; margin-bottom: 18px; }
.night-a { color: #A9A7A0; font-size: 1.1rem; margin: 0; }
.night-a::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); margin-right: 12px; vertical-align: 1px; }

/* ============ Benefits ============ */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.benefits article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.benefits p { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

/* ============ Dashboard funnel ============ */
.dash-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.funnel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: 0 20px 40px -26px rgba(20,20,19,0.25);
}
.f-head { display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; color: var(--ink-soft); border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 90px 34px; gap: 12px; align-items: center; margin-bottom: 13px; }
.f-stage { line-height: 1.35; }
.f-stage em { font-style: normal; color: var(--ink-soft); display: block; font-size: 0.72rem; }
.f-bar { display: block; height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--w), #E7E4DA var(--w)); }
.f-n { text-align: right; color: var(--ink-soft); }
.f-paid .f-bar { background: linear-gradient(to right, var(--go) var(--w), #E7E4DA var(--w)); }
.f-paid .f-stage, .f-paid .f-n { color: var(--go); font-weight: 500; }

/* ============ Demo / form ============ */
.demo { background: #FFFFFF; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.demo-note { font-size: 0.9rem; color: var(--ink-soft); border-left: 2px solid var(--signal); padding-left: 14px; }
.cohort-note { font-size: 0.95rem; color: var(--ink); background: #E9E6DC; border-radius: 8px; padding: 12px 16px; display: inline-block; }

form { background: var(--porcelain); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0 0 6px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(217,119,87,0.35); border-color: var(--signal); }
textarea { resize: vertical; }
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E5D59' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}
select:invalid { color: #8A8880; }
select option { color: var(--ink); }
#platformField { animation: fieldIn .25s ease; }
@keyframes fieldIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
form .btn { width: 100%; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; margin: 0; padding: 0; border: 0; }
.form-status { margin: 12px 0 0; font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: var(--go); font-weight: 600; }
.form-status.err { color: #B4231F; font-weight: 600; }

.integrations { font-size: 0.95rem; color: var(--ink-soft); margin-top: 22px; }
.integrations a { color: var(--signal); font-weight: 600; }
.int-badge { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); background: #E7E4DA; border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; margin-right: 8px; vertical-align: 1px; }

.opt { font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }
.form-success {
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
}
.success-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--go); color: #fff;
  font-size: 1.6rem; font-weight: 700;
  margin-bottom: 18px;
}
.form-success h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.form-success p { color: var(--ink-soft); margin: 0 0 8px; }
.success-sub { font-size: 0.88rem; }

/* ============ Footer ============ */
.footer { background: var(--porcelain); border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner p { margin: 10px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.fineprint { font-size: 0.8rem; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid, .demo-grid, .dash-grid { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: 1fr; }
  .ticket { transform: rotate(0deg); }
}
@media (max-width: 560px) {
  .topnav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beacon-dot { animation: none; }
  .t-row, .stamp { animation: none; opacity: 1; transform: none; }
  .stamp { transform: rotate(-6deg); }
  .btn { transition: none; }
}
