/* antiphase.dev: one stylesheet for the studio pages and the Tidewater page. Colours are the game's own (src/style.css). */
@import url(/fonts/fonts.css);

:root {
  --ink: #0f1d26;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --line: #e3d9c7;
  --muted: #5a625e;
  --bobber: #ef5b3c;
  --bobber-d: #c2412a;
  --brass: #f2b632;
  --teal: #2a9d8f;
  /* the water column, surface to seabed (sampled from the Stonebrook River scene) */
  --surface: #23414f;
  --shallow: #1a3340;
  --deep: #112532;
  --abyss: #0b1820;
  --seabed: #070f15;
  --foam: #e8efe9;
  --f-display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 600 1.0625rem/1.55 var(--f-body); color: var(--ink); background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* The game's button: thick ink outline and a pressed-down shadow */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 3px solid var(--ink); border-radius: 16px;
  font: 400 1.25rem/1 var(--f-display); letter-spacing: 0.01em; text-decoration: none; box-shadow: 0 4px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-go { background: var(--bobber); color: #fff; }
.btn-go:hover { background: #f26b4e; }
.btn-soon { background: var(--card); color: var(--muted); box-shadow: 0 4px 0 rgba(15, 29, 38, 0.35); border-color: rgba(15, 29, 38, 0.35); cursor: default; }
.btn img { width: 26px; height: 26px; }

/* The studio mark: two waves half a period apart */
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 900 1.375rem/1 var(--f-body); letter-spacing: -0.02em; }
.mark svg { width: 44px; height: 22px; flex: none; }

/* ---------- studio pages (home, privacy, 404) ---------- */
.studio header { padding: 28px 0; }
.studio main { padding-bottom: 72px; }
.studio h1 { font: 900 clamp(2.25rem, 6.4vw, 4.75rem)/1.02 var(--f-body); letter-spacing: -0.035em; margin: 0.5em 0 0.4em; max-width: 14ch; text-wrap: balance; }
.studio .lede { font-size: 1.25rem; color: var(--muted); max-width: 40ch; margin: 0 0 48px; }
.game { position: relative; display: block; border: 3px solid var(--ink); border-radius: 28px; overflow: hidden; box-shadow: 0 6px 0 var(--ink); text-decoration: none; background: var(--abyss); }
.game img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: left 70%; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.game:hover img { transform: scale(1.025); }
.game .say { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px clamp(20px, 4vw, 40px) clamp(20px, 3.4vw, 34px);
  background: linear-gradient(to top, rgba(7, 15, 21, 0.86), rgba(7, 15, 21, 0)); color: var(--card); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.game h2 { font: 400 clamp(2rem, 5.4vw, 3.75rem)/0.95 var(--f-display); margin: 0; text-shadow: 0 3px 0 var(--ink); }
.game p { margin: 6px 0 0; font-size: 1.0625rem; opacity: 0.9; }
.game .go { font: 400 1.125rem/1 var(--f-display); background: var(--brass); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 12px 18px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.hello { margin-top: 56px; display: grid; gap: 4px; }
.hello a { font: 800 1.375rem/1.3 var(--f-body); }
.studio footer { border-top: 2px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 0.9375rem; }
.studio footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.prose { max-width: 66ch; }
.prose h1 { max-width: none; font-size: clamp(2.25rem, 5vw, 3.25rem); }
.prose h2 { font: 900 1.375rem/1.25 var(--f-body); margin: 2em 0 0.4em; letter-spacing: -0.01em; }
.prose p, .prose li { margin: 0 0 0.9em; }
.prose ul { padding-left: 1.2em; }
.prose .updated { color: var(--muted); }

/* ---------- the Tidewater page: sky, surface, then down through the water to the seabed ---------- */
.tide { background: var(--seabed); color: var(--foam); }
.hero { position: relative; min-height: min(100svh, 920px); display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--surface); }
.hero .scene { position: absolute; inset: 0; }
.hero .scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left bottom; opacity: 0; transition: opacity 0.9s ease; }
.hero .scene img.on { opacity: 1; }
.hero .scene::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(to bottom, rgba(26, 51, 64, 0), var(--shallow)); }
.hero .bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.hero .mark { color: var(--card); }
/* the copy sits in the open sky on the right, clear of the rod and the cast bobber in the scene's left third */
.hero .copy { position: relative; z-index: 2; align-self: start; padding: clamp(24px, 9vh, 120px) var(--gutter) 40px max(var(--gutter), 46vw); }
.hero h1 { font: 400 clamp(3.5rem, 9vw, 8.5rem)/0.86 var(--f-display); margin-top: 0; margin-bottom: 0.18em; color: var(--card); text-shadow: 0 5px 0 var(--ink); letter-spacing: 0.005em; }
.hero h1 span { display: block; }
.hero .sub { font-size: clamp(1.125rem, 1.9vw, 1.375rem); max-width: 30ch; margin-top: 0; margin-bottom: 28px; color: var(--card); text-shadow: 0 1px 12px rgba(15, 29, 38, 0.55); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* The game's clock pill, as a switch between times of day */
.clock { display: inline-flex; padding: 4px; gap: 2px; background: var(--card); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); }
.clock button { appearance: none; border: 0; background: none; color: var(--ink); font: 800 0.9375rem/1 var(--f-body); padding: 8px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.clock button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.clock svg { width: 16px; height: 16px; }

.water { background: linear-gradient(to bottom, var(--shallow) 0, var(--deep) 46%, var(--abyss) 100%); }
.water section { padding-top: clamp(56px, 9vw, 112px); padding-bottom: clamp(56px, 9vw, 112px); }
.tide h2 { font: 400 clamp(2.25rem, 5vw, 3.75rem)/0.98 var(--f-display); margin: 0 0 0.35em; color: var(--card); text-wrap: balance; }
.tide .intro { font-size: 1.1875rem; max-width: 46ch; color: rgba(232, 239, 233, 0.82); margin: 0 0 44px; }

.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.phones li { display: grid; gap: 14px; align-content: start; }
.phones li:nth-child(2) { margin-top: clamp(0px, 5vw, 64px); }
.phones img { border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 6px 0 var(--ink), 0 24px 48px rgba(0, 0, 0, 0.35); background: var(--ink); aspect-ratio: 390 / 844; object-fit: cover; }
.phones p { margin: 0; font-weight: 800; font-size: 1.0625rem; color: var(--card); }

.waters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 24px); list-style: none; margin: 0; padding: 0; }
.waters li { position: relative; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--ink); }
.waters li:last-child { grid-column: 1 / -1; }
.waters img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left center; }
.waters li:last-child img { aspect-ratio: 21 / 8; object-position: center 45%; }
.waters div { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 16px; background: linear-gradient(to top, rgba(7, 15, 21, 0.85), rgba(7, 15, 21, 0)); }
.waters h3 { font: 400 clamp(1.5rem, 2.6vw, 2rem)/1 var(--f-display); margin: 0 0 4px; color: var(--card); }
.waters p { margin: 0; font-size: 0.9375rem; color: rgba(232, 239, 233, 0.86); }

