/* Pirate Mode / Interns Wanted
   1 Theme  2 Base  3 Background  4 Logo & Menu  5 Hero  6 Socials  7 Privacy  8 Responsive */


/* 1. Theme: every color below comes from these five
   ------------------------------------------------------------- */
:root {
  --text: #f1e4df;        /* bone white */
  --background: #0c0708;  /* near black, warm */
  --primary: #9e2b32;     /* soft blood red */
  --secondary: #1d0c0f;   /* dark oxblood panels */
  --accent: #6f1d24;      /* deep red */

  --shadow: color-mix(in srgb, var(--background) 70%, transparent);

  /* Background trailer controls */
  --trailer-blur: 4px;          /* higher = blurrier */
  --trailer-brightness: 0.2;   /* lower = darker */

  --radius: 2px;
  --edge: 1.5rem;

  /* Size controls: 1 = 100% */
  --main-scale: 1.1;
  --social-scale: 1.3;
  --ui-icon-size: 24px; /* Play and Wishlist icons */
  --burger-size: 52px;
}

/* Syne Mono by The Syne Project Authors (OFL) */
@font-face {
  font-family: "Syne";
  src: url("../assets/fonts/syne.woff2") format("woff2");
  font-display: block; /* no flash of a fallback font */
}

/* Monogram by Vinicius Menezio (CC0) */
@font-face {
  font-family: "Monogram";
  src: url("../assets/fonts/monogram.woff2") format("woff2");
  font-display: block; /* no flash of a fallback font */
}


/* 2. Base
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--background);
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  color: var(--text);
  font: 1rem/1.5 "Syne", sans-serif; /* site-wide */
  font-synthesis: none;
}

img {
  display: block;
}

ul {
  list-style: none;
}

main {
  zoom: var(--main-scale);
}

a {
  color: inherit;
}

::selection {
  background: var(--primary);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--primary);
}

h1,
h2,
strong {
  font-weight: 400; /* both fonts have a single weight */
}

/* Shared shape: menu items and buttons */
.nav-menu li a,
.btn {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

/* Shared underline: email and policy links */
.contact a,
.legal a {
  text-decoration: underline 2px;
  text-underline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* 3. Background: poster underneath, trailer on top
   ------------------------------------------------------------- */
.bg-media {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-media img,
.bg-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(var(--trailer-blur)) brightness(var(--trailer-brightness));
  transform: scale(1.04); /* hides soft edges left by the blur */
}

/* Set by main.js when the video is missing or blocked */
.bg-media.is-fallback video {
  display: none;
}


/* 4. Logo (top left) & Menu (top right)
   ------------------------------------------------------------- */
.site-logo,
.site-header {
  position: fixed;
  top: max(var(--edge), env(safe-area-inset-top));
  z-index: 50;
}

.site-logo {
  left: max(var(--edge), env(safe-area-inset-left));
}

.site-logo img {
  height: var(--burger-size); /* logo size */
  max-width: min(14rem, 40vw);
  object-fit: contain;
  object-position: left;
}

.site-header {
  right: max(var(--edge), env(safe-area-inset-right));
}

.burger {
  position: relative;
  display: block;
  cursor: pointer;
  width: var(--burger-size);
  height: var(--burger-size);
  background: none;
  border: 0;
  border-radius: var(--radius);
  margin-right: -14px; /* lines the icon up with the page edge */
}

.burger span {
  position: absolute;
  left: 14px;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.18s, opacity 0.1s;
}

.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 25px; }
.burger span:nth-child(3) { top: 32px; }

/* Mouse only, so the icon does not stay red after a tap */
@media (hover: hover) {
  .burger:hover span { background: var(--primary); }
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: flex;
  flex-direction: column;
  /* Reaches the bottom, leaving the same --edge gap as at the top
     (screen height minus both gaps, the burger and the space under it) */
  height: calc(100dvh - max(var(--edge), env(safe-area-inset-top)) - max(var(--edge), env(safe-area-inset-bottom)) - var(--burger-size) - 0.6rem);
  overflow-y: auto;
  width: max-content;
  min-width: 15rem;
  max-width: calc(100vw - 2 * var(--edge));
  padding: 0.5rem;
  background: var(--secondary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--shadow);
}

.nav-menu[hidden] {
  display: none;
}

.nav-menu li a {
  gap: 0.6rem;
  min-height: 48px;
  font-size: 1.125rem;
}

/* Cursor marker on the current page */
.nav-menu li a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.nav-menu li a[aria-current="page"]::before {
  background: var(--text);
}

.nav-menu li a:hover,
.nav-menu li a:focus-visible {
  background: var(--primary);
}

.nav-menu li a:focus-visible {
  outline-offset: -4px;
  box-shadow: none;
}

/* Contact row, pinned to the bottom of the menu */
.contact {
  margin-top: auto;
  padding: 0.5rem 0.75rem 0.15rem;
  border-top: 1px solid var(--primary);
  line-height: 1.4;
}

.contact a {
  display: block;
  padding-block: 0.75rem;
  overflow-wrap: anywhere;
  color: var(--text);
}

.contact a:hover {
  color: var(--primary);
}


/* 5. Hero
   ------------------------------------------------------------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 1.5rem;
  font: 1.5rem/1 "Monogram", monospace; /* Interns Wanted content */
  text-align: center;
}

