/* ==========================================================================
   Ship Happens* — landing page
   Design tokens transcribed from the handoff. Brand rule: radius is 0 everywhere.
   ========================================================================== */

:root {
  --bg:            #161310;  /* page black          */
  --bg-raised:     #1c1915;  /* elevated black      */
  --text:          #f2efe8;  /* cream               */
  --accent:        #f84b1e;  /* orange              */
  --accent-hover:  #ff6a3d;
  --accent-dark:   #7c2408;  /* text on orange      */
  --grey:          #9b9385;
  --grey-muted:    #8a8173;
  --grey-faint:    #6e675c;
  --line:          #2b2721;  /* hairlines           */
  --line-card:     #38332c;  /* cards               */
  --line-strong:   #45403a;  /* buttons, dashed     */

  --shadow-hard:   5px 5px 0 var(--accent);
  --gutter:        clamp(20px, 4vw, 32px);
  --measure:       960px;

  --font-ui:       'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol { margin: 0; }
ol { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }

a { color: inherit; }
a:hover { color: var(--accent); }

/* Custom anchor cursor — cream fill + dark stroke keeps it legible on both
   the dark background and the orange CTAs. Hotspot 12/12 (center). */
a, button {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M12 3a2.4 2.4 0 1 0 0 4.8A2.4 2.4 0 0 0 12 3zm-1 5.8v9.4c-2.8-.5-5-2.6-5.6-5.2h2.1L4 9.5 0.5 13h2c.6 4 4 7.2 8.5 7.2s7.9-3.2 8.5-7.2h2L18 9.5 14.5 13h2.1c-.6 2.6-2.8 4.7-5.6 5.2V8.8z' fill='%23f2efe8' stroke='%23161310' stroke-width='.8'/></svg>") 12 12, pointer;
}

::selection { background: var(--accent); color: var(--bg); }

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

.mono { font-family: var(--font-mono); }
.ast  { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  padding: 10px 18px;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  color: var(--bg);
}

/* --- shared bits ---------------------------------------------------------- */

.logo-mark {
  background: var(--accent);
  color: var(--bg);
  padding: 2px 8px;
}

.tag {
  font-size: 10.5px;
  letter-spacing: .14em;
  background: var(--accent);
  color: var(--bg);
  padding: 4px 10px;
}

.btn-solid {
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  white-space: nowrap;
}
.btn-solid:hover { background: var(--accent-hover); color: var(--bg); }

.btn-outline {
  text-decoration: none;
  font-size: 15px;
  padding: 13px 26px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

.btn-ghost {
  text-decoration: none;
  font-size: 12px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

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

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
}
.logo:hover { color: inherit; }

/* SOS easter egg — both logo lockups flip 180° for 2.6s (springy) */
[data-logo] {
  transition: transform .8s cubic-bezier(.34, 1.56, .64, 1);
}
[data-logo].capsized { transform: rotate(180deg); }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--grey);
}
.nav-links a { text-decoration: none; }

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 56px clamp(16px, 4vw, 24px) 72px;
}

.badge {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--grey);
  border: 1px solid var(--line-card);
  padding: 6px 14px;
  white-space: nowrap;
  max-width: 90vw;
}

.hero h1 {
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.02em;
  max-width: 900px;
  text-wrap: balance;
}

.mark {
  background: var(--accent);
  color: var(--bg);
  padding: 0 .14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-sub {
  font-size: 18px;
  color: var(--grey);
  max-width: 520px;
  line-height: 1.5;
}

.countdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line-card);
  background: var(--bg-raised);
  padding: 22px clamp(16px, 5vw, 40px);
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.countdown-label {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--grey);
}

.countdown-digits {
  display: flex;
  gap: clamp(10px, 3vw, 26px);
  justify-content: center;
}

.unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.num {
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.cap {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--grey-faint);
}

.colon {
  font-size: clamp(26px, 7vw, 42px);
  color: var(--line-card);
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- ticker --------------------------------------------------------------- */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 11px 0;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 26s linear infinite;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--grey);
  white-space: nowrap;
}

.ticker-chunk { padding-right: 48px; }

.anchor-glyph {
  font-size: 15px;
  vertical-align: -1px;
}

.blink { animation: blink 1.1s step-end infinite; }

@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- section scaffolding -------------------------------------------------- */

.wave-divider {
  height: 12px;
  background:
    repeating-linear-gradient(135deg, var(--accent) 0 8px, transparent 8px 16px) top / 100% 6px no-repeat,
    var(--bg);
}

