/* THRXST landing page. One motif: the X that stands where the U of "thrust"
   would be. Its 45 degree arms cut every corner on the page (the stage, the
   buttons, the pictures), mark every rule, and close the page as a block.
   Brand tokens are the app's (web/src/index.css); one family, Archivo. */

@font-face {
  font-family: "Archivo";
  src: url("/landing/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ground: #0e1622;
  --f1: #141e2c;
  --f2: #1a2637;
  --f3: #233249;
  --ink: #e6ecf3;
  --muted: #a8b5c6;
  --accent: #f0a93b;
  --on-accent: #0e1622;
  --up: #3fd08f;
  --dn: #f2495c;
  --wait: #f0a93b;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-display: clamp(34px, 5.4vw, 88px);
  --s-head: clamp(32px, 3.4vw, 48px);
  --s-statement: clamp(22px, 1.9vw, 28px);
  --s-body: 17px;
  --s-small: 15px;

  --m: clamp(16px, 2.8vw, 40px);
  --cut: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: var(--s-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip { position: absolute; left: var(--m); top: -60px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 8px 12px; }
.skip:focus { top: 12px; }

/* The cut: one 45 degree corner, taken from the X. */
.btn, .ticket, .shot img, .pic img, .stage, .foot-mark span {
  --c: var(--cut);
}
.btn {
  --c: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: var(--s-small); text-decoration: none; letter-spacing: 0.01em;
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
  transition: transform 180ms var(--ease), background-color 180ms var(--ease);
}
.btn:hover { background: #ffbe55; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: var(--s-body); --c: 14px; }

/* Navigation: wordmark, three links, one action. */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; gap: 32px;
  padding: 24px var(--m);
}
.mark { font-weight: 900; font-stretch: 125%; font-size: var(--s-body); letter-spacing: 0.12em; text-decoration: none; }
.mark .glyph { display: inline-block; width: 0.72em; height: 0.86em; margin: 0 0.06em; vertical-align: -0.08em; }
.mark .glyph path { stroke-width: 2.4; stroke-linejoin: round; }
.mark .glyph path:first-child, .foot-mark .is-x path:first-child { fill: var(--dn); stroke: var(--dn); }
.mark .glyph path:last-child, .foot-mark .is-x path:last-child { fill: var(--up); stroke: var(--up); }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { font-size: var(--s-small); color: var(--muted); text-decoration: none; transition: color 160ms; }
.nav nav a:hover { color: var(--ink); }

/* Hero: headline upper left; the amber stage takes the lower right with its corner cut. */
.hero {
  position: relative; min-height: 100svh; min-height: max(100svh, 720px);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: 0 var(--m);
}
.hero-copy { grid-column: 1 / span 7; padding-top: clamp(120px, 17vh, 170px); position: relative; z-index: 2; }
h1 {
  font-size: var(--s-display); line-height: 0.98; letter-spacing: -0.03em;
  font-weight: 650; font-stretch: 108%;
}
h1 span { display: block; white-space: nowrap; }
.lede { margin-top: 28px; max-width: 40ch; font-size: var(--s-body); line-height: 1.5; color: var(--ink); }
.hero-copy .btn-lg { margin-top: 32px; }
.clock { margin-top: 24px; max-width: 44ch; font-size: var(--s-body); color: var(--muted); }
.clock b { color: var(--ink); font-weight: 650; }
.clock .live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--up); transform: rotate(45deg); vertical-align: 1px; }
.clock .live.is-off { background: var(--muted); }

.stage {
  --c: clamp(80px, 9vw, 150px);
  position: absolute; z-index: 1;
  left: calc(var(--m) + (100% - 2 * var(--m) - 11 * 24px) / 12 * 6 + 6 * 24px);
  right: 0; top: 34%; bottom: 0;
  background: var(--accent);
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
  overflow: hidden;
}
.ticket-hero { position: absolute; left: clamp(40px, 5vw, 72px); top: clamp(48px, 6vw, 80px); width: min(560px, calc(100% - 64px)); }

/* The product fragment: the plan the desk writes before an entry. */
.ticket {
  --c: 16px;
  background: var(--ground); color: var(--ink);
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
  padding: 20px 22px 18px;
  font-size: 15px; line-height: 1.4;
}
.t-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-bottom: 14px; }
.t-sym { font-weight: 800; font-stretch: 115%; font-size: 17px; }
.t-what { color: var(--muted); font-size: 15px; }
.t-state { margin-left: auto; font-size: 15px; font-weight: 650; padding: 3px 8px; background: var(--f3); }
.t-state.is-wait { background: color-mix(in srgb, var(--wait) 22%, var(--ground)); color: var(--wait); }
.t-state.is-live { background: color-mix(in srgb, var(--up) 20%, var(--ground)); color: var(--up); }
.t-state.is-done { background: var(--f3); color: var(--ink); }
.t-rows > div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 7px 0; }
.t-rows dt { color: var(--muted); font-size: 15px; }
.t-rows dd { font-size: 15px; }
.t-rows .is-key { background: var(--f2); margin: 4px -10px; padding: 8px 10px; }
.t-rows .is-key dd { font-weight: 700; }
.t-foot { margin-top: 12px; font-size: 15px; color: var(--muted); }
.up { color: var(--up); font-weight: 650; }

