/* Shared styling for offshorevc.com, the landing page and its legal pages. */

/* ───────────────────────────────────────────────────────────────────────────
   FONTS

   Helvetica Now Display is a commercial Monotype face: not free, not on Google
   Fonts, not installed here and not committed. Asking for it alone meant
   falling through to Helvetica Neue on Mac and Arial on Windows/Android, two
   different sites depending on the visitor's OS.

   Inter Variable (SIL OFL, see inter-OFL.txt, shipped as the licence requires)
   is self-hosted and sits AHEAD of Helvetica Neue so every visitor renders
   identically. Drop licensed HelveticaNowDisplay .woff2 files beside this file
   and uncomment below; it is first in the stack and takes over everywhere the
   moment it exists.

   @font-face {
     font-family: 'Helvetica Now Display';
     src: url('./HelveticaNowDisplay-Regular.woff2') format('woff2');
     font-weight: 400; font-style: normal; font-display: swap;
   }
   @font-face {
     font-family: 'Helvetica Now Display';
     src: url('./HelveticaNowDisplay-Bold.woff2') format('woff2');
     font-weight: 700; font-style: normal; font-display: swap;
   }
   ─────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter Variable';
  src: url('./inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink:    #1d1d1f;
  --paper:  #ffffff;
  --accent: #c8f135;   /* the supplied Offshore yellow, == Speedrun's lime */
  --bg:     #000000;

  --r-pill: 99px;
  --r-glass: 26px;

  /* Cap height every centred word is set to, so OFFSHORE, PROJECTS and CONTACT
     read as one type size no matter how differently wide the words are. */
  --hero-h: clamp(30px, 7.4vw, 55px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Helvetica Now Display', 'Inter Variable', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body, button, input, select, textarea { font-family: var(--font); }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

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

/* ── Background ───────────────────────────────────────────────────────────── */
#field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block; z-index: 0;
}

/* Legibility scrim. The blobs drift, so no static placement can keep the words
   readable; this guarantees it every frame. */
.vignette {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top,    rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.62) 8%, rgba(0,0,0,0) 20%),
    linear-gradient(to bottom, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.30) 7%, rgba(0,0,0,0) 16%),
    radial-gradient(ellipse 52% 46% at 50% 50%,
              rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.74) 40%,
              rgba(0,0,0,0.36) 68%, rgba(0,0,0,0) 100%);
}

/* Catches every click that is not a control, and takes you home. */
.backdrop { position: fixed; inset: 0; z-index: 2; }
body[data-view="home"] .backdrop { pointer-events: none; }

/* ── The three words ──────────────────────────────────────────────────────── */
/* Positioned at the origin and moved entirely by transform, so the browser can
   run the whole flight on the compositor. nav.js writes the transform; this
   file owns everything else. transform-origin has to be the top-left corner,
   because the transform nav.js builds is "move this corner there, then scale". */
.word {
  position: fixed; top: 0; left: 0; z-index: 4;
  transform-origin: 0 0;
  display: block; line-height: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Hidden until nav.js has written the first transform, otherwise all three
     words flash stacked at the top-left corner on load. */
  opacity: 0;
}
.word img {
  display: block; height: var(--hero-h); width: auto;
  transition: opacity 0.22s ease;
}
.word .on { position: absolute; top: 0; left: 0; opacity: 0; }
.word .off { opacity: 0.72; }
.word.is-center .off { opacity: 1; }

/* The centred word is the page's title, not a control: clicks pass through it
   to the backdrop so "click anywhere outside" also means "click the heading". */
.word.is-center { pointer-events: none; }

body.ready .word {
  opacity: 1;
  transition: transform 0.78s var(--ease), opacity 0.5s ease;
}

/* Hover only where there is a real pointer. On a touchscreen a :hover rule
   makes the FIRST tap resolve the hover and the second one navigate, which is
   exactly the "I have to tap it twice" behaviour. */
@media (hover: hover) and (pointer: fine) {
  .word:not(.is-center):hover .off,
  .word:not(.is-center):focus-visible .off { opacity: 0; }
  .word:not(.is-center):hover .on,
  .word:not(.is-center):focus-visible .on  { opacity: 1; }
}
@media (hover: none) {
  .word:not(.is-center):active .off { opacity: 0; }
  .word:not(.is-center):active .on  { opacity: 1; }
}
.word:focus-visible { outline: none; }

