/* Linepost marketing site — tokens are the product portal's own design system (docs/ui-ux.md) */
:root {
  --bg: #0f1117;          /* night exchange */
  --panel: #181b24;       /* surface */
  --card: #1c1f2b;
  --line: #2a2e3d;        /* hairline */
  --blue: #4f8cff;        /* Linepost blue */
  --blue-soft: rgba(79, 140, 255, 0.13);
  --green: #34d399;       /* answered / online */
  --text: #e4e7ef;
  --muted: #9298a8;
  --sans: "DM Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--mono); }

h1, h2, h3 { line-height: 1.08; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.7rem, 6.5vw, 4.4rem); font-weight: 900; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 850; letter-spacing: -0.028em; }
h3 { font-size: 1.07rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--blue); }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 23, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.wordmark {
  font-weight: 850; font-size: 1.28rem; letter-spacing: -0.03em;
  color: var(--text); text-decoration: none; margin: 0;
}
.wordmark .dot { color: var(--blue); }
.top-nav { display: flex; gap: 26px; margin-left: auto; }
.top-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 500;
}
.top-nav a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: var(--radius); border: 1px solid transparent;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
  cursor: pointer; font-family: var(--sans); letter-spacing: -0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--blue); color: #0d1220; }
.btn-solid:hover { background: #6d9fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-wide { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 104px; overflow: hidden; position: relative; }
.hero-glow {
  position: absolute; right: -12%; top: -25%; width: 62%; height: 130%;
  background: radial-gradient(closest-side, rgba(79, 140, 255, 0.13), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(40px, 6vw, 80px); align-items: center;
  position: relative;
}
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--blue); margin-bottom: 22px;
}
.lede {
  font-size: 1.17rem; color: var(--muted); max-width: 34em;
  margin-top: 26px; line-height: 1.7;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-note { margin-top: 34px; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- call trace (signature) ---------- */
.trace-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 24px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.trace-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 6px;
}
.trace-title { font-weight: 700; font-size: 0.98rem; }
.trace-sub { color: var(--muted); font-weight: 500; }
.trace-live { font-size: 0.72rem; color: var(--green); text-transform: uppercase; letter-spacing: 0.14em; }
.trace-live.wait { color: #fbbf24; }
.trace { list-style: none; margin: 0; padding: 0; min-height: 322px; }
.t-step {
  display: grid; grid-template-columns: 44px 22px 1fr; align-items: start;
  padding: 11px 0;
  transition: opacity 380ms ease, transform 380ms ease;
  position: relative;
}
/* steps are visible by default (no-JS, reduced motion); the script opts in to the reveal */
.trace.anim .t-step { opacity: 0; transform: translateY(6px); }
.trace.anim .t-step.on { opacity: 1; transform: none; }
.t-step + .t-step::before {
  content: ""; position: absolute; left: 51.5px; top: -12px; height: 22px;
  border-left: 1px solid var(--line);
}
.t-time { font-size: 0.78rem; color: var(--muted); padding-top: 3px; }
.t-dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 7px;
  background: var(--blue); position: relative;
}
.t-step[data-dot="ok"] .t-dot,
.t-step[data-dot="answer"] .t-dot { background: var(--green); }
.t-step.on.pulse .t-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid currentColor; color: inherit; opacity: 0;
  animation: pulse 1.4s ease-out infinite;
  border-color: var(--blue);
}
.t-step[data-dot="answer"].on.pulse .t-dot::after { border-color: var(--green); }
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  80% { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}
.t-body { display: grid; gap: 1px; font-size: 0.95rem; }
.t-body em { font-style: normal; color: var(--muted); font-size: 0.88rem; }
.trace-foot {
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em;
}