.band              { border-bottom: 1px solid var(--line); background: var(--bg); }
.band--raised      { background: var(--bg-raised); }
.band--flush       { border-bottom: 0; }
.band--log         { border-bottom: 0; border-top: 1px solid var(--line); }

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 60px) var(--gutter) clamp(44px, 7vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

#deal.section  { padding-top: clamp(44px, 7vw, 64px); }
.section--loop { padding: clamp(56px, 9vw, 88px) var(--gutter) clamp(72px, 11vw, 110px); }

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.num-badge {
  font-size: 13px;
  font-weight: 700;
  background: var(--accent);
  color: var(--bg);
  padding: 5px 11px;
}

.eyebrow-text {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--grey-muted);
}
#crew .eyebrow-text { color: var(--grey); }
#log .eyebrow-text  { color: var(--grey-muted); }

.section h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.05;
}

.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--grey);
  max-width: 640px;
}

/* --- 01 the deal ---------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--line-card);
  overflow: hidden;
  text-align: center;
  margin-top: 8px;
}

.stat {
  padding: 26px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat:nth-child(2) {
  border-left: 1px solid var(--line-card);
  border-right: 1px solid var(--line-card);
}

.stat-num {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 900;
}
.stat-num--accent { color: var(--accent); }

.stat-cap {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--grey-muted);
}

/* --- 02 the crew ---------------------------------------------------------- */

.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.crew-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  border: 1.5px solid var(--line-card);
  padding: 28px 20px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-hard);
}

.pfp {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

.crew-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.crew-bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey);
}

.handle {
  font-size: 12px;
  color: var(--grey-muted);
  text-decoration: none;
  white-space: nowrap;
}
.handle:hover { color: var(--accent); }

/* --- 03 the fleet --------------------------------------------------------- */

.flagship {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line-card);
  padding: 28px;
  box-shadow: var(--shadow-hard);
}

.flagship-shot {
  width: 280px;
  flex: none;
  max-width: 100%;
}
.flagship-shot img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: var(--bg-raised);
}

.flagship-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}

.flagship-title {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 400;
  font-size: inherit;
}

.flagship-name {
  font-size: 30px;
  font-weight: 900;
}

.flagship-copy {
  font-size: 15px;
  line-height: 1.55;
  color: var(--grey);
}

.track-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .08em;
}
.track-link:hover { color: var(--accent-hover); }

.mystery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.mystery-card {
  border: 1px dashed var(--line-strong);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mystery-kicker {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--accent);
}

.mystery-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.mystery-copy {
  font-size: 13.5px;
  color: var(--grey);
}

/* --- 04 the loop ---------------------------------------------------------- */

.loop {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.loop-step {
  flex: 1;
  min-width: 130px;
  border: 1px solid var(--line-card);
  background: var(--bg-raised);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loop-day {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--grey-muted);
}

.loop-title {
  font-size: 20px;
  font-weight: 900;
}

.loop-step--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}
.loop-step--accent .loop-day { color: var(--accent-dark); }

.loop-arrow {
  align-self: center;
  font-size: 20px;
  color: var(--grey-muted);
}

/* --- 05 captain's log ----------------------------------------------------- */

.log {
  display: flex;
  flex-direction: column;
}

.log-row {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.log-num {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .14em;
  white-space: nowrap;
}

.log-date {
  font-size: 12px;
  color: var(--grey-faint);
  white-space: nowrap;
}

.log-text {
  font-size: 14px;
  color: var(--grey);
  flex: 1;
  min-width: 200px;
}
.log-text--next { color: var(--text); }

.log-chip {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--grey);
  border: 1px solid var(--line-card);
  padding: 3px 8px;
  white-space: nowrap;
}
.log-chip--next {
  color: var(--bg);
  background: var(--accent);
  border: 0;
  padding: 3px 8px;
}

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 64px 24px 44px;
}

.sos-btn {
  font-size: 11px;
  letter-spacing: .16em;
  background: none;
  border: 1px dashed var(--line-strong);
  color: var(--grey);
  padding: 8px 16px;
}
.sos-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-logo .logo-mark { padding: 2px 14px; }

.footer-tagline {
  font-size: 13px;
  color: var(--grey);
  white-space: nowrap;
}

.footer-handles {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: var(--grey);
}
.footer-handles a { text-decoration: none; }

.footer-legal {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--grey-faint);
}

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

@media (max-width: 680px) {
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .blink { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
