/*
  Font: "Neue Haas Grotesk Text Pro" is a commercial Monotype font. Once a web licence
  is in place, drop the font files in /fonts and uncomment the @font-face rules below
  (and the Schibsted preload in index.html). Until then the free lookalike
  Schibsted Grotesk is used, self-hosted from /fonts (SIL OFL 1.1, see fonts/OFL.txt).
*/

/* Schibsted Grotesk: one variable file per subset covers weights 400-500. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/*
@font-face {
  font-family: "Neue Haas Grotesk Text Pro";
  src: url("fonts/NHaasGroteskTXPro-55Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Grotesk Text Pro";
  src: url("fonts/NHaasGroteskTXPro-65Md.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  --font: "Neue Haas Grotesk Text Pro", "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --white: #fff;
  --gold: #f9be42;
  --gold-line: rgba(214, 168, 82, 0.85);
  --divider: rgba(255, 255, 255, 0.45);
  --bg: #1a140c;
  --dark: #0d0d0d;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 40%, #5a4422 0%, #1a140c 70%);
}

.bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.bg__video.is-playing { opacity: 1; }

.bg__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

/* ---------- Header ---------- */
.header {
  position: absolute;
  top: clamp(24px, 3.6vw, 40px);
  left: clamp(20px, 5.1vw, 56px);
  z-index: 2;
}
.logo { display: block; }
.logo img {
  display: block;
  width: clamp(72px, 8vw, 92px);
  height: auto;
}

/* ---------- Main ---------- */
.main {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 16px 64px;
  text-align: center;
}

.title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  margin-top: clamp(18px, 2vw, 26px);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(72px, 8.7vw, 124px);
  padding: 0 4px;
}
.countdown__unit + .countdown__unit { border-left: 1px solid var(--divider); }

.countdown__value {
  font-size: clamp(32px, 3.8vw, 56px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.countdown__label {
  margin-top: clamp(10px, 1.3vw, 16px);
  font-size: clamp(8px, 0.72vw, 11px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Subscribe ---------- */
.subscribe {
  position: relative;
  display: flex;
  gap: 6px;
  margin-top: clamp(56px, 8.5vw, 120px);
  width: min(100%, 340px);
}
@media (min-width: 900px) {
  .subscribe { width: clamp(340px, 30.5vw, 460px); }
}

.subscribe__input,
.subscribe__button {
  height: clamp(28px, 2.5vw, 36px);
  font-family: inherit;
  font-size: clamp(9px, 0.8vw, 12px);
  text-transform: uppercase;
  border-radius: 0;
}

.subscribe__input {
  flex: 1 1 63%;
  min-width: 0;
  padding: 0 8px;
  color: #111;
  background: var(--white);
  border: 1px solid var(--white);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.subscribe__input { text-transform: none; }
.subscribe__input::placeholder { color: #111; opacity: 1; text-transform: uppercase; }
.subscribe__input:focus::placeholder { color: #888; }
.subscribe__input:focus-visible { box-shadow: 0 0 0 2px var(--gold); }

.subscribe__button {
  flex: 1 1 37%;
  padding: 0 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--gold-line);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.subscribe__button:hover,
.subscribe__button:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
  outline: none;
}
.subscribe__button:disabled { opacity: 0.6; cursor: progress; }

.subscribe[data-state="error"] .subscribe__input { border-color: #e2725b; box-shadow: 0 0 0 1px #e2725b; }

.subscribe__message {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 10px 0 0;
  font-size: 12px;
  min-height: 1em;
}
.subscribe[data-state="error"] .subscribe__message { color: #ffb4a3; }

/* ---------- Social ---------- */
.social {
  display: flex;
  gap: clamp(8px, 0.9vw, 12px);
  margin-top: clamp(48px, 5vw, 72px);
}

/* Icons come from socials.svg, each with its own yellow rounded square. */
.social__link {
  display: block;
  width: clamp(26px, 2.4vw, 34px);
  height: clamp(26px, 2.4vw, 34px);
  border-radius: 2px;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.social__link svg {
  display: block;
  width: 100%;
  height: 100%;
}
.social__link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.social__link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .countdown__unit { width: 22vw; }
  .subscribe { flex-direction: column; }
  .subscribe__input, .subscribe__button { flex: none; height: 40px; font-size: 12px; }
  .subscribe__message { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .bg__video { transition: none; }
  .social__link { transition: none; }
}