.seabed { background: var(--seabed); padding: clamp(56px, 8vw, 96px) 0 0; }
.seabed .last { display: grid; gap: 22px; justify-items: start; padding-bottom: clamp(56px, 8vw, 96px); }
.seabed .last p { margin: 0; max-width: 44ch; color: rgba(232, 239, 233, 0.82); font-size: 1.125rem; }
.seabed footer { border-top: 2px solid rgba(232, 239, 233, 0.12); padding: 22px 0 36px; font-size: 0.9375rem; color: rgba(232, 239, 233, 0.66); }
.seabed footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.seabed footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.seabed .mark { color: var(--foam); font-size: 1.125rem; }

@media (max-width: 760px) {
  .hero { min-height: min(100svh, 860px); }
  .hero .scene img { object-position: 30% bottom; }
  .hero .copy { align-self: end; padding: 0 var(--gutter) 32px; }
  .hero .sub { max-width: 24ch; }
  .clock button span { display: none; }
  .clock button { padding: 8px 10px; }
  .phones { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .phones li { scroll-snap-align: start; }
  .phones li:nth-child(2) { margin-top: 0; }
  .waters { grid-template-columns: none; }
  .game .say { position: static; background: var(--ink); padding: 18px 20px 20px; }
  .game img { aspect-ratio: 4 / 3; object-position: left bottom; }
  .waters li:last-child img { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .scene img, .game img, .btn { transition: none; }
  .game:hover img { transform: none; }
}
