/* termuna.com — hand-built, no framework.
 * Tokens mirror packages/design-tokens/tokens.css (inlined here so the
 * page ships as one static bundle with zero build step). */

:root {
  --bg: oklch(0.10 0 0);
  --surface: oklch(0.145 0 0);
  --surface-2: oklch(0.19 0 0);
  --ink: oklch(0.93 0.005 130);
  --ink-muted: oklch(0.74 0.012 130);
  --phosphor: oklch(0.72 0.19 132);
  --phosphor-deep: oklch(0.60 0.154 130);
  --on-phosphor: oklch(0.13 0.03 132);
  --canopy: oklch(0.80 0.14 95);
  --line: oklch(0.28 0.01 130);

  --font-display: "Martian Mono", ui-monospace, monospace;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, monospace;

  --content: min(1080px, 92vw);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Martian Mono display lines are unbreakable words at times; never let
   * a rounding error become a horizontal scrollbar on small phones. */
  overflow-x: clip;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
  line-height: 1.18;
}

p { text-wrap: pretty; }

a { color: var(--ink); text-decoration-color: var(--phosphor); text-underline-offset: 3px; }
a:hover { color: var(--phosphor); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

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

.site-head {
  width: var(--content);
  margin-inline: auto;
  padding-block: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark { display: inline-flex; align-items: baseline; gap: 0.3rem; text-decoration: none; }
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.wordmark-text.small { font-size: 1rem; }
.wordmark-cursor {
  width: 0.55em; height: 1em;
  background: var(--phosphor);
  align-self: center;
  animation: blink 1.2s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .wordmark-cursor { animation: none; }
}

.site-head nav {
  display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 0.78rem;
}
.site-head nav a { text-decoration: none; color: var(--ink-muted); }
.site-head nav a:hover { color: var(--phosphor); }
.nav-cta {
  color: var(--on-phosphor) !important;
  background: var(--phosphor);
  padding: 0.55em 1em;
  border-radius: 4px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--canopy); color: var(--on-phosphor) !important; }

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

main section {
  width: var(--content);
  margin-inline: auto;
  padding-block: clamp(4rem, 3rem + 5vw, 8rem);
}

h2 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem);
  margin-bottom: 1.2rem;
}

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

/* The unbroken line as section separator: a full-bleed rule carrying a
 * single phosphor cursor block. The one repeated visual system of the
 * page — deliberate, named, ours. */
.line-break {
  border: 0;
  height: 2px;
  width: 100%;
  background: var(--line);
  position: relative;
  overflow: visible;
}
.line-break::after {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(12% + 8vw * var(--drift, 0));
  width: 12px; height: 16px;
  background: var(--phosphor);
  box-shadow: 0 0 14px oklch(0.72 0.19 132 / 0.55);
}
.line-break:nth-of-type(2) { --drift: 3; }
.line-break:nth-of-type(3) { --drift: 6; }
.line-break:nth-of-type(4) { --drift: 8; }
.line-break:nth-of-type(5) { --drift: 5; }

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

.hero { padding-top: clamp(3rem, 2rem + 4vw, 6rem); }

.hero h1 {
  /* Martian Mono advance is ~0.95em — the min is sized so "session."
   * fits a 320px viewport. Tested; don't raise without re-measuring. */
  font-size: clamp(2rem, 0.9rem + 5.5vw, 5.5rem);
  font-weight: 700;
}

.hero-sub {
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  margin-block: 1.6rem 3.5rem;
}

/* the handoff demo */
.handoff {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(3rem, 1fr) minmax(0, 3fr);
  align-items: center;
}

.device {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.device .screen {
  font-family: var(--font-code);
  font-size: clamp(0.62rem, 0.5rem + 0.55vw, 0.85rem);
  line-height: 1.55;
  padding: 0.9rem 1rem 1.1rem;
  min-height: 13.5em;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.titlebar {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface-2);
  padding: 0.45rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  color: var(--ink-muted);
}
.titlebar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--phosphor-deep); }

.phone {
  border-radius: 18px;
  padding-top: 0.55rem;
  opacity: 0.35;
  transition: opacity 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}
.phone .notch {
  width: 34%; height: 5px; border-radius: 3px;
  background: var(--surface-2);
  margin: 0 auto 0.3rem;
}
.phone.awake {
  opacity: 1;
  box-shadow: 0 0 34px oklch(0.72 0.19 132 / 0.14);
}
.phone .screen { min-height: 15em; }

.session-line {
  height: 2px;
  background: var(--line);
  position: relative;
}
.session-line .pulse {
  position: absolute;
  top: -3px; left: -8px;
  width: 26px; height: 8px;
  border-radius: 4px;
  background: var(--canopy);
  box-shadow: 0 0 16px oklch(0.80 0.14 95 / 0.8);
  opacity: 0;
}
.session-line .pulse.travel {
  animation: travel 900ms var(--ease-out) forwards;
}
@keyframes travel {
  0%   { opacity: 0; transform: translateX(0); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(100% + 5rem)); }
}

