/* FAROS: the new site. The homepage is the 3D harbour (assets/js/app.js); the pages the boats open
   share this sheet. Palette and type carry over from the first site. */

:root {
  --ink: #04070f;
  --deep: #070c17;
  --navy: #0a1328;
  --line: rgba(150, 180, 214, 0.16);
  --paper: #f2ede1;
  --bright: #fbf7ee;
  --body: #a9b4c4;
  --muted: #8794a8;
  --gold: #ffd79a;
  --gold-dim: #c9a961;
  --serif: Spectral, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }

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

/* ---------------------------------------------------------------- the bar (both pages) */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 18px;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--paper); }
.wordmark span { font-size: 16px; font-weight: 600; letter-spacing: .2em; }
.bar__links { display: flex; gap: 22px; }
.bar__links a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--paper);
  padding: 8px 14px; border: 1px solid var(--line); background: rgba(7, 12, 23, 0.55); backdrop-filter: blur(6px);
}
.bar__links a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------------------- the harbour (homepage) */
body.harbour { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; touch-action: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.caption { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; will-change: transform; }
.caption__in {
  transform: translate(-50%, calc(-100% - 14px));
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  padding: 10px 14px 10px 16px; background: rgba(7, 12, 23, 0.72); border: 1px solid rgba(255, 215, 154, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0; translate: 0 6px; transition: opacity .45s ease, translate .45s ease, border-color .2s ease;
}
.caption.is-on .caption__in { opacity: 1; translate: 0 0; pointer-events: auto; }
.caption.is-hot .caption__in { border-color: var(--gold); }
.caption__label { font-size: 19px; color: var(--bright); }
.caption__link { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--ink); background: var(--gold); padding: 6px 11px; }
.caption__link:hover { background: #fff; color: var(--ink); }

.hint {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 4; margin: 0;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  opacity: 0; transition: opacity .8s ease;
}
.hint.is-on { opacity: .85; }
.hint::after { content: ""; display: block; width: 1px; height: 22px; margin: 10px auto 0; background: linear-gradient(var(--muted), transparent); }

.loader {
  position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; gap: 22px; justify-items: center;
  background: var(--ink); transition: opacity .8s ease;
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader__word { font-size: 20px; font-weight: 600; letter-spacing: .5em; padding-left: .5em; color: var(--paper); }
.loader__track { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.loader__track span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s ease; }

.fallback {
  position: fixed; inset: 0; z-index: 9; overflow: auto; background: var(--ink);
  padding: 120px var(--gutter) 60px; font-size: 20px;
}
.fallback__lead { color: var(--body); max-width: 560px; line-height: 1.6; }
.fallback ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }

/* ---------------------------------------------------------------- the pages the boats open */
body.page { min-height: 100vh; background: radial-gradient(120% 70% at 15% 0%, #0f1b33 0%, var(--ink) 60%); }
.page .bar { position: absolute; }
.page main { max-width: 980px; margin: 0 auto; padding: 140px var(--gutter) 80px; }
.page__boat { display: block; width: min(420px, 80%); height: auto; margin: 0 0 18px -12px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.page__label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.page h1 { margin: 18px 0 0; font-weight: 400; font-size: clamp(32px, 5vw, 56px); line-height: 1.12; color: var(--bright); max-width: 820px; text-wrap: pretty; }
.page .lead { margin: 26px 0 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.75; font-weight: 300; color: var(--body); max-width: 700px; }
.flag { border: 1px dashed #7d6a34; background: #12182a; padding: 18px 22px; margin-top: 40px; max-width: 700px; }
.flag p { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #d8c48a; }
.back { display: inline-block; margin-top: 44px; font-family: var(--mono); font-size: 13px; letter-spacing: .05em; }
.page footer { border-top: 1px solid var(--line); padding: 28px var(--gutter) 40px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-align: center; }
