/* Mexicrónicas Fantasma: the same night palette and caption type as the Shorts. */

@font-face {
  font-family: "Anton";
  src: url("/fonts/Anton-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #0a090e;
  --night-2: #121019;
  --line: rgba(236, 230, 242, 0.1);
  --text: #ece6f2;
  --muted: #a49bb3;
  --gold: #ffd21f;
  --gold-ink: #1a1400;
  --teal: #2e6f73;
  --plum: #3b2350;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(46, 111, 115, 0.28), transparent 60%),
    radial-gradient(50rem 36rem at -10% 30%, rgba(59, 35, 80, 0.45), transparent 60%),
    var(--night);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

/* Film grain, like the videos. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 10;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #fff1a8; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { color: var(--gold); font-size: 22px; line-height: 1; }
.brand em { color: var(--gold); font-style: normal; }

.nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.button.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.button.primary:hover { background: #ffe15c; color: var(--gold-ink); }
.button svg { width: 20px; height: 20px; flex: none; }

/* Hero */

.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }

.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: 0.005em; margin: 0; }
h1 { font-size: clamp(44px, 7.4vw, 92px); text-transform: uppercase; }
h1 .gold { color: var(--gold); }
h2 { font-size: clamp(32px, 4.4vw, 52px); text-transform: uppercase; }

.lede { max-width: 34rem; margin: 26px 0 34px; color: var(--muted); font-size: clamp(18px, 1.6vw, 20px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* A phone playing a Short, with a caption like the real ones. */
.phone {
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  padding: 10px;
  background: #050407;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(255, 210, 31, 0.08);
  transform: rotate(2deg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.phone .caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 22%;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 6px #000;
  paint-order: stroke fill;
}
.phone .caption span { color: var(--gold); }
.phone .badge {
  position: absolute;
  top: 26px; left: 26px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Story strip */

.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head p { margin: 0; max-width: 28rem; color: var(--muted); }

.stories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.story {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background: var(--night-2);
  border: 1px solid var(--line);
}
.story img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(5, 4, 7, 0.92)); }
.story:hover { color: var(--text); }
.story:hover img { transform: scale(1.05); }
.story-text { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; }
.story-text strong { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.story-text small { color: var(--muted); font-size: 13px; }

/* How it's made */

.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.how div { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(18, 16, 25, 0.6); }
.how h3 { margin: 0 0 8px; font-size: 18px; }
.how p { margin: 0; color: var(--muted); font-size: 16px; }
.how .step { display: block; margin-bottom: 14px; font-family: var(--display); font-size: 30px; color: var(--gold); line-height: 1; }

.cta { text-align: center; }
.cta h2 { max-width: 16ch; margin: 0 auto 28px; }
.cta .actions { justify-content: center; }

/* Legal pages */

.legal { padding: clamp(40px, 7vw, 80px) 0 96px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); }
.legal .meta { color: var(--muted); margin: 14px 0 0; }
.legal .lang { display: flex; gap: 12px; margin: 22px 0 8px; font-size: 15px; }
.legal h2 { margin: 56px 0 6px; font-size: 30px; }
.legal h3 { margin: 30px 0 6px; font-size: 19px; }
.legal p, .legal li { color: #d7d0df; overflow-wrap: anywhere; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .note { padding: 18px 20px; border-left: 3px solid var(--gold); background: rgba(255, 210, 31, 0.06); border-radius: 0 12px 12px 0; }
.legal hr { margin: 64px 0 0; border: 0; border-top: 1px solid var(--line); }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Phones and tablets */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { width: min(78vw, 320px); transform: none; }
  .stories { grid-template-columns: repeat(5, 62vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .story { scroll-snap-align: start; }
  .how { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
}

@media (max-width: 520px) {
  .nav a.hide-sm { display: none; }
  .actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .story img { transition: none; }
}

.hero .wrap.not-found { display: block; text-align: center; }
.not-found .lede { margin-left: auto; margin-right: auto; }
.not-found .actions { justify-content: center; }
