/* Blind Harbor Studio — hand-drawn sky, white, and a little pink. */

@font-face {
  font-family: "Mansalva";
  src: url("fonts/mansalva.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shantell Sans";
  src: url("fonts/shantell-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shantell Sans";
  src: url("fonts/shantell-sans-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --sky: #a9dbf7;
  --sky-2: #7fc4ec;
  --sky-ink: #2a6f9e;
  --paper: #ffffff;
  --mist: #eef7fd;
  --ink: #173049;
  --night: #0f2740;
  --night-2: #16365a;
  --moon: #e4f2fc;
  --pink: #ff86b4;

  --hand: "Mansalva", "Segoe Print", "Bradley Hand", cursive;
  --body: "Shantell Sans", "Segoe UI", system-ui, sans-serif;

  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 64ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--night);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variation-settings: "INFM" 35, "BNCE" 0;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--sky-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--sky-2);
}
a:hover { text-decoration-color: currentColor; }

/* Focus ring: dark ink on light areas, moonlight on dark ones (3:1+ either way) */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.night :focus-visible,
.foot :focus-visible,
.on-dark :focus-visible { outline-color: var(--moon); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Hidden SVG holding the rough-edge filters */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Hand-drawn primitives ---------- */

/* Wobbly outline drawn on a pseudo-element so the text stays crisp */
.sketch { position: relative; }
.sketch::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2.5px solid var(--ink);
  border-radius: inherit;
  filter: url(#rough-1);
  pointer-events: none;
}
.sketch { border-radius: var(--wobble); }
.sketch--boil::before { animation: boil 0.75s steps(1) infinite; }

@keyframes boil {
  0% { filter: url(#rough-1); }
  33% { filter: url(#rough-2); }
  66% { filter: url(#rough-3); }
}

.scribble-under {
  display: block;
  width: min(220px, 70%);
  height: 14px;
  margin-top: 2px;
  color: var(--sky-2);
}

.btn {
  --btn-bg: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 1.2em 0.6em;
  background: var(--btn-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: var(--wobble);
  cursor: pointer;
  transition: transform 0.2s ease, font-variation-settings 0.3s ease;
}
.btn:hover {
  transform: rotate(-1.5deg) translateY(-2px);
  font-variation-settings: "INFM" 100, "BNCE" 80;
}
.btn--ghost { --btn-bg: transparent; }

/* ---------- Header / sky ---------- */

.sky {
  position: relative;
  background: var(--sky);
  padding: 0 var(--gutter);
  overflow: hidden;
  isolation: isolate;
}

.topnav {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 0;
  font-weight: 600;
}
.topnav a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 2px;
  transition: font-variation-settings 0.3s ease;
}
.topnav a:hover {
  font-variation-settings: "INFM" 100, "BNCE" 100;
  text-decoration: underline wavy var(--ink) 1.5px;
  text-underline-offset: 6px;
}
.topnav a[aria-current="page"] {
  text-decoration: underline wavy var(--pink) 2px;
  text-underline-offset: 6px;
}
.topnav .home-link { margin-right: auto; font-family: var(--hand); font-weight: 400; font-size: 1.35rem; }

/* Pause/play for everything that moves on its own */
.motion-toggle {
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-decoration: underline dotted var(--ink) 1.5px;
  text-underline-offset: 6px;
  cursor: pointer;
}
.motion-toggle:hover { text-decoration-style: wavy; }
.is-still *,
.is-still *::before,
.is-still *::after { animation-play-state: paused !important; }

.clouds {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.cloud-lane {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% - 340px);
}
.cloud-lane--left { left: 1%; }
.cloud-lane--right { right: 1%; }

/* Clouds wander inside their own lane so they never pass behind the logo */
.cloud {
  position: absolute;
  width: var(--w);
  color: var(--ink);
  animation: wander ease-in-out infinite alternate;
}
.cloud--a { --w: 170px; top: 15%; animation-duration: 46s; }
.cloud--c { --w: 110px; top: 40%; animation-duration: 63s; animation-delay: -30s; opacity: 0.85; }
.cloud--b { --w: 140px; top: 36%; animation-duration: 54s; animation-delay: -12s; }

@keyframes wander {
  from { left: 0; }
  to { left: calc(100% - var(--w)); }
}

@media (max-width: 1080px) {
  .clouds { display: none; }
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(8px, 3vw, 24px) 0 clamp(120px, 16vw, 190px);
}

.lighthouse {
  position: relative;
  width: min(560px, 88vw);
  margin: 0;
}
.lighthouse h1 { margin: 0; }
.lighthouse img { position: relative; z-index: 2; width: 100%; }

/* Beam pivots on the lamp: 49.3% across, 11.5% down the cropped logo */
.beam {
  position: absolute;
  z-index: 1;
  left: 49.3%;
  top: 11.5%;
  width: 300%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* The lamp sits at user-space 0,0 inside the beam SVG, so pivot exactly there */
.beam__sweep {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: sweep 9s ease-in-out infinite;
}
.beam__glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: flare 9s ease-in-out infinite;
}

@keyframes sweep {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(-1); }
  100% { transform: scaleX(1); }
}
@keyframes flare {
  0%, 50%, 100% { opacity: 0.35; transform: scale(0.8); }
  25%, 75% { opacity: 1; transform: scale(1.35); }
}

/* Social icon tiles under the logo */
.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.socials + .hero__actions { margin-top: 1.2rem; }
.social.sketch {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--paper);
  border-radius: 14px 7px 12px 6px / 7px 13px 6px 14px;
  transform: rotate(-2deg);
  transition: transform 0.2s ease;
}
.social:hover { transform: rotate(3deg) translateY(-3px); }
.social svg { width: 30px; height: 30px; }

.tagline {
  margin: clamp(10px, 2vw, 22px) 0 0;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.4vw, 2.5rem);
  line-height: 1.25;
  text-wrap: balance;
}
.tagline span { display: block; }
.tagline span + span { margin-top: 0.15em; }
.hero__lede {
  max-width: 46ch;
  margin: 1rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  margin-top: 1.6rem;
}

.waves {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  z-index: 2;
  width: 100%;
  height: clamp(70px, 9vw, 120px);
  pointer-events: none;
}
.waves__front { animation: lap 7s ease-in-out infinite alternate; }
.waves__back { animation: lap 9s ease-in-out infinite alternate-reverse; }
@keyframes lap {
  from { transform: translateX(-18px); }
  to { transform: translateX(18px); }
}

/* ---------- Notebook (day) ---------- */

.daybook {
  padding: clamp(28px, 5vw, 60px) var(--gutter) clamp(60px, 8vw, 110px);
}
.daybook__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.section-title {
  margin: 0 0 0.3em;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
}

/* Ruled notebook page */
.notebook {
  position: relative;
  padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px) clamp(24px, 4vw, 40px) clamp(48px, 7vw, 92px);
  background:
    linear-gradient(90deg, transparent calc(clamp(32px, 5vw, 66px) - 1px), var(--pink) calc(clamp(32px, 5vw, 66px) - 1px), var(--pink) calc(clamp(32px, 5vw, 66px) + 1px), transparent calc(clamp(32px, 5vw, 66px) + 1px)),
    radial-gradient(circle, rgba(127, 196, 236, 0.75) 1.3px, transparent 1.6px) 0 0 / 24px 24px,
    var(--paper);
  border-radius: var(--wobble-2);
}
.notebook + .notebook { margin-top: clamp(28px, 4vw, 48px); }

.entry { max-width: var(--measure); }
.entry + .entry {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 2px dashed var(--sky-2);
}
.entry h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  font-variation-settings: "INFM" 60, "BNCE" 20;
}
.entry time {
  display: inline-block;
  margin: 0.2rem 0 0.4rem;
  color: var(--sky-ink);
  font-weight: 600;
  font-size: 1rem;
}
.entry p { margin: 0.5rem 0 0; }

.faq dt {
  margin-top: 1.4rem;
  font-weight: 700;
  font-size: 1.2rem;
  font-variation-settings: "INFM" 60, "BNCE" 20;
}
.faq dt:first-child { margin-top: 0.6rem; }
.faq dd { margin: 0.3rem 0 0; max-width: var(--measure); }

/* Index cards in the side column */
.cards { display: grid; gap: clamp(30px, 4vw, 46px); }

.card {
  position: relative;
  padding: 30px clamp(20px, 2.5vw, 30px) 26px;
  background: var(--paper);
}
.card:nth-child(1) { transform: rotate(-1deg); }
.card:nth-child(2) { transform: rotate(0.8deg); background: var(--mist); }
.card:nth-child(3) { transform: rotate(-0.6deg); }

.card .section-title { font-size: clamp(2rem, 3.6vw, 2.6rem); }
.card p { margin: 0.6rem 0 0; }

.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 104px;
  height: 28px;
  background: rgba(169, 219, 247, 0.78);
  border-left: 2px dotted rgba(23, 48, 73, 0.25);
  border-right: 2px dotted rgba(23, 48, 73, 0.25);
  transform: translateX(-50%) rotate(-4deg);
  z-index: 2;
}

.card__shot {
  display: block;
  margin: 0.2rem 0 1rem;
  padding: 8px 8px 10px;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
  border-radius: 3px;
  transform: rotate(1.2deg);
  transition: transform 0.25s ease;
}
.card__shot:hover { transform: rotate(-1deg) scale(1.02); }

.card .btn { margin-top: 1rem; }

/* ---------- Dusk ---------- */

.dusk {
  position: relative;
  height: clamp(200px, 26vw, 320px);
  background: linear-gradient(to bottom, var(--paper) 0%, var(--sky) 38%, #c9d7f0 58%, #f6c7da 70%, var(--night-2) 86%, var(--night) 100%);
  overflow: hidden;
}
.dusk__horizon {
  position: absolute;
  left: 0; right: 0;
  top: 69%;
  width: 100%;
  height: 22px;
  color: var(--pink);
}
.dusk__note {
  position: absolute;
  left: 50%;
  top: 30%;
  margin: 0;
  transform: translateX(-50%) rotate(-2deg);
  font-family: var(--hand);
  font-size: clamp(1.4rem, 3vw, 2rem);
  white-space: nowrap;
}

/* ---------- Night / the game ---------- */

.night {
  position: relative;
  background: var(--night);
  color: var(--moon);
  padding: clamp(20px, 4vw, 40px) var(--gutter) clamp(60px, 8vw, 100px);
}
.night a { color: var(--sky); text-decoration-color: rgba(169, 219, 247, 0.5); }

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 520px;
  color: var(--moon);
  pointer-events: none;
}
.stars circle { fill: currentColor; }
.stars circle { animation: twinkle 5s ease-in-out infinite; }
.stars circle:nth-child(3n) { animation-delay: -1.7s; }
.stars circle:nth-child(3n + 1) { animation-delay: -3.3s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.game__head {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}
.game__title {
  margin: 0;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(3.2rem, 10vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  color: var(--moon);
}
.game__lede {
  max-width: 52ch;
  margin: 1.2rem 0 0;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}
.game__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.game__facts li {
  padding: 4px 14px 6px;
  border: 2px solid rgba(228, 242, 252, 0.55);
  border-radius: var(--wobble);
  font-size: 1rem;
}

.gallery {
  max-width: 1200px;
  margin: clamp(28px, 4vw, 44px) auto 0;
}

.prints {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.print { grid-column: span 4; }
.print--wide { grid-column: span 8; }
.print--half { grid-column: span 6; }
.print:nth-child(odd) { transform: rotate(-0.8deg); }
.print:nth-child(even) { transform: rotate(0.9deg); }
.print:nth-child(3n) { transform: rotate(-1.4deg); }

.print__open {
  display: block;
  width: 100%;
  padding: 10px 10px 0;
  background: var(--moon);
  border: 0;
  border-radius: 3px;
  cursor: zoom-in;
  font: inherit;
  color: var(--night);
  text-align: left;
  transition: transform 0.25s ease;
}
.print__open:hover { transform: translateY(-3px) rotate(-0.6deg); }
.print__open img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--night-2);
}
.print__caption {
  display: block;
  padding: 8px 4px 12px;
  font-family: var(--hand);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.2;
}

.wip-note {
  max-width: 1200px;
  margin: clamp(30px, 4vw, 44px) auto 0;
  font-size: 1rem;
}

/* Lightbox */
.lightbox {
  width: min(1400px, 96vw);
  max-height: 94vh;
  padding: 14px 14px 10px;
  background: var(--moon);
  color: var(--night);
  border: 0;
  border-radius: 4px;
}
.lightbox::backdrop { background: rgba(8, 22, 38, 0.86); }
.lightbox img { width: 100%; max-height: calc(94vh - 90px); object-fit: contain; background: var(--night); }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}
.lightbox__bar p { margin: 0; font-family: var(--hand); font-size: 1.4rem; }
.lightbox .btn { --btn-bg: var(--paper); }

/* ---------- Footer ---------- */

.foot {
  background: var(--night);
  color: var(--moon);
  padding: clamp(30px, 5vw, 60px) var(--gutter) 36px;
  border-top: 2px dashed rgba(228, 242, 252, 0.2);
}
.foot__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.foot__logo { width: 170px; opacity: 0.9; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.foot a { color: var(--sky); }
.foot small { display: block; margin-top: 12px; font-size: 0.95rem; opacity: 0.8; }

/* ---------- Inner pages (privacy, press kit, 404) ---------- */

.sky--short .hero { padding-bottom: clamp(100px, 12vw, 150px); }
.page-title {
  margin: clamp(10px, 3vw, 30px) 0 0;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
}
.small-logo { width: min(250px, 60vw); }

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(60px, 8vw, 100px);
}
.prose h2 {
  margin: 2.4rem 0 0.4rem;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  line-height: 1.1;
}
.prose h3 { margin: 1.6rem 0 0.2rem; font-size: 1.2rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35rem; }
.prose .effective { color: var(--sky-ink); font-weight: 600; }

.short-version {
  margin: 0 0 1rem;
  padding: 28px clamp(20px, 3vw, 34px) 24px;
  background: var(--mist);
  transform: rotate(-0.6deg);
}
.short-version h2 { margin-top: 0; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 22px;
  margin: 1rem 0 0;
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.press-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.press-shots a { display: block; text-decoration: none; }
.press-shots img { border-radius: 3px; box-shadow: 0 0 0 2px var(--ink); aspect-ratio: 16 / 9; object-fit: cover; }
.press-shots span { display: block; margin-top: 6px; font-size: 1rem; }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.logo-grid li { padding: 14px; border-radius: 4px; box-shadow: 0 0 0 2px var(--ink); }
.logo-grid .on-dark { background: var(--night); color: var(--moon); }
.logo-grid .on-dark a { color: var(--sky); }
.logo-grid img { aspect-ratio: 1; object-fit: contain; margin-bottom: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .daybook__grid { grid-template-columns: 1fr; }
  .print, .print--wide, .print--half { grid-column: span 6; }
  .print--wide { grid-column: span 12; }
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .topnav { justify-content: center; gap: 0.25rem 1rem; }
  .topnav .home-link { width: 100%; text-align: center; margin-right: 0; }
  .print, .print--wide, .print--half { grid-column: span 12; }
  .foot__inner { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .dusk__note { white-space: normal; width: 86%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .cloud { left: 20%; }
  .beam__sweep { transform: scaleX(0.75); }
  .motion-toggle { display: none; }
}

@media print {
  .sky, .dusk, .clouds, .beam, .waves, .motion-toggle { display: none; }
  .night, .foot { background: none; color: var(--ink); }
}