/* ── Back arrow ───────────────────────────────────────────────────────────── */
.back {
  position: fixed; top: 24px; left: 26px; z-index: 6;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.6);
  border-radius: 50%;
  opacity: 0; pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease), color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.back svg { width: 22px; height: 22px; display: block; }
body:not([data-view="home"]) .back {
  opacity: 1; pointer-events: auto; transform: none;
  transition-delay: 0.34s;
}
.back:active { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .back:hover, .back:focus-visible { color: var(--accent); outline: none; }
}

/* ── Section contents ─────────────────────────────────────────────────────── */
/* Anchored to the middle of the viewport and pushed down past the centred word,
   so the list always hangs off the word regardless of how tall the word is. */
.sheet {
  position: fixed; left: 0; right: 0; top: 50%;
  z-index: 5;
  padding: calc(var(--hero-h) / 2 + clamp(26px, 5vh, 44px)) 24px 0;
  display: grid; justify-items: center; gap: 4px;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.45s var(--ease);
}
body[data-view="projects"] #sheet-projects,
body[data-view="contact"]  #sheet-contact {
  opacity: 1; pointer-events: auto; transform: none;
  transition-delay: 0.4s;
}

.entry {
  font-size: clamp(12px, 2.4vw, 15px);
  font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  padding: 11px 12px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 0.18s ease;
}
.entry:active { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .entry:hover, .entry:focus-visible { color: var(--accent); outline: none; }
}

/* ── Legal links ──────────────────────────────────────────────────────────── *
 * Sits inline under a sheet's entry (the email in Contact, the product link in
 * Projects) rather than fixed to the page, so each sheet can point at its own
 * Privacy/Terms. margin-top does the spacing from the entry above; the sheet's
 * own `gap` is left small on purpose so this reads as one deliberate jump, not
 * two accidents. */
.legal {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 18px;
}
.legal a {
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.36);
  text-decoration: none; padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease;
}
.legal a:active { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .legal a:hover, .legal a:focus-visible { color: var(--accent); outline: none; }
}

/* ── Legal pages ──────────────────────────────────────────────────────────── */
/* Privacy and Terms are long documents rather than a single word, so they keep
   a reading surface: the same dithered field behind a glass panel. */
body.page { overflow-y: auto; overflow-x: hidden; height: auto; }
body.page .vignette {
  background:
    linear-gradient(to top,    rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.34) 10%, rgba(0,0,0,0) 26%),
    linear-gradient(to bottom, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.22) 9%, rgba(0,0,0,0) 22%),
    radial-gradient(ellipse 70% 60% at 50% 50%,
              rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.34) 45%, rgba(0,0,0,0) 100%);
}

.shell {
  position: relative; z-index: 3;
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 6vh, 64px) clamp(18px, 5vw, 40px);
}

/* Three layers do the work: a tinted dark base for contrast, a diagonal white
   gradient for the sheen, and a blurred backdrop so the dithered field bleeds
   through instead of being hidden. */
.glass {
  position: relative;
  width: 100%;
  border-radius: var(--r-glass);
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(152deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.02) 38%,
      rgba(255,255,255,0.00) 62%,
      rgba(255,255,255,0.06) 100%),
    rgba(9,10,12,0.56);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 2px 12px rgba(0,0,0,0.40),
    0 40px 90px -24px rgba(0,0,0,0.80);
  overflow: hidden;
}

/* Specular highlight riding the top edge, the tell that reads as glass rather
   than as a flat translucent box. */
.glass::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse 120% 60% at 50% -18%,
              rgba(255,255,255,0.13) 0%, rgba(255,255,255,0) 60%);
}

/* A flat 1px border is the thing that gives translucent panels away: real glass
   catches light on the top-left rim and goes almost dark on the opposite one.
   This paints a gradient hairline by masking out the panel's interior, leaving
   only the 1px ring. Behind @supports so browsers without mask compositing keep
   the plain border above instead of getting a filled rectangle. */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .glass { border-color: transparent; }
  .glass::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(158deg,
      rgba(255,255,255,0.46) 0%,
      rgba(255,255,255,0.13) 26%,
      rgba(255,255,255,0.05) 52%,
      rgba(255,255,255,0.10) 74%,
      rgba(255,255,255,0.28) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
  }
}

.doc {
  max-width: 760px;
  padding: clamp(28px, 5vw, 52px) clamp(22px, 5vw, 52px) clamp(24px, 4vw, 36px);
}