/* How the day runs: four fields, the same plan further along in each. */
.day { display: grid; grid-template-columns: repeat(4, 1fr); }
.field {
  position: relative; min-height: 84svh; padding: 40px 28px 32px;
  display: flex; flex-direction: column;
}
.field:nth-child(1) { background: var(--f1); }
.field:nth-child(2) { background: var(--f2); }
.field:nth-child(3) { background: var(--f3); }
.field:nth-child(4) { background: var(--accent); color: var(--on-accent); }
.field h2 { font-size: var(--s-statement); font-weight: 850; line-height: 1.15; letter-spacing: -0.01em; }
.ticket-sm { position: absolute; left: 28px; top: 34%; width: min(300px, calc(100% - 56px)); transition: transform 160ms var(--ease); }
.clause { margin-top: auto; }
.field:hover .ticket-sm { transform: translateY(-6px); }
.ticket-sm .t-rows > div { grid-template-columns: 92px 1fr; }
.clause { font-size: var(--s-statement); line-height: 1.2; font-weight: 550; max-width: 18ch; text-wrap: balance; }
.clause .when { display: block; font-size: var(--s-small); font-weight: 650; color: var(--muted); margin-bottom: 8px; letter-spacing: 0; }
.field:nth-child(4) .clause .when { color: #3a2a0c; }
.field.is-now::after {
  content: "Now"; position: absolute; top: 40px; right: 28px;
  font-size: 15px; font-weight: 750; padding: 4px 10px 4px 14px;
  background: var(--accent); color: var(--on-accent);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.field:nth-child(4).is-now::after { background: var(--ground); color: var(--accent); }

/* The workstation: the X at full height, the interface in front of it. */
.works {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: clamp(96px, 14vh, 160px) var(--m) clamp(64px, 10vh, 120px);
  align-items: end;
}
.works-pick { grid-column: 1 / span 3; position: relative; z-index: 2; }
.works-h, .works-list button {
  font-size: var(--s-head); line-height: 1.15; letter-spacing: -0.015em;
}
.works-h { color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.works-list button {
  display: block; padding: 2px 0; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-weight: 500; color: var(--muted); text-align: left;
  transition: color 200ms, transform 200ms var(--ease);
}
.works-list button:hover { color: var(--ink); transform: translateX(6px); }
.works-list button[aria-selected="true"] { color: var(--ink); font-weight: 800; }
.works-list button[aria-selected="true"]::before { content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-right: 0.35em; background: var(--accent); transform: rotate(45deg) translateY(-0.12em); }
.works-view { grid-column: 4 / span 9; position: relative; aspect-ratio: 2 / 1; align-self: center; }
.works-x {
  position: absolute; left: 50%; top: 50%; height: 128%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 0;
  background: var(--f2);
  clip-path: polygon(0 0, 100% 0, 50% 47%, 50% 53%, 100% 100%, 0 100%, 50% 53%, 50% 47%);
  transition: background-color 300ms;
}
.works-view[data-tone="research"] .works-x { background: var(--f3); }
.works-view[data-tone="fleet"] .works-x { background: color-mix(in srgb, var(--accent) 30%, var(--ground)); }
.works-view[data-tone="phone"] .works-x { background: var(--f1); }
.shot { position: absolute; inset: 6% 0 0 0; z-index: 1; opacity: 0; transition: opacity 300ms var(--ease); }
.shot.is-on { opacity: 1; }
.shot[data-shot="fleet"] img { object-fit: contain; object-position: left center; clip-path: none; }
.shot[data-shot="phone"] img { width: auto; max-width: 100%; margin: 0 auto; }
.shot img {
  --c: 36px; width: 100%; height: 100%; object-fit: cover; object-position: left top;
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
}
.works-fact { grid-column: 4 / span 6; position: relative; z-index: 2; margin-top: 64px; font-size: var(--s-body); max-width: 60ch; }

/* The rules: a picture that stays, a list that moves. */
.rules {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: clamp(96px, 14vh, 180px) var(--m);
  background: var(--f1);
}
.rules-pic { grid-column: 1 / span 5; grid-row: 1 / span 2; position: sticky; top: 12vh; align-self: start; aspect-ratio: 4 / 5; }
.pic { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms var(--ease); }
.pic.is-on { opacity: 1; }
.pic img {
  width: 100%; height: calc(100% - 44px); object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
}
.pic.is-on img { animation: drift 14s ease-in-out infinite alternate; }
.pic figcaption { margin-top: 12px; font-size: var(--s-small); color: var(--muted); max-width: 52ch; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.045); } }

.rules-body { grid-column: 7 / span 5; grid-row: 2; }
.rules-h { grid-column: 7 / span 5; grid-row: 1; font-size: var(--s-head); line-height: 1.05; letter-spacing: -0.02em; font-weight: 750; margin-bottom: 48px; }
.rules-list li { padding: 2px 0; }
.rules-list button {
  width: 100%; min-height: 58px; display: flex; align-items: center; gap: 16px;
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-family: inherit; text-align: left; padding: 0;
  transition: color 200ms;
}
.r-name { font-size: var(--s-statement); font-weight: 600; display: flex; align-items: center; gap: 14px; }
.r-name::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  clip-path: polygon(50% 6%, 100% 94%, 0 94%);
  transform: rotate(90deg);
  transition: transform 300ms var(--ease), background-color 300ms;
}
.r-num { margin-left: auto; font-size: var(--s-small); color: var(--muted); white-space: nowrap; }
.rules-list li.is-on button, .rules-list button:hover { color: var(--ink); }
.rules-list li.is-on .r-name::before { background: var(--up); transform: none; }
.rules-list p {
  max-width: 44ch; font-size: var(--s-body); color: var(--ink); padding: 0 0 18px 28px;
}
.js .rules-list li:not(.is-on) p { display: none; }

