@layer reset, tokens, base, layout, components, motion, print;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, svg, video, canvas { display: block; max-width: 100%; }
  button, input, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; }
  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
}

@layer tokens {
  :root {
    --void: #070506;
    --ink: #12090b;
    --panel: #1a1013;
    --line: rgba(244, 239, 230, 0.12);
    --bone: #f4efe6;
    --fog: #b9a8a4;
    --ember: #c3122f;
    --ember-hot: #ff4d6d;
    --gold: #e6c34a;
    --gold-hot: #ffe36a;
    --ok: #c6e39a;
    --danger: #ff8d7a;
    --header: 4.5rem;
    --radius: 1.35rem;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    --font-display: Cinzel, "Times New Roman", serif;
    --font-body: Outfit, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --measure: 66ch;
    color-scheme: dark;
  }
}

@layer base {
  html { background: var(--void); }
  body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--bone);
    background:
      radial-gradient(1200px 500px at 80% -10%, rgba(195, 18, 47, 0.22), transparent 55%),
      radial-gradient(900px 420px at -10% 20%, rgba(230, 195, 74, 0.08), transparent 50%),
      var(--void);
  }
  body::before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 8;
    opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  }
  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.08;
    text-wrap: balance;
  }
  h1 { font-size: clamp(1.85rem, 4.4vw, 3.2rem); }
  .hero h1 { font-size: clamp(2.8rem, 8vw, 7.2rem); }
  h2 { font-size: clamp(1.7rem, 4vw, 3rem); }
  h3 { font-size: 1.2rem; }
  p + p { margin-top: 0.9rem; }
  .skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 40;
    padding: 0.7rem 1rem;
    background: var(--gold);
    color: var(--ink);
  }
  .skip:focus { top: 1rem; }
}

@layer layout {
  .wrap {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
  }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--header);
    backdrop-filter: blur(16px);
    background: color-mix(in srgb, var(--void) 78%, transparent);
    border-bottom: 1px solid var(--line);
  }
  .site-header .wrap,
  .site-footer .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    letter-spacing: 0.18em;
    font-size: 0.86rem;
    text-decoration: none;
  }
  .brand img, .brand svg { width: 2.2rem; height: 2.2rem; flex: none; }
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.85rem;
    font-size: 0.86rem;
  }
  .nav a { text-decoration: none; color: var(--fog); }
  .nav a[aria-current="page"],
  .nav a:hover { color: var(--bone); }
  .nav-toggle {
    display: none;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    place-items: center;
  }
  .nav-toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--bone);
    position: relative;
  }
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bone);
  }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  main { position: relative; z-index: 1; }
  .section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: end;
  }
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.5rem;
    align-items: start;
  }
  .grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 1rem;
  }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0 7rem;
    color: var(--fog);
    font-size: 0.92rem;
  }
  .site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
}

