/* Mulish is only used by the procedural card texture (main.js) */
@font-face {
  font-family: "Mulish";
  src: url("fonts/mulish-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --inset: 14px;
  --mono: "Geist Mono", ui-monospace, monospace;
  --line: rgba(255, 255, 255, 0.18);
  --ink-soft: rgba(255, 255, 255, 0.8);
  --panel: rgba(10, 4, 14, 0.5);
  --cta-a: #120308;
  --cta-b: #c21d10;
  --cta-c: #ff8a2a;
  --cta-glow: rgba(255, 110, 40, 0.55);
  --page-bg: #07030a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--page-bg);
  color: #fff;
  font-family: "Inter Tight", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}

.page {
  height: 100vh;
  height: 100dvh;
  padding: var(--inset);
}

.hero {
  /* resolved inside each child, so cqw/cqh refer to the hero box */
  --pad: clamp(20px, 4.4cqw, 64px);
  --edge: clamp(22px, 3.6cqh, 40px);
  position: relative;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: #1a0d2a;
  container: hero / size;
}

/* shade under the copy: light at the top for the nav, deeper over the bright water */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1; /* above the canvas, below every piece of copy */
  background:
    linear-gradient(to bottom, rgba(8, 2, 10, 0.4), rgba(8, 2, 10, 0) 24%),
    linear-gradient(to top, rgba(8, 2, 10, 0.6), rgba(8, 2, 10, 0) 34%);
  pointer-events: none;
}

.hero__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -2;
}

/* ---------- nav: logo | centred links | action, hairline underneath ---------- */
.nav {
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand__mark { width: 26px; height: 19px; fill: #fff; }

.nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 36px;
  font-size: 14.5px;
}

.nav__links a {
  position: relative;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn--dark {
  height: 38px;
  padding: 0 16px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn--dark:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }

.btn--light {
  height: 34px;
  padding: 0 10px 0 12px;
  background: #fff;
  color: #0b0710;
}

.btn--light svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0.55;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}

.btn--light:hover svg { transform: translateX(2px); opacity: 1; }
.btn--light:focus-visible { outline-offset: 2px; }

/* ---------- top-left perks (mono index) ---------- */
.perks {
  position: absolute;
  left: var(--pad);
  top: 86px;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 21px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- top-right statement ---------- */
.lede {
  position: absolute;
  right: var(--pad);
  top: 80px;
  width: clamp(230px, 24cqw, 330px);
  font-size: clamp(16px, 1.55cqw, 22px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-align: justify;
  text-indent: 2.4em;
}

/* ---------- bottom-left headline, kept clear of the card ---------- */
.story {
  position: absolute;
  left: var(--pad);
  bottom: var(--edge);
}

.tag {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 10px 4px;
  border-left: 2px solid rgba(255, 255, 255, 0.55);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.headline {
  /* room left of the card: half the hero width minus the card half-width (~0.21 x height) */
  font-size: clamp(34px, calc((50cqw - 22cqh - var(--pad) - 24px) / 4.9), 96px);
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.headline span { display: block; }

/* ---------- bottom-right offer widget ---------- */
.offer {
  position: absolute;
  right: var(--pad);
  bottom: var(--edge);
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 7px 16px 7px 7px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.offer__thumb {
  position: relative;
  flex: none;
  width: 78px;
  height: 100px;
  border-radius: 7px;
  overflow: hidden;
  background:
    linear-gradient(118deg, transparent 52%, rgba(255, 255, 255, 0.22) 60%, transparent 68%),
    linear-gradient(100deg, var(--card0, #0a0204) 12%, var(--card1, #5a0610) 38%, var(--card2, #d0200c) 72%, var(--card3, #ffc9a0) 118%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.offer__chip {
  position: absolute;
  top: 11px;
  right: 10px;
  width: 13px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(135deg, #f2eef8, #b9b3c6);
}

.offer__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 18px;
  transform: translate(-50%, -30%);
  fill: var(--logo, #ff5a1f);
}

.offer__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  min-width: 150px;
}

.offer__head {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offer__title { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }

.offer__meta {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.swatches { display: flex; margin-right: -6px; }

.swatches a {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.swatches a::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.swatches a:hover::before { transform: scale(1.2); }
.swatches a[aria-current="true"]::before { box-shadow: 0 0 0 2px rgba(10, 4, 14, 0.9), 0 0 0 3.5px #fff; }
.swatches a:focus-visible { border-radius: 50%; outline-offset: 0; }

/* ---------- landscape tablets: smaller statement so it stays off the ring ---------- */
@container hero (max-aspect-ratio: 13/10) {
  .lede { width: 230px; font-size: 16px; }
}

/* ---------- portrait: the card fills the middle third (bottom edge ~0.665 x height),
   so the headline and the offer have to fit in the lower third ---------- */
@container hero (max-aspect-ratio: 9/10) {
  .hero > * { --offer-h: 100px; }
  .lede { display: none; }
  .perks { top: 80px; }
  .story { right: var(--pad); bottom: calc(var(--edge) + var(--offer-h) + 16px); }
  .tag { margin-bottom: 12px; }
  .headline { font-size: clamp(30px, 10cqw, 46px); }
  .offer { left: var(--pad); height: var(--offer-h); }
  .offer__thumb { width: 64px; height: auto; }
  .offer__body { flex: 1; gap: 4px; }
  .offer .btn--light { align-self: stretch; }
}

@container hero (max-aspect-ratio: 9/10) and (max-height: 700px) {
  .hero > * { --offer-h: 86px; }
  .tag { display: none; }
  .offer__thumb { width: 54px; }
  .offer .btn--light { height: 30px; }
  .offer__meta { margin-bottom: 2px; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .perks .long { display: none; }
}

/* portrait screens (same breakpoint as the container query above): the copy sits on the
   brightest sky and water, so both shades get deeper */
@media (max-aspect-ratio: 9/10) {
  .perks { color: #fff; }
  .hero::before {
    background:
      linear-gradient(to bottom, rgba(8, 2, 10, 0.6), rgba(8, 2, 10, 0.3) 18%, rgba(8, 2, 10, 0) 28%),
      linear-gradient(to top, rgba(8, 2, 10, 0.82), rgba(8, 2, 10, 0.66) 34%, rgba(8, 2, 10, 0) 48%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn svg, .nav__links a, .nav__links a::after, .swatches a::before { transition: none; }
}
