/* Sweat — stealth landing. Dark night-shift page, one accent. */

@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/newsreader-var-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* sans candidates — only the face referenced by --sans is ever downloaded */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/hanken-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rubik';
  src: url('assets/fonts/rubik-var-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('assets/fonts/figtree-var-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('assets/fonts/bricolage-var-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/plexmono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/plexmono-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1216;
  --bg-raise: #15181c;
  --ink: #f3f2ee;
  --ink-92: rgba(243, 242, 238, 0.92);
  --ink-70: rgba(243, 242, 238, 0.70);
  --ink-65: rgba(243, 242, 238, 0.65);
  --ink-55: rgba(243, 242, 238, 0.55);
  --line: rgba(243, 242, 238, 0.14);
  --line-strong: rgba(243, 242, 238, 0.45);
  --ground: rgba(243, 242, 238, 0.45);
  --accent: #e2a13c;               /* amber — founder's pick 2026-07-15 (#FF5A00 kept for compare via ?accent=orange) */
  --logo-color: var(--accent);      /* wordmark is a mask, recolorable independently via ?logo= */
  --sans: 'Hanken Grotesk', 'Trebuchet MS', 'Segoe UI', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --track-ui: 0.16em;      /* interactive mono: buttons, dialog labels */
  --track-caption: 0.17em; /* ambient mono: clock, footer */
  --track-stamp: 0.19em;   /* deliberate stamp look without sacrificing legibility */
  /* nav/footer gutters match the hero container (1400px max-width − 2×48px padding) */
  --gutter: max(48px, calc((100% - 1304px) / 2));
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color-scheme: dark;
  scrollbar-gutter: stable;
}

html.dialog-open,
body.dialog-open { overflow: hidden; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #0e1216; }

a { color: inherit; text-decoration: none; }

a, button, input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(226, 161, 60, 0.16);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 11px 14px;
  transform: translateY(calc(-100% - 20px));
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-ui);
}
.skip-link:focus-visible { transform: translateY(0); outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.nav .wordmark { display: inline-flex; align-items: center; position: relative; }
.nav .wordmark::after { content: ''; position: absolute; inset: -9px -8px; }
.nav .wordmark:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
/* wordmark ships as an alpha mask so its color is a CSS token, not baked into a PNG */
.nav .wm {
  display: block;
  width: 105px;
  height: 26px;
  background-color: var(--logo-color);
  -webkit-mask: url('assets/sweat-wordmark.png') no-repeat left center / contain;
  mask: url('assets/sweat-wordmark.png') no-repeat left center / contain;
}
@supports not ((-webkit-mask-repeat: no-repeat) or (mask-repeat: no-repeat)) {
  .nav .wm {
    background: url('assets/wordmark/sweat-amber.png') no-repeat left center / contain;
  }
}

.nav .clock {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: var(--track-caption);
  color: var(--ink-65);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

main {
  flex: 1;
  position: relative;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero-copy { padding: 72px 0; }

h1 {
  font-family: var(--sans);
  font-weight: 550;
  font-size: clamp(42px, 4.7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  font-optical-sizing: auto;
}

.sub {
  max-width: 540px;
  font-size: 21px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-92);
  margin: 26px 0 0;
}

.pedigree {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 46px;
}
.pedigree .plabel {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: var(--track-stamp);
  color: var(--ink-65);
  white-space: nowrap;
}
.pedigree img { display: block; width: auto; opacity: 0.88; }
/* heights are ink-mass-balanced, not uniform — Stripe's dense lowercase reads far heavier per px */
.pedigree img.stripe { height: 19px; }
.pedigree img.jpmorgan { height: 18px; transform: translateY(2px); }
.pedigree img.jefferies { height: 15px; }

.cta-row { display: flex; align-items: center; gap: 28px; margin-top: 40px; }

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: var(--track-ui);
  text-indent: var(--track-ui); /* cancels the trailing letter-space so the label optically centers */
  background: var(--accent);
  color: #0e1216;
  padding: 17px 30px;
  border-radius: 2px;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: #0e1216; }
}

/* ---------- skyline ---------- */

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 380px;
}
.hero-art .glow {
  position: absolute;
  inset: auto -20% -10% -20%;
  height: 70%;
  background: radial-gradient(60% 90% at 62% 100%, rgba(226, 161, 60, 0.08), rgba(226, 161, 60, 0) 70%);
  background: radial-gradient(60% 90% at 62% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.65; } to { opacity: 1; } }

.hero-art canvas {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: min(100%, 74vh);
  display: block;
}

/* full-bleed ground line the towers stand on */
.ground {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--ground);
  pointer-events: none;
}

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

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter) 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: var(--track-caption);
  color: var(--ink-65);
}

/* ---------- entrance ---------- */

