@font-face {
  font-family: "N Haas Grotesk";
  src: url("/assets/fonts/NHaasGroteskDSPro-75Bd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff7c22;
  --blue: #3204f5;
  --black: #000;
  --white: #fff;
  --gutter: clamp(16px, 4vw, 64px);
  /* Type scale (same on every page) */
  --fs-headline: clamp(24px, 3.45vw, 46px);  /* big statements: shop, about, episodes */
  --fs-body: clamp(18px, 2vw, 28px);         /* nav, buttons, secondary lines */
  --fs-small: 12px;                          /* footer */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  font-family: "N Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-synthesis: none;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

body.theme-blue { background: var(--blue); }

a { color: inherit; }

/* Header */
.site-header {
  padding: clamp(20px, 3.4vw, 60px) var(--gutter) 0;
  text-align: center;
}
.logo { display: inline-block; width: min(78vw, 1370px, 120vh); line-height: 0; }
.logo img { width: 100%; height: auto; }

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap; /* menu always stays on one line */
  font-size: min(var(--fs-body), calc((100vw - 2 * var(--gutter)) / 14.8));
  gap: 0.4em clamp(22px, 4.4vw, 78px);
  margin-top: clamp(4px, 0.8vw, 14px);
}
.nav a {
  text-decoration: none;
  font-size: inherit;
  line-height: 1.1;
  letter-spacing: 0.005em;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--orange); }

/* Main */
main {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 90px) var(--gutter);
}

/* Footer */
.site-header, .site-footer { flex-shrink: 0; }
.site-footer {
  padding: 0 var(--gutter) clamp(20px, 2.4vw, 36px);
  text-align: center;
  color: var(--orange);
  font-size: var(--fs-small);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.site-footer a { color: var(--orange); }
.site-footer p { margin: 0; }

/* Play */
.game-frame {
  display: block;
  width: min(100%, 540px);
  flex: 1 1 0;
  min-height: 0;
  border: 0;
  background: #000;
}
body.page-play main { padding-block: clamp(16px, 2vw, 32px); }

/* Coming soon */
.coming-soon {
  margin: 0;
  font-size: var(--fs-headline);
  line-height: 1.12;
  text-align: center;
}

/* About */
.about { text-align: center; max-width: 1320px; }
.about h1 {
  margin: 0;
  font-size: var(--fs-headline);
  line-height: 1.12;
  font-weight: 700;
}
.about h1 .hl { color: var(--orange); }
.about h1 { text-wrap: balance; }
.about p { margin: clamp(28px, 4vw, 70px) 0 clamp(20px, 2.6vw, 44px); font-size: var(--fs-body); line-height: 1.15; }

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--black);
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  font: inherit;
  text-transform: uppercase;
  font-size: var(--fs-body);
  padding: 0.5em 0.9em 0.45em;
  cursor: pointer;
}
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* Shop */
.shop {
  max-width: 100%;
  display: grid;
  grid-template-columns: auto auto;   /* shrink to content so the whole group sits in the middle */
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
}
.hat {
  --hat-h: calc(100dvh - 400px);
  position: relative; outline: none; margin-inline: auto;
  width: min(34vw, 460px, max(120px, calc(var(--hat-h) * 1.1614)));
  aspect-ratio: 734 / 632;
}
.hat img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hat .hat-worn { object-fit: cover; opacity: 0; transition: opacity 0.2s ease; }
.hat:hover .hat-worn, .hat:focus .hat-worn { opacity: 1; }
.shop h1 { margin: 0; font-size: var(--fs-headline); white-space: nowrap; line-height: 1.12; font-weight: 700; }
.shop h1 .hl { color: var(--orange); }

.signup { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3vw, 48px); }
.signup-email {
  flex: 1 1 240px; min-width: 0;
  font: inherit; text-transform: uppercase;
  font-size: var(--fs-body);
  padding: 0.5em 0.7em 0.45em;
  border: 3px solid var(--white); border-radius: 8px;
  background: var(--blue); color: var(--white);
}
.signup-email::placeholder { color: var(--white); opacity: 1; }
.signup-email:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.signup-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.shop .btn { color: var(--blue); }
.btn:disabled { opacity: 0.6; cursor: default; }
.signup-msg { margin: 14px 0 0; min-height: 1.2em; font-size: clamp(14px, 1.4vw, 22px); color: var(--orange); }

/* Privacy / prose */
.prose {
  width: min(100%, 770px);
  align-self: center;
  text-transform: none;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.32;
}
.prose p { margin: 0 0 1.5em; }
.prose .caps { text-transform: uppercase; }

@media (max-width: 720px) {
  .logo { width: 92vw; }
  .nav { column-gap: 0.9em; }
  .shop { grid-template-columns: 1fr; justify-content: stretch; }
  :root { --fs-headline: calc((100vw - 2 * var(--gutter)) / 9.2); }
  .shop { grid-template-rows: auto auto; align-content: center; gap: 20px; }
  .shop h1 { text-align: center; }
  .signup { justify-content: center; margin-top: 20px; }
  .hat { --hat-h: calc(100dvh - 520px); width: min(100%, 290px, max(120px, calc(var(--hat-h) * 1.1614))); }
  main { padding-block: 20px; }
}

/* Privacy is long text: it may scroll */
body.page-privacy { height: auto; min-height: 100dvh; }
body.page-privacy main { flex: 1 0 auto; }

/* Home: full-bleed photo (fixed layer, always covers the whole viewport) */
body.page-home { background: #000; overflow: hidden; }
body.page-home::before {
  content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  background:
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55)),
    url("/assets/img/home-bg.webp") center bottom / cover no-repeat;
}
body.page-home .site-header, body.page-home .site-footer, body.page-home main { position: relative; z-index: 1; }
body.page-home .site-footer { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); padding-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Episodes: Instagram embeds */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.episodes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(6px, 2vw, 32px); width: 100%; align-items: start; }
.ig-wrap { position: relative; width: 100%; aspect-ratio: 239 / 416; overflow: hidden; border-radius: 8px; background: #000; }
.ig { position: absolute; top: 0; left: 0; width: 340px; height: 640px; border: 0; transform: translate(calc(-50.5px * var(--s, 1)), calc(-61px * var(--s, 1))) scale(var(--s, 1)); transform-origin: 0 0; }
@media (max-width: 700px) { .episodes { grid-template-columns: repeat(3, 1fr); } }
body.page-episodes { height: auto; min-height: 100dvh; }
body.page-episodes main { flex: 1 0 auto; justify-content: flex-start; }
