:root {
  --cream: #f6f0e2;
  --paper: #e9e7d4;
  --muted: rgba(233, 231, 212, 0.72);
  --ink: #10040a;
  --red: #b72339;
  --red-hover: #c92b43;
  --glass: rgba(26, 8, 15, 0.58);
  --glass-hover: rgba(58, 7, 22, 0.72);
  --line: rgba(246, 240, 226, 0.22);
  --line-strong: rgba(246, 240, 226, 0.5);
  --ok: #7be3a6;
  --error: #ff9a9a;
  --font-display: "Saira Extra Condensed", Impact, "Arial Narrow", sans-serif;
  --font-body: Roboto, Arial, Helvetica, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

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

/* ---------- Backdrop ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink) url("./assets/video/main-menu-poster.webp") center / cover no-repeat;
}

/* Push the still well back so the trailer reads as the focal point. */
.bg__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 85% at 50% 45%, transparent 40%, rgba(16, 4, 10, 0.75)),
    linear-gradient(180deg, rgba(16, 4, 10, 0.55), rgba(16, 4, 10, 0.7));
}

main,
.footer {
  position: relative;
  z-index: 1;
}

/* ---------- Hero: logo, trailer + links ---------- */

.hero {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    calc(clamp(2.5rem, 7vh, 5rem) + env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    calc(clamp(1.5rem, 4vh, 2.5rem) + env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  text-align: center;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo,
.hero__logo img {
  display: block;
  width: min(76vw, 24rem);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.hero__logo img {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  width: min(100%, 78rem);
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}

/* Trailer: poster + big play button; native controls take over once playing. */
.trailer {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.trailer__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: radial-gradient(circle at center, rgba(16, 4, 10, 0.1), rgba(16, 4, 10, 0.55));
  color: var(--cream);
  cursor: pointer;
  transition: opacity 250ms ease;
}

.trailer__play-icon {
  display: grid;
  width: clamp(3.75rem, 7vw, 5.5rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.55),
    inset 0 3px 10px rgba(247, 189, 189, 0.3);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.trailer__play-icon::before {
  width: 38%;
  aspect-ratio: 1;
  margin-left: 8%;
  content: "";
  background: currentColor;
  clip-path: polygon(15% 5%, 95% 50%, 15% 95%);
}

.trailer__play:hover .trailer__play-icon {
  background: var(--red-hover);
  transform: scale(1.06);
}

.trailer__play-label {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
}

.trailer.is-playing .trailer__play {
  opacity: 0;
  pointer-events: none;
}

.hero__side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__bio {
  max-width: 26rem;
  margin: 0;
  color: var(--paper);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  text-wrap: balance;
}

.links {
  display: grid;
  width: min(100%, 28rem);
  gap: 0.8rem;
  margin-top: clamp(1.25rem, 3vh, 1.75rem);
}

/* Linktree-style button: icon pinned left, label centred. */
.link {
  display: grid;
  grid-template-columns: 1.5rem 1fr 1.5rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.link:hover {
  border-color: var(--line-strong);
  background: var(--glass-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.link--primary {
  border-color: transparent;
  background: var(--red);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 2px 8px rgba(247, 189, 189, 0.25);
}

.link--primary:hover {
  border-color: transparent;
  background: var(--red-hover);
}

.link__icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.link__icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.socials {
  display: flex;
  gap: 0.75rem;
  margin: clamp(1.25rem, 3vh, 1.75rem) 0 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.socials a:hover {
  border-color: var(--line-strong);
  background: var(--glass-hover);
  transform: translateY(-2px);
}

.socials svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.scroll-cue:hover {
  color: var(--cream);
}

.scroll-cue svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: cue-bob 1.8s ease-in-out infinite;
}

@keyframes cue-bob {
  50% {
    transform: translateY(4px);
  }
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(4rem, 12vh, 7rem) 1rem clamp(3rem, 8vh, 5rem);
  /* Fades the video out to near-black as the visitor scrolls down. */
  background: linear-gradient(180deg, transparent, rgba(16, 4, 10, 0.86) 28%, var(--ink) 100%);
  scroll-margin-top: 0;
}

.contact-form {
  display: grid;
  width: min(100%, 44rem);
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid rgba(246, 240, 226, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(135% 130% at 14% 108%, rgba(178, 102, 121, 0.55), rgba(107, 60, 73, 0.45) 40%, rgba(36, 18, 25, 0.97) 80%),
    rgba(36, 18, 25, 0.96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

.contact-form h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.contact-form__lead {
  margin: 0 0 0.4rem;
  color: var(--muted);
}

.contact-form__lead a {
  color: var(--cream);
  font-weight: 400;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #b9a9a9;
  box-shadow: inset 0 4px 8.8px rgba(26, 17, 17, 0.25);
  color: #201c1c;
  font: inherit;
  font-size: 1rem;
  outline: 0;
}

.contact-form input {
  height: 3rem;
  padding: 0 0.9rem;
}

.contact-form textarea {
  min-height: 8rem;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow:
    inset 0 4px 8.8px rgba(26, 17, 17, 0.25),
    0 0 0 3px rgba(246, 240, 226, 0.3);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  margin-top: 0.4rem;
}

.contact-form button {
  display: inline-flex;
  min-width: 12rem;
  height: 3.4rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  box-shadow:
    0 3px 14px 4px rgba(0, 0, 0, 0.25),
    inset 0 4px 8.8px rgba(247, 189, 189, 0.25);
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.contact-form button:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

.contact-form button[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Honeypot: visually hidden but present in the DOM so naive bots fill it. */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-status {
  margin: 0;
  min-height: 1.25em;
  font-weight: 500;
  line-height: 1.3;
}

.contact-status[data-state="ok"] {
  color: var(--ok);
}

.contact-status[data-state="error"] {
  color: var(--error);
}

/* ---------- Footer ---------- */

.footer {
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: rgba(233, 231, 212, 0.45);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

/* ---------- Entrance ---------- */

.reveal {
  opacity: 0;
  animation: reveal-up 650ms cubic-bezier(0.18, 0.86, 0.18, 1) forwards;
  animation-delay: calc(120ms + var(--d, 0) * 110ms);
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 40rem);
  }
}

@media (max-width: 560px) {
  .trailer {
    border-radius: 12px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .link {
    min-height: 3.25rem;
    font-size: 1.2rem;
  }

  .contact-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    animation: none;
  }

  .scroll-cue svg {
    animation: none;
  }

  .link,
  .socials a,
  .trailer__play,
  .trailer__play-icon,
  .contact-form button {
    transition: none;
  }
}