.rise { opacity: 0; transform: translateY(22px); animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.rise.d1 { animation-delay: 0.12s; }
.rise.d2 { animation-delay: 0.26s; }
.rise.d3 { opacity: 1; animation-delay: 0.40s; }
.rise.d4 { opacity: 1; transform: translateY(14px); animation-duration: 0.62s; animation-delay: 0.16s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- dialog ---------- */

dialog {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  width: min(460px, calc(100vw - 32px));
  max-height: min(86vh, 86dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px 40px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transition: width 220ms ease;
}
dialog.cal-step { width: min(780px, calc(100vw - 32px)); }
dialog.cal-step { padding-top: 0; }
dialog.cal-step .dlg-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-top: 38px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  background: linear-gradient(to bottom, var(--bg-raise) 78%, rgba(21, 24, 28, 0));
}
.cal-inline { min-height: 480px; }
#calStep[hidden] { display: none; }
dialog::backdrop {
  background: rgba(10, 13, 16, 0.72);
  backdrop-filter: blur(4px);
}

.dlg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.dlg-head h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0;
}
.dlg-close {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px;
  font-family: var(--mono); font-size: 11px; letter-spacing: var(--track-ui);
  color: var(--ink-65); padding: 8px;
  margin: -8px;
}
.dlg-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .dlg-close:hover { color: var(--ink); }
}

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields label {
  display: flex; flex-direction: column; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: var(--track-ui);
  color: var(--ink-70);
}
.fields .full { grid-column: 1 / -1; }
.field-control { display: flex; flex-direction: column; gap: 8px; }
.fields input {
  background: var(--bg);
  border: 1px solid var(--line-strong); /* ≥3:1 against both the field fill and the dialog surface (WCAG 1.4.11) */
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  min-height: 48px;
  padding: 12px 13px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color 140ms ease, outline-color 140ms ease, background 140ms ease;
}
.fields input::placeholder { color: var(--ink-55); opacity: 1; }
.fields input:focus-visible { border-color: var(--accent); outline-color: rgba(226, 161, 60, 0.32); }
.fields input[aria-invalid="true"] { border-color: var(--accent); background: rgba(226, 161, 60, 0.04); }
.field-hint,
.field-error {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}
.field-hint { color: var(--ink-70); }
.field-error { color: var(--accent); }
.field-error[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.submit { width: 100%; margin-top: 26px; padding: 15px 0; }
.submit[disabled] { opacity: 0.6; cursor: default; }

#calStep { position: relative; min-height: 480px; outline: 2px solid transparent; outline-offset: 4px; }
#calStep:focus-visible { outline-color: var(--accent); }
.cal-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg-raise);
  color: var(--ink-70);
  font-family: var(--sans);
  font-size: 16px;
}
.cal-loading[hidden] { display: none; }
.cal-loading-line,
.cal-loading-grid {
  display: block;
  border: 1px solid var(--line);
  background: rgba(243, 242, 238, 0.035);
}
.cal-loading-line { width: 52%; height: 36px; }
.cal-loading-line-long { width: 78%; }
.cal-loading-grid { flex: 1; min-height: 280px; }

.success { display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 22px 0; }
.success[hidden] { display: none; }
.success:focus { outline: 2px solid transparent; outline-offset: 4px; }
.success:focus-visible { outline-color: var(--accent); }
.success .s-title { font-family: var(--sans); font-weight: 500; font-size: 26px; }
.success .s-body { font-size: 16.5px; line-height: 1.6; color: var(--ink-70); }
.success .s-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.success .s-body a:hover { text-decoration-thickness: 2px; }
.success .s-direct {
  align-self: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track-ui);
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px;
}
.success .s-direct[hidden] { display: none; }
.success .s-close {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  min-width: 44px; min-height: 44px; padding: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: var(--track-ui);
  color: var(--accent); margin-top: 0;
}
.success .s-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) and (min-width: 941px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr); gap: 40px; }
}

@media (max-width: 940px) {
  .nav { padding: 18px max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left)); }
  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
    align-items: start;
  }
  .hero-copy { padding: 48px 0 40px; }
  .sub { font-size: 19px; }
  .hero-art { min-height: 34vh; }
  .hero-art canvas { height: 100%; }
  footer { padding: 16px max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); flex-wrap: wrap; row-gap: 10px; }
}

@media (max-width: 520px) {
  .nav .clock { display: none; }
  .pedigree .plabel { flex-basis: 100%; }
  /* scale down so the headline keeps its composed 3-line break instead of stranding "On-Prem" */
  h1 { font-size: clamp(32px, 10vw, 44px); }
  .cta-row { margin-top: 34px; }
  .btn { width: 100%; text-align: center; }
  dialog { padding: 30px 22px 26px; }
  dialog.cal-step { padding-top: 0; }
  dialog.cal-step .dlg-head { padding-top: 30px; }
  .fields { grid-template-columns: 1fr; }
  .dlg-close { margin-right: -10px; }
  .dlg-close-esc { display: none; }
  .dlg-close-icon { font-size: 13px; }
  .hero-art { min-height: 30vh; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  .rise.d4 { opacity: 1; transform: none; }
  .hero-art .glow { animation: none; }
  .btn, .fields input, .dlg-close, dialog { transition: none; }
}

/* keep hyphenated compounds on one line regardless of typeface glyph coverage */
.nb { white-space: nowrap; }
