/* Cliff launch page. Tokens from the Cliff CAD app (cad/crates/ui/src/theme.rs). */
:root {
  --ground: #f4f1ec;
  --paper: #fcfaf7;
  --ink: #1c1915;
  --ink-2: #585148;
  --ink-3: #6f675d;
  --line: #e2dcd3;
  --line-2: #d6cfc5;
  --accent: #c8641e;
  --accent-btn: #b3561a;
  --accent-btn-hover: #9c4914;
  --accent-soft: rgba(200, 100, 30, 0.14);
  --on-accent: #fffaf4;
  --danger: #be2828;
  --go: #3f8a5a;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --card-shadow: 0 1px 2px rgba(40, 33, 24, 0.06), 0 18px 48px -12px rgba(40, 33, 24, 0.22);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; caret-color: var(--accent);
}
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
h1, p { margin: 0; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* nav */
.nav { position: relative; z-index: 30; display: flex; align-items: center; gap: 36px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.logo { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.menu { display: flex; gap: 2px; margin-right: auto; }
.ml { display: inline-flex; align-items: center; height: 32px; padding: 0 9px; font-size: 14px; color: var(--ink-3); transition: color .2s; }
.ml:hover, .ml[aria-current="page"] { color: var(--ink); }
.nav-cta {
  font-size: 13.5px; font-weight: 500; padding: 8px 13px; border: 1px solid var(--line-2); color: var(--ink); background: var(--paper);
  transition: background .2s, color .2s;
}
.nav-cta:hover { border-color: var(--ink); }
.burger { display: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-2); background: none; color: var(--ink); cursor: pointer; }
.burger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* hero */
.hero {
  flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px);
  align-items: center; padding-top: 8px; padding-bottom: 40px;
}
.h1 { font-size: clamp(56px, 7.4vw, 6rem); line-height: 0.96; letter-spacing: -0.045em; font-weight: 500; }
.h1 span { display: block; transition: color .6s var(--ease); }
.h1 span.on { color: var(--accent); }
.lede { margin: 28px 0 32px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--ink-2); }

.field {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 0;
  background: var(--paper); color: var(--ink); font: 400 15px/1 var(--sans); transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: var(--ink-3); }