.doc-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: clamp(30px, 6vh, 48px);
}
.doc-top .home-link { display: block; line-height: 0; padding: 8px 0; }
.doc-top .home-link img { height: 15px; width: auto; display: block; opacity: 0.85;
                          transition: opacity 0.18s ease; }

.back-link, .doc a.back {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
  text-decoration: none; padding: 8px 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .doc-top .home-link:hover img { opacity: 1; }
  .doc a.back:hover, .back-link:hover { color: var(--accent); }
}

.page-eyebrow {
  display: block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.doc h1 {
  font-size: clamp(30px, 6vw, 50px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.02;
  margin-bottom: 18px;
}
.lede {
  font-size: clamp(15px, 2.2vw, 17px); line-height: 1.6;
  color: rgba(255,255,255,0.66);
  max-width: 52ch; margin-bottom: 40px;
}

.rows { list-style: none; }
.row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.rows .row:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
.row-main { display: flex; flex-direction: column; gap: 5px; }
.row-name { font-size: clamp(17px, 2.6vw, 21px); font-weight: 700; letter-spacing: -0.025em; }
.row-desc { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.55); max-width: 46ch; }
.row-state {
  flex: none;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.row-state.live { background: var(--accent); color: var(--ink); }

.note {
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.45);
  max-width: 50ch;
}

.mini {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  width: 100%;
  margin-top: clamp(30px, 5vh, 44px);
  padding-top: clamp(18px, 3vh, 24px);
  border-top: 1px solid rgba(255,255,255,0.10);
}
.mini a {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.48); text-decoration: none; padding: 6px 2px;
  transition: color 0.18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .mini a:hover, .mini a:focus-visible { color: var(--accent); }
}

/* ── Long-form legal content (master ToS / privacy policy) ───────────────────
   .rows is for the short marketing-style legal pages. The master documents are
   long, numbered, and have tables, so they get their own scoped typography
   inside .doc-body rather than fighting the .row/.row-desc rules above. */
.doc .stamp {
  font-size: 12.5px; color: rgba(255,255,255,0.45);
  margin-bottom: clamp(28px, 5vh, 40px);
}
.doc-body h2 {
  font-size: clamp(17px, 2.4vw, 20px); font-weight: 700; letter-spacing: -0.02em;
  color: var(--paper);
  margin: 36px 0 12px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.doc-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.doc-body .schedule-title {
  font-size: clamp(20px, 3vw, 26px); font-weight: 700; letter-spacing: -0.03em;
  color: var(--accent);
  margin: 48px 0 4px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.doc-body .schedule-sub {
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 22px;
}
.doc-body h3 {
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.015em; color: var(--paper);
  margin: 22px 0 9px;
}
.doc-body p, .doc-body li { font-size: 14.5px; line-height: 1.62; color: rgba(255,255,255,0.62); }
.doc-body p { margin-bottom: 13px; }
.doc-body li { margin-bottom: 7px; }
.doc-body p strong, .doc-body li strong { color: var(--paper); font-weight: 700; }
.doc-body a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--accent);
              text-decoration-thickness: 2px; text-underline-offset: 2px; }
.doc-body ul, .doc-body ol { margin: 0 0 15px 20px; }

.doc-body .callout {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 13.5px; color: rgba(255,255,255,0.62);
  margin-bottom: 8px;
}
.doc-body .callout strong { color: var(--paper); }

.doc-body .tbl-wrap { overflow-x: auto; margin-bottom: 18px; }
.doc-body .tbl {
  width: 100%; border-collapse: collapse;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; overflow: hidden;
  font-size: 13px;
  display: block; overflow-x: auto; white-space: normal;
}
.doc-body .tbl thead, .doc-body .tbl tbody { display: table; width: 100%; }
.doc-body .tbl th, .doc-body .tbl td {
  text-align: left; padding: 10px 13px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  vertical-align: top;
}
.doc-body .tbl th {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05); white-space: nowrap;
}
.doc-body .tbl td { color: rgba(255,255,255,0.62); }
.doc-body .tbl tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 720px) {
  .back { top: 18px; left: 18px; }
  .row { flex-direction: column; align-items: flex-start; gap: 10px; }
  :root { --r-glass: 22px; }
  .doc-body .tbl th, .doc-body .tbl td { padding: 8px 10px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  body.ready .word { transition: none; }
  .sheet, .back { transition: opacity 0.01s linear; }
}