.hero__title {
  display: flex;
  flex-direction: column;
  padding-left: 0.0625em;
  font-size: clamp(4rem, min(20vw, 14vh), 9rem); /* title size */
  line-height: 0.62;
  letter-spacing: 0.0625em;
  text-transform: uppercase;
  text-shadow: 0.03125em 0.03125em 0 var(--primary);
}

.hero__tagline {
  max-width: 44ch;
  margin-top: 1.25rem;
  text-shadow: 0 0 12px var(--background);
  text-wrap: balance;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 240px; /* button width */
  margin-top: 1.5rem;
}

.btn {
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* button height */
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--shadow);
}

.btn--primary {
  background: var(--accent);
}

.btn--primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.btn--secondary {
  background: var(--secondary);
}

.btn--secondary:hover {
  background: var(--accent);
}

/* Physical press feedback */
.burger:active,
.nav-menu a:active,
.btn:active,
.socials__link:active {
  transform: translateY(2px);
}


/* 6. Socials
   ------------------------------------------------------------- */
.site-footer {
  padding: 0.25rem 0.25rem max(0.75rem, env(safe-area-inset-bottom));
}

.socials {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
}

.site-footer__copyright {
  margin-top: 0.5rem;
  color: var(--primary);
  font-size: 0.75rem;
  text-align: center;
}

.socials__link {
  display: block;
  border-radius: var(--radius);
}

/* The SVGs load as black images, so filters recolor them.
   If --text or --primary changes, these filters need new values. */
.btn__icon {
  width: var(--ui-icon-size);
  height: var(--ui-icon-size);
}

.socials__icon {
  width: calc(32px * var(--social-scale));
  height: calc(32px * var(--social-scale));
  filter: brightness(0) invert(36%) sepia(67%) saturate(2343%) hue-rotate(332deg) brightness(62%) contrast(99%);
  transition: filter 0.15s;
}

/* --text color */
.btn__icon,
.socials__link:hover .socials__icon {
  filter: brightness(0) invert(78%) sepia(20%) saturate(5434%) hue-rotate(307deg) brightness(181%) contrast(89%);
}

/* 7. Privacy page
   ------------------------------------------------------------- */
.page-privacy {
  --trailer-brightness: 0.16;
}

.legal {
  flex: 1 0 auto;
  width: calc(100% - 1rem);
  max-width: 720px;
  margin: 6rem auto 1.5rem;
  padding: clamp(1.25rem, 5vw, 3rem);
  background: var(--background);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  overflow-wrap: anywhere; /* lets the email wrap on narrow phones */
}

.legal header {
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
}

.legal h1,
.legal h2 {
  text-wrap: balance;
}

.legal h1 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.legal p,
.legal ul {
  margin-top: 0.75rem;
}

.legal ul {
  padding-left: 1.25rem;
  list-style: square;
}

.legal li + li {
  margin-top: 0.25rem;
}

.legal li::marker {
  color: var(--primary);
}

/* The font has one weight, so thicken bold text with a slight offset */
.legal strong {
  text-shadow: 0.04em 0 currentColor;
}

.legal a {
  color: var(--primary);
}

.legal a:hover {
  color: var(--text);
}


/* 8. Responsive & reduced motion
   ------------------------------------------------------------- */

/* Solid top bar so policy text never runs under the logo or menu */
@media (max-width: 1200px) {
  .page-privacy::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    height: calc(max(var(--edge), env(safe-area-inset-top)) + var(--burger-size) + 12px);
    background: var(--background);
    border-bottom: 1px solid var(--primary);
  }
}

@media (max-width: 480px) {
  :root { --edge: 1rem; }
  .socials { gap: 0.125rem; }
  .hero { padding: 4.5rem 0.5rem 1rem; }
}

/* Landscape phones: title on one line */
@media (max-height: 520px) {
  :root { --edge: 0.75rem; }
  .hero { padding-block: 4rem 0.5rem; }
  .hero__title { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 0.4em; font-size: 4rem; }
  .hero__tagline { max-width: 60ch; margin-top: 0.75rem; font-size: 1.25rem; }
  .cta-stack { gap: 0.5rem; margin-top: 0.75rem; }
}

/* Ultrawide and 4K: scale everything up a step */
@media (min-width: 2560px) and (min-height: 1300px) {
  html { font-size: 125%; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-media video { display: none; }
  .burger span { transition: none; }
}

/* Readable printouts of the privacy policy */
@media print {
  .bg-media, .site-logo, .site-header, .site-footer, .page-privacy::before { display: none; }
  html { background: var(--text); }
  body, .legal, .legal a { color: var(--background); background: none; border: 0; }
}