/* Footer: the mark built from blocks; the X is the two triangles, red over green, on the tallest. */
.foot { padding: clamp(80px, 12vh, 140px) var(--m) 32px; background: var(--ground); }
.foot-mark { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 200px; }
.foot-mark span {
  --c: clamp(12px, 2vw, 32px);
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--f2); color: var(--ground);
  font-weight: 900; font-stretch: 125%; font-size: clamp(56px, 12vw, 220px); line-height: 1;
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
}
.foot-mark span:nth-child(1) { height: 72%; }
.foot-mark span:nth-child(2) { height: 64%; background: var(--f3); }
.foot-mark span:nth-child(3) { height: 80%; }
.foot-mark span.is-x { height: 100%; background: var(--f3); }
.foot-mark .is-x svg { width: 62%; height: auto; overflow: visible; }
.foot-mark .is-x path { stroke-width: 2.6; stroke-linejoin: round; }
.foot-mark span:nth-child(5) { height: 68%; background: var(--f3); }
.foot-mark span:nth-child(6) { height: 60%; }
.foot-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: 56px; }
.foot-links { grid-column: 1 / span 6; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 48px; }
.foot-links a { font-size: var(--s-body); text-decoration: none; color: var(--ink); }
.foot-links a:hover { color: var(--accent); }
.foot-note { grid-column: 8 / span 5; font-size: var(--s-body); display: grid; gap: 8px; }
.foot-credits { margin-top: 48px; max-width: 72ch; font-size: var(--s-small); color: var(--muted); }
.foot-credits a { color: var(--muted); }
.foot-last { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; font-size: var(--s-small); color: var(--muted); }