.field:hover { border-color: color-mix(in srgb, var(--line-2) 50%, var(--ink-3)); }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28, 25, 21, 0.08); }
.field[aria-invalid="true"] { border-color: var(--danger); }
.primary {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border: 0; border-radius: 0;
  background: var(--ink); color: var(--ground); font: 500 15px/1 var(--sans); letter-spacing: 0.005em; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.primary:hover { background: #000; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: progress; }
.quiet {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: 400 15px/1 var(--sans); color: var(--ink-2); transition: color .2s;
}
.quiet svg, .go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.quiet:hover { color: var(--ink); }
.quiet:hover svg, .go:hover svg { transform: translateX(3px); }
.go {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border: 0; border-radius: 0;
  background: var(--ink); color: var(--ground); font: 500 15px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s;
}
.go:hover { background: #000; }
.go:disabled { opacity: .6; cursor: progress; }

.cta { max-width: 520px; }
.cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta.open .cta-row { display: none; }
.access { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .35s var(--ease); }
.access-in { overflow: hidden; }
.cta.open .access { grid-template-rows: 1fr; opacity: 1; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px; }
.fl { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.fl.wide { grid-column: 1 / -1; }
.fl em { font-style: normal; color: var(--ink-3); margin-left: 4px; }
.access-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 0 2px; flex-wrap: wrap; }
.fine { font-size: 13px; color: var(--ink-3); }
.form-msg { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.form-msg:empty { display: none; }
.form-msg[data-state="ok"] { color: var(--ink); font-weight: 500; font-size: 16px; }
.access.done .access-grid, .access.done .access-foot { display: none; }

/* the stage: a 3D machine, price tags, an invoice */
.stage { position: relative; margin: 0; aspect-ratio: 7 / 6; width: 100%; max-height: calc(100vh - 140px); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.leaders line { stroke: var(--ink-3); stroke-width: 1; }
.leaders circle { fill: var(--accent); }
.tags { position: absolute; inset: 0; pointer-events: none; }
.tag {
  position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 10px;
  padding: 7px 10px; border-radius: 2px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(40, 33, 24, 0.06), 0 6px 16px -6px rgba(40, 33, 24, 0.18);
  font-size: 13px; line-height: 1.2; white-space: nowrap; will-change: transform, opacity; opacity: 0;
}
.tag b { font-weight: 500; }
.tag i { font: 500 13px/1.2 var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }

.invoice {
  position: absolute; right: 0; top: 50%; width: min(46%, 340px);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 2px; box-shadow: var(--card-shadow);
  font-size: 14px; opacity: 0; transform: translate(calc(28px * (1 - var(--ip, 0))), -50%); will-change: transform, opacity;
}
.inv-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
.inv-tag { font: 400 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); padding: 4px 8px; }
.inv-rows { margin: 0; padding: 6px 0; list-style: none; }
.inv-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 16px; opacity: 0; }
.inv-rows li span:first-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-rows li span:last-child { font: 400 13px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.inv-foot { border-top: 1px solid var(--line); padding: 12px 16px 14px; }
.inv-total { display: flex; justify-content: space-between; font-weight: 500; font-size: 16px; }
.inv-sum { font: 500 16px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.inv-ship { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.inv-ok { color: var(--accent); font-weight: 500; opacity: 0; transition: opacity .5s var(--ease); }
.invoice.ordered .inv-ok { opacity: 1; }

.pause {
  position: absolute; right: 0; top: 0; width: 30px; height: 30px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 0; background: var(--paper); color: var(--ink-3); cursor: pointer;
  opacity: .7; transition: opacity .2s, color .2s;
}
.pause:hover { opacity: 1; color: var(--ink); }
.pause svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pause .i-play { display: none; }
.pause[aria-pressed="true"] .i-pause { display: none; }
.pause[aria-pressed="true"] .i-play { display: block; fill: currentColor; }

/* standalone pages: cinema. A first screen led by the product, then large thin headings over big media. */
.cinema { flex: 1; }
.c-hero { position: relative; min-height: min(86vh, 860px); display: flex; align-items: flex-end; overflow: hidden; background: #f5f5f2; }
.c-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--ground)); pointer-events: none; }
.c-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 78% 50%; transform: scale(1.06); transform-origin: 78% 50%; }
.c-tag {
  position: absolute; z-index: 2; right: max(var(--gutter), calc((100vw - 1360px) / 2 + var(--gutter))); bottom: clamp(64px, 11vh, 120px);
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 8px 12px;
  background: rgba(252, 250, 247, .9); border: 1px solid var(--line-2); font: 500 13px/1 var(--mono); color: var(--ink-2);
}
.c-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .c-tag i { animation: none; } }
.c-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #f5f5f2 0%, rgba(245, 245, 242, .85) 34%, rgba(245, 245, 242, 0) 60%); }
.c-over { position: relative; z-index: 1; padding-bottom: clamp(64px, 11vh, 120px); }
.c-over h1 { margin: 0; font-size: clamp(80px, 12vw, 176px); line-height: .86; letter-spacing: -0.055em; font-weight: 300; }
.c-over p { margin: 22px 0 0; font-size: 20px; line-height: 1.45; color: var(--ink-2); }
.c-over .cta-row { margin-top: 30px; }
.c-still { min-height: 60vh; padding-top: 72px; background: radial-gradient(110% 90% at 88% 0%, #ecdccb 0%, var(--ground) 58%); }
.c-still::after { display: none; }

.c-sec { padding-top: clamp(72px, 12vh, 140px); }
.c-sec h2 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.045em; font-weight: 300; }
.c-lead { margin: 14px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.c-note { margin: -40px 0 0; font-size: 14px; color: var(--ink-3); }
.c-studies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.c-study { margin: 0; }
.c-study img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: contain; background: #f5f5f3; padding: 16px; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.c-study:hover img { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(40, 33, 24, .35); }
.c-study figcaption { margin-top: 14px; display: grid; gap: 3px; font-size: 14.5px; color: var(--ink-2); }
.c-study b { font-weight: 500; color: var(--ink); font-size: 16px; }

.c-screen { margin: 0; }
.c-screen img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; margin: 0 auto; box-shadow: 0 1px 2px rgba(40, 33, 24, .06), 0 40px 90px -36px rgba(40, 33, 24, .45); }
.c-cap { margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink-3); }
.c-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: center; }
.c-split .c-screen img { max-height: 56vh; }
.c-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.c-facts > div { padding-top: 18px; border-top: 1px solid var(--ink); }
.c-facts span { display: block; margin-bottom: 10px; font: 500 12px/1 var(--mono); color: var(--accent); }
.c-facts h3 { margin: 0; font-size: 17px; font-weight: 500; }
.c-facts p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.cinema > .c-sec:last-child { padding-bottom: clamp(80px, 12vh, 140px); }
.c-apply { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.apply-form.done .access-grid, .apply-form.done .access-foot { display: none; }
a.primary, a.quiet { text-decoration: none; }

/* marketplace and shops: coming soon */
.c-soon { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: calc(100vh - 150px); padding-top: 40px; padding-bottom: 64px; }
.c-soon-tag { margin: 0 0 18px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.c-soon h1 { margin: 0; font-size: clamp(48px, 6vw, 84px); line-height: 1; letter-spacing: -0.045em; font-weight: 400; }
.c-soon-lede { margin: 18px 0 0; font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.c-soon .cta-row { justify-content: center; margin-top: 30px; }
.c-soon-form { width: min(100%, 520px); margin-top: 32px; text-align: left; }
.c-soon-form .access-foot { justify-content: center; }
.c-soon-alt { margin: 26px 0 0; font-size: 15px; color: var(--ink-3); }
.c-soon-alt a { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: border-color .2s; }
.c-soon-alt a:hover { border-color: var(--ink); }
.c-soon-alt svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* footer */
.foot { display: flex; justify-content: space-between; padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: var(--ink-3); }

@media (max-width: 960px) {
  .c-studies { grid-template-columns: 1fr; }
  .c-facts { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .c-split, .c-apply { grid-template-columns: 1fr; gap: 24px; }
  .c-hero { min-height: 78vh; }
  .c-bg { object-position: 50% 30%; transform: none; }
  .c-shade { background: linear-gradient(0deg, #f5f5f2 22%, rgba(245, 245, 242, .7) 48%, rgba(245, 245, 242, 0) 72%); }
  .c-note { margin-top: -24px; }
  .c-tag { top: 84px; bottom: auto; right: var(--gutter); }
  .nav { justify-content: space-between; gap: 12px; }
  .burger { display: grid; place-items: center; order: 3; }
  .nav-cta { order: 2; margin-left: auto; }
  .menu {
    display: none; position: absolute; top: 72px; left: var(--gutter); right: var(--gutter); flex-direction: column; gap: 0;
    background: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--card-shadow); padding: 4px 0;
  }
  .menu.open { display: flex; }
  .ml { height: auto; padding: 14px 18px; font-size: 16px; color: var(--ink); }
  .ml + .ml { border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .stage { aspect-ratio: 4 / 5; max-height: none; }
  .invoice { left: 50%; right: auto; top: auto; bottom: 8px; width: min(100%, 360px); transform: translate(-50%, calc(28px * (1 - var(--ip, 0)))); }
  .tag { font-size: 11.5px; padding: 5px 8px; gap: 6px; }
  .tag i { font-size: 11.5px; }
}
@media (max-width: 480px) {
  .h1 { font-size: 52px; }
  .nav-cta { display: none; }
  .access-grid { grid-template-columns: 1fr; }
  .cta-row .primary { flex: 1 1 100%; }
}