.screen .prompt { color: var(--phosphor); }
.screen .ok { color: var(--phosphor); }
.screen .dim { color: var(--ink-muted); }
.screen .accent { color: var(--canopy); }
.screen .caret {
  display: inline-block;
  width: 0.6em; height: 1.1em;
  vertical-align: text-bottom;
  background: var(--phosphor);
  animation: blink 1.1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .screen .caret { animation: none; }
}

.handoff-caption {
  margin-top: 1.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  max-width: 52ch;
}

@media (max-width: 720px) {
  .handoff {
    grid-template-columns: 1fr;
    grid-template-rows: auto 3.2rem auto;
  }
  .session-line { width: 2px; height: 100%; justify-self: center; }
  .session-line .pulse.travel { animation: travel-v 900ms var(--ease-out) forwards; }
  @keyframes travel-v {
    0%   { opacity: 0; transform: translateY(0); }
    15%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(3rem); }
  }
  .phone { max-width: 320px; }
}

/* ---------- weight (spec sheet) ---------- */

.weight h2 { max-width: 24ch; }

.spec-sheet {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
}
.spec-sheet th {
  text-align: left;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding: 1.1rem 0;
}
.spec-sheet td {
  text-align: right;
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.4rem);
  font-weight: 700;
  color: var(--phosphor);
  padding: 1.1rem 0;
  white-space: nowrap;
}
.spec-sheet tr + tr { border-top: 1px solid var(--line); }

.spec-note {
  margin-top: 2rem;
  color: var(--ink-muted);
  max-width: 56ch;
}

/* ---------- manifest ---------- */

.manifest-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 clamp(2rem, 5vw, 5rem);
}

.manifest dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--phosphor);
  margin-top: 1.8rem;
}
.manifest dd {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  max-width: 52ch;
}

/* ---------- cloud ---------- */

.cloud-story {
  max-width: 64ch;
  display: grid;
  gap: 1.2rem;
  font-size: 1.125rem;
}
.cloud-story em { color: var(--phosphor); font-style: normal; }

.inline-code {
  font-family: var(--font-code);
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.4em;
}

.commitments {
  margin-top: 3rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
}
.commitments li { padding-left: 1.6rem; position: relative; }
.commitments li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.32em;
  width: 9px; height: 13px;
  background: var(--phosphor);
}

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

.price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.price-table th {
  font-family: var(--font-display);
  text-align: left;
  font-size: 1rem;
  padding: 0 1.4rem 0.8rem 0;
  border-bottom: 2px solid var(--line);
}
.price-table td {
  vertical-align: top;
  padding: 1.4rem 1.4rem 0 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}
.price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.plan-cta {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--phosphor);
  text-decoration: none;
  border: 1px solid var(--phosphor);
  border-radius: 4px;
  padding: 0.55em 1.2em;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.plan-cta:hover {
  background: var(--phosphor);
  color: var(--on-phosphor);
}

@media (max-width: 720px) {
  .price-table, .price-table thead, .price-table tbody,
  .price-table th, .price-table td, .price-table tr { display: block; }
  .price-table thead { display: none; }
  .price-table td { padding: 1.6rem 0 0; }
}

/* ---------- waitlist ---------- */

.waitlist h2 { max-width: 22ch; }

#waitlist-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  max-width: 34rem;
}
#waitlist-form input {
  flex: 1 1 16rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 1rem;
  padding: 0.85em 1em;
}
#waitlist-form input::placeholder { color: var(--ink-muted); }
#waitlist-form button {
  background: var(--phosphor);
  color: var(--on-phosphor);
  border: 0;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.9em 1.4em;
  cursor: pointer;
  transition: background 140ms var(--ease-out);
}
#waitlist-form button:hover { background: var(--canopy); }

.form-note {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--ink-muted);
  min-height: 1.4em;
}
.form-note.ok { color: var(--phosphor); }
.form-note.err { color: oklch(0.62 0.19 25); }

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

.site-foot {
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
  padding-bottom: 3rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.foot-line {
  height: 2px;
  background: var(--line);
  position: relative;
  margin-bottom: 2.4rem;
}
.foot-cursor {
  position: absolute;
  top: -7px; left: 50%;
  width: 12px; height: 16px;
  background: var(--phosphor);
  box-shadow: 0 0 14px oklch(0.72 0.19 132 / 0.55);
}
.site-foot p + p { margin-top: 0.5rem; }
.foot-meta a { color: var(--ink-muted); }