/* ---------- keypad (interactive demo) ---------- */
.keypad-wrap { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-width: 260px; margin-inline: auto;
}
.key {
  font-family: var(--mono); font-size: 1.02rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 0; cursor: pointer; text-align: center;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.key:hover { border-color: var(--blue); }
.key:active { transform: scale(0.96); }
.key.k-lit { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.key.k-hint { border-color: rgba(79, 140, 255, 0.6); color: var(--blue); animation: keyhint 1.2s ease-in-out infinite; }
@keyframes keyhint {
  0%, 100% { background: transparent; }
  50% { background: var(--blue-soft); }
}
.keypad-hint {
  margin-top: 12px; text-align: center; font-size: 0.72rem;
  color: var(--muted); letter-spacing: 0.05em;
}
.keypad-hint.pop { animation: hintpop 320ms ease; }
.keypad-hint .score { color: var(--green); }
@keyframes hintpop {
  0% { transform: scale(0.92); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- bands ---------- */
.band { padding: 104px 0; }
.band-panel { background: var(--panel); border-block: 1px solid var(--line); }
.band-lede { color: var(--muted); font-size: 1.1rem; max-width: 42em; margin-top: 22px; }

/* ---------- features ---------- */
.feat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px;
}
.feat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 26px;
  transition: border-color 150ms ease, transform 150ms ease;
}
.feat:hover { border-color: rgba(79, 140, 255, 0.55); transform: translateY(-3px); }
.feat-tag {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--blue); margin-bottom: 14px;
}
.feat-ico { display: inline-flex; width: 24px; height: 24px; color: var(--blue); margin-bottom: 16px; }
.feat-ico svg { width: 100%; height: 100%; }
.feat h3 { margin-bottom: 10px; }
.feat p { color: var(--muted); font-size: 0.93rem; line-height: 1.6; }

/* ---------- split sections ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 88px); align-items: start;
}
.split-copy p { color: var(--muted); margin-top: 22px; max-width: 32em; }
.split-copy p strong { color: var(--text); }
.split-copy .btn { margin-top: 30px; }

/* ---------- migration steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid; grid-template-columns: 52px 1fr; gap: 20px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.step-n {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--blue); border-radius: 6px; color: var(--blue);
  font-size: 1.05rem; background: var(--blue-soft);
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* ---------- australia ---------- */
.au-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px;
}
.au-item { border-top: 2px solid var(--line); padding-top: 20px; }
.au-lead { color: var(--blue); font-size: 0.85rem; letter-spacing: 0.08em; margin-bottom: 14px; }
.au-item h3 { margin-bottom: 10px; }
.au-item p { color: var(--muted); font-size: 0.93rem; }

/* ---------- agent-ready ---------- */
.agent-split { grid-template-columns: 1.1fr 0.9fr; margin-top: 52px; }
.term {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
}
.term-head {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); border-bottom: 1px solid var(--line);
  padding-bottom: 12px; margin-bottom: 14px;
}
.term-body { font-size: 0.84rem; line-height: 2; overflow-x: auto; }
.term-body p { margin: 0; }
.term-prompt { color: var(--text); margin-bottom: 10px; }
.term-prompt span { color: var(--blue); }
.term-req { display: flex; gap: 10px; color: var(--muted); white-space: nowrap; }
.term-method { color: var(--blue); min-width: 3.4em; }
.term-code, .term-ok { margin-left: auto; }
.term-ok { color: var(--green); }
.term-done {
  border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px;
  color: var(--green);
}
.agent-facts { display: grid; gap: 20px; }

/* ---------- pricing ---------- */
.pricing { max-width: 820px; }

/* ---------- two ways to start ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
.path {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 34px 32px 36px;
}
.path-hot {
  border-color: rgba(79, 140, 255, 0.45);
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.09), var(--card) 55%);
}
.path .feat-tag { margin-bottom: 16px; }
.path h3 { font-size: 1.35rem; margin-bottom: 12px; }
.path p { color: var(--muted); margin-bottom: 28px; }

/* ---------- scroll reveals (script opts elements in) ---------- */
.reveal { transition: opacity 550ms ease, transform 550ms ease; }
.reveal.pre { opacity: 0; transform: translateY(16px); }

/* ---------- contact form ---------- */
.contact-note { margin-top: 26px; font-size: 0.8rem; color: var(--green); letter-spacing: 0.04em; }
.cform {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 30px 28px; display: grid; gap: 18px;
}
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cform label {
  display: grid; gap: 7px; font-size: 0.87rem; font-weight: 600; color: var(--text);
}
.cform input, .cform select, .cform textarea {
  font: inherit; font-size: 0.97rem; font-weight: 400;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 11px 13px;
  width: 100%;
}
.cform textarea { resize: vertical; min-height: 96px; }
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.cform ::placeholder { color: #5d6373; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { font-size: 0.83rem; min-height: 1.2em; color: var(--muted); }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: #f87171; }

altcha-widget {
  --altcha-color-base: var(--bg);
  --altcha-color-border: var(--line);
  --altcha-color-text: var(--text);
  --altcha-color-border-focus: var(--blue);
  --altcha-border-radius: 6px;
  --altcha-max-width: 100%;
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 0 52px; }
.foot-row { display: flex; align-items: baseline; gap: 26px; flex-wrap: wrap; }
.foot-tag { color: var(--muted); font-size: 0.94rem; }
.foot-links { display: flex; gap: 20px; }
.foot-links a {
  color: var(--muted); font-size: 0.9rem; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.foot-links a:hover { color: var(--text); border-bottom-color: var(--blue); }
.foot-meta { margin-left: auto; font-size: 0.76rem; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .feat-grid, .au-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid, .split, .paths, .agent-split { grid-template-columns: 1fr; }
  .band { padding: 76px 0; }
  .top-nav { display: none; }
  .trace { min-height: 0; }
}
@media (max-width: 560px) {
  .feat-grid, .au-grid, .frow { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .foot-meta { margin-left: 0; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trace.anim .t-step { opacity: 1; transform: none; transition: none; }
  .t-step.on.pulse .t-dot::after { animation: none; content: none; }
  .key.k-hint, .keypad-hint.pop { animation: none; }
  .btn, .feat, .reveal { transition: none; }
  .reveal.pre { opacity: 1; transform: none; }
}