/* Motion. The stage opens like a shutter once; the parts of each section rise in.
   Without script, or with reduced motion, everything is simply there. */
.js .stage { animation: shutter 1.1s var(--ease) 0.15s both; }
.js .stage .ticket-hero { animation: settle 1.1s var(--ease) 0.15s both; }
@keyframes shutter { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%, 100% 100%); } }
@keyframes settle { from { transform: translateX(40px) scale(1.04); opacity: 0; } }
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--d, 0ms); }
.js .rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .stage, .js .stage .ticket-hero { animation: none; }
  .pic.is-on img { animation: none; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Tablet. */
@media (max-width: 1080px) {
  .hero-copy { grid-column: 1 / span 8; }
  .stage { left: 28%; top: 52%; }
  .day { grid-template-columns: repeat(2, 1fr); }
  .field { min-height: 72svh; }
  .works-pick { grid-column: 1 / -1; margin-bottom: 32px; }
  .works-list { display: flex; flex-wrap: wrap; gap: 0 28px; }
  .works-view, .works-fact { grid-column: 1 / -1; }
  .rules-pic { grid-column: 1 / span 5; }
  .rules-body, .rules-h { grid-column: 6 / span 7; }
}

/* Phone: its own composition. */
@media (max-width: 720px) {
  .nav { gap: 16px; padding: 18px var(--m); }
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { display: block; min-height: 0; padding-bottom: 0; }
  .hero-copy { padding-top: 104px; }
  h1 { font-size: clamp(30px, 8.6vw, 52px); font-stretch: 100%; }
  .lede { font-size: 17px; margin-top: 20px; }
  .stage {
    --c: 72px;
    position: relative; left: auto; top: auto; margin: 40px calc(-1 * var(--m)) 0;
    min-height: 600px;
  }
  .ticket-hero { left: 16px; top: 64px; width: calc(100% - 32px); }
  .t-rows > div { grid-template-columns: 96px 1fr; }
  .day { grid-template-columns: 1fr; }
  .field { min-height: 0; padding: 32px 20px 40px; gap: 28px; }
  .ticket-sm { position: static; width: min(300px, 100%); }
  .clause { margin-top: 0; }
  .field.is-now::after { top: 32px; right: 20px; }
  .works { display: block; min-height: 0; padding-top: 88px; }
  .works-list { flex-wrap: nowrap; overflow-x: auto; gap: 24px; scrollbar-width: none; }
  .works-list button { font-size: var(--s-statement); white-space: nowrap; }
  .works-view { margin-top: 16px; }
  .rules { display: block; padding-top: 88px; }
  .rules-pic { position: sticky; top: 0; z-index: 2; aspect-ratio: auto; height: 38svh; margin: 0 calc(-1 * var(--m)); background: var(--f1); }
  .pic img { height: calc(38svh - 40px); --c: 20px; }
  .pic figcaption { padding: 0 var(--m); font-size: var(--s-small); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rules-body { margin-top: 32px; }
  .rules-h { margin-bottom: 24px; }
  .rules-list button { min-height: 56px; }
  .r-num { display: none; }
  .foot-mark { height: 22svh; min-height: 120px; gap: 3px; }
  .foot-grid { display: block; }
  .foot-links { gap: 12px 32px; }
  .foot-note { margin-top: 32px; }
}