@layer components {
  .eyebrow, .kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.65rem;
  }
  .lede { font-size: 1.15rem; color: var(--fog); max-width: var(--measure); }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    text-decoration: none;
    font-weight: 650;
    border: 1px solid transparent;
  }
  .btn.ghost {
    background: transparent;
    color: var(--bone);
    border-color: var(--line);
  }
  .btn.ember {
    background: var(--ember);
    color: var(--bone);
  }
  .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
  .hero {
    position: relative;
    min-height: min(92vh, 860px);
    display: grid;
    align-items: end;
    overflow: hidden;
  }
  .hero-media {
    position: absolute;
    inset: 0;
  }
  .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 68%;
    filter: saturate(1.08) contrast(1.08);
  }
  .hero-media canvas { pointer-events: none; }
  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(7,5,6,0.15) 0%, rgba(7,5,6,0.2) 40%, rgba(7,5,6,0.92) 100%),
      radial-gradient(circle at 72% 38%, rgba(195,18,47,0.18), transparent 32%);
  }
  .hero-copy {
    position: relative;
    z-index: 2;
    padding: 5rem 0 3rem;
  }
  .hero h1 span {
    display: block;
    font-size: 0.42em;
    letter-spacing: 0.32em;
    color: var(--gold);
  }
  .stat-row, .chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.6rem;
  }
  .stat, .chip, .card, .quote, .form, .notice {
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .stat {
    min-width: 9rem;
    padding: 1rem 1.1rem;
  }
  .stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.45rem;
  }
  .stat span, .muted, .chip { color: var(--fog); }
  .chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.86rem;
  }
  .card { padding: 1.2rem; }
  .card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0.9rem;
    margin-bottom: 0.9rem;
  }
  .photo {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--line);
  }
  .photo.portrait { aspect-ratio: 4 / 5; }
  .photo.wide { aspect-ratio: 16 / 9; }
  .marquee {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding: 0.85rem 0;
    background: color-mix(in srgb, var(--ink) 70%, transparent);
  }
  .marquee-track {
    display: flex;
    gap: 2.4rem;
    width: max-content;
    animation: ticker 28s linear infinite;
    font-family: var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--gold);
  }
  .eq {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 42px;
  }
  .eq i {
    width: 4px;
    height: 30%;
    background: var(--gold);
    animation: eq 1.1s ease-in-out infinite;
  }
  .eq i:nth-child(2) { animation-delay: .1s; background: var(--ember); }
  .eq i:nth-child(3) { animation-delay: .2s; }
  .eq i:nth-child(4) { animation-delay: .05s; background: var(--ember-hot); }
  .eq i:nth-child(5) { animation-delay: .18s; }
  .quote { padding: 1.4rem; font-size: 1.25rem; }
  .filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
  .filters button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    color: var(--fog);
  }
  .filters button[aria-pressed="true"] {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
  }
  .hidden { display: none !important; }
  label { display: grid; gap: 0.35rem; font-size: 0.92rem; margin-bottom: 0.9rem; }
  input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--ink);
    border-radius: 0.8rem;
    padding: 0.8rem 0.9rem;
  }
  textarea { min-height: 8rem; resize: vertical; }
  .form { padding: 1.3rem; }
  .consent-bar, .consent-panel {
    position: fixed;
    z-index: 30;
    background: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .consent-bar {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1rem;
    border-radius: 1.1rem;
    display: none;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
  }
  .consent-bar.open, .consent-panel.open { display: flex; }
  .consent-panel {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, calc(100% - 2rem));
    max-height: min(82vh, 720px);
    overflow: auto;
    padding: 1.3rem;
    border-radius: 1.2rem;
  }
  .switch {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }
  .switch input { width: auto; accent-color: var(--gold); }
  .palette {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .swatch {
    min-height: 6.5rem;
    border-radius: 1rem;
    padding: 0.8rem;
    display: flex;
    align-items: end;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border: 1px solid var(--line);
  }
  .timeline { display: grid; gap: 1rem; }
  .timeline article {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .player {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 166px;
    background: var(--ink);
  }
  .player iframe { width: 100%; min-height: 166px; border: 0; }
  .notice { padding: 1rem; color: var(--fog); }
  .frame {
    position: relative;
    padding: 0.55rem;
    background: var(--ink);
    border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
    border-radius: 1.1rem;
    box-shadow: var(--shadow);
  }
  .frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.7rem; }
  .frame figcaption {
    position: absolute;
    left: 1.1rem;
    bottom: 1.1rem;
    padding: 0.35rem 0.65rem;
    background: color-mix(in srgb, var(--void) 75%, transparent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .hero-editorial {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.75fr);
    gap: 1.4rem;
    align-items: end;
    padding: 2.2rem 0 2.8rem;
  }
  .film {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, 1fr);
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.4rem 0 1.2rem;
    scrollbar-width: thin;
  }
  .film a, .film figure { margin: 0; }
  .film img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
  }
  .masonry {
    columns: 3;
    column-gap: 0.75rem;
  }
  .masonry a {
    break-inside: avoid;
    display: block;
    margin: 0 0 0.75rem;
    position: relative;
  }
  .masonry img {
    width: 100%;
    border-radius: 0.9rem;
    border: 1px solid var(--line);
  }
  .masonry span {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: color-mix(in srgb, var(--void) 70%, transparent);
    font-size: 0.75rem;
  }
  .video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
  .video-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    min-height: 220px;
    color: var(--bone);
    text-decoration: none;
  }
  .video-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    margin: 0;
  }
  .video-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 1rem;
    background: linear-gradient(transparent, var(--void));
  }
  .play-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
  }
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    place-items: center;
    background: rgba(7, 5, 6, 0.92);
    padding: 1.5rem;
  }
  .lightbox.open { display: grid; }
  .lightbox img {
    max-height: min(86vh, 920px);
    max-width: min(92vw, 1100px);
    border-radius: 1rem;
  }
  .lightbox button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--bone);
    font-size: 1.4rem;
  }
  .cover-grid .card img { height: 280px; object-position: center top; }
  .collage {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr 1fr;
    grid-template-rows: minmax(190px, 22vh) minmax(190px, 22vh);
    gap: 0.65rem;
  }
  .collage a, .collage figure {
    margin: 0;
    overflow: hidden;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    min-height: 0;
  }
  .collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .collage .span-2 { grid-row: span 2; }
  .zoom { overflow: hidden; }
  .zoom img { transition: transform 0.55s ease; }
  .zoom:hover img, .zoom:focus-visible img { transform: scale(1.05); }
  .card.shot { padding: 0; overflow: hidden; }
  .card.shot img {
    margin: 0;
    height: 210px;
    border-radius: 0;
  }
  .card.shot > :not(img) { padding: 0 1.1rem 1.15rem; }
  .card.shot h3, .card.shot h2 { padding: 1rem 1.1rem 0; }
  .frame.portrait { aspect-ratio: 3 / 4; }
  .lightbox p, .lightbox figcaption {
    margin-top: 0.75rem;
    color: var(--fog);
    text-align: center;
    font-size: 0.92rem;
  }
  .lightbox figure { margin: 0; text-align: center; }
  .page-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 1.4rem 0 0;
  }
  .page-strip img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 210px 210px 210px;
  }
  .collage .span-2 { grid-row: span 1; min-height: 210px; }
  .page-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .collage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .collage a, .collage figure { min-height: 240px; }
}

@media (max-width: 900px) {
  .hero-editorial, .video-grid { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
  .film img { height: 200px; }
}

@media (max-width: 560px) {
  .masonry { columns: 1; }
}

@layer motion {
  @keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
  @keyframes eq {
    0%, 100% { height: 22%; }
    50% { height: 100%; }
  }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }
  .reveal { animation: reveal 0.7s ease both; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .marquee-track, .eq i, .reveal { animation: none !important; }
    .zoom img { transition: none; }
  }
}

@layer print {
  @media print {
    .site-header, .site-footer, .consent-bar, .consent-panel, .nav-toggle, .actions, .marquee {
      display: none !important;
    }
    body { background: white; color: black; }
    a { color: black; }
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .nav { gap: 0.62rem; font-size: 0.8rem; }
}

@media (max-width: 900px) {
  .section-head, .split, .grid-2, .grid-3, .grid-4, .timeline article {
    grid-template-columns: 1fr;
  }
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    inset: var(--header) 0 auto;
    flex-direction: column;
    padding: 1rem;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .consent-bar { flex-direction: column; align-items: stretch; }
  .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
