/* REVORN website. Black, white, charcoal. Inter. Cut corners at the monogram's angle. */
@font-face { font-family: Inter; src: url(assets/fonts/Inter-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(assets/fonts/Inter-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(assets/fonts/Inter-SemiBold.ttf); font-weight: 600; font-display: swap; }

:root {
  --black: #000000;
  --white: #FFFFFF;
  --charcoal: #161616;
  --graphite: #2A2A2A;
  --ash: #8C8C8C;
  --ghost: #0E0E0E;
  --line: #1F1F1F;
  /* the monogram's cut: 23 across, 27 down */
  --cut: 28px;
  --cut-y: calc(var(--cut) * 27 / 23);
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 16px/1.6 Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ash); }
.label { font-size: 12px; font-weight: 500; letter-spacing: .35em; text-transform: uppercase; color: var(--ash); margin: 0; }
h2 { font-size: clamp(32px, 5.2vw, 64px); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
svg use, .ghost use { fill: currentColor; }

/* The fold: top-right and bottom-left corners cut */
.fold {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut-y), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut-y)));
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(0, 0, 0, .82); backdrop-filter: blur(10px); border-color: var(--line); }
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-mono { width: 26px; height: 26px; color: var(--white); }
.nav-word { height: 11px; width: auto; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 12px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--ash); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; transition: transform .3s; }

/* ---------- Buttons ---------- */
.btn {
  --cut: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 30px;
  font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut-y), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut-y)));
  transition: background .2s, color .2s;
}
.btn-solid { background: var(--white); color: var(--black); }
.btn-solid:hover { background: #D9D9D9; }
.btn-line { background: var(--graphite); color: var(--white); }
.btn-line:hover { background: #3A3A3A; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 0 80px; }
.ghost { color: var(--ghost); }
.hero-ghost { position: absolute; width: min(95vh, 900px); height: min(95vh, 900px); right: -14vw; top: 50%; transform: translateY(-50%); pointer-events: none; }
.hero-inner { position: relative; width: 100%; }
.hero-mono { width: clamp(110px, 14vw, 170px); height: auto; color: var(--white); margin: 36px 0 34px; overflow: visible; }
.piece { fill: var(--white); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), opacity 1.1s; }
.hero:not(.in) .piece-a { transform: translate(-22px, 22px); opacity: 0; }
.hero:not(.in) .piece-b { transform: translate(22px, -22px); opacity: 0; }
.hero-word { width: clamp(220px, 34vw, 440px); height: auto; transition: opacity 1s .7s, transform 1s .7s; }
.hero-line { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; letter-spacing: -.01em; margin: 34px 0 6px; transition: opacity 1s .9s, transform 1s .9s; }
.hero-sub { color: var(--ash); margin: 0; font-size: 17px; transition: opacity 1s 1s, transform 1s 1s; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; transition: opacity 1s 1.15s, transform 1s 1.15s; }
.hero:not(.in) :is(.hero-word, .hero-line, .hero-sub, .hero > .wrap > .hero-cta) { opacity: 0; transform: translateY(14px); }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 22px; height: 36px; border: 2px solid var(--graphite); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; background: var(--ash); transform: translateX(-50%); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vw, 160px) 0; position: relative; }
.section-alt { background: var(--charcoal); }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 40px; }
.section-head .num { font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--white); }
.section-head .num::after { content: ""; display: inline-block; width: 40px; height: 1px; background: var(--graphite); vertical-align: middle; margin-left: 18px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.about-copy p { color: #C9C9C9; font-size: 18px; margin: 0 0 16px; max-width: 46ch; }
.facets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: clamp(56px, 8vw, 96px); }
.facet { background: var(--charcoal); padding: 36px 32px 40px; min-height: 240px; display: flex; flex-direction: column; transition: background .3s; }
.facet:hover { background: #1D1D1D; }
.facet-num { font-size: 12px; color: var(--ash); letter-spacing: .2em; margin-bottom: auto; }
.facet h3 { font-size: 28px; margin: 48px 0 10px; text-transform: uppercase; letter-spacing: .2em; font-weight: 500; }
.facet p { color: var(--ash); margin: 0; }

/* Work */
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.split-head p { max-width: 38ch; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--black); display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.card:hover { transform: translateY(-6px); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: #0A0A0A; overflow: hidden; display: grid; place-items: center; }
.card-media .ghost { position: absolute; width: 70%; height: auto; aspect-ratio: 1; right: -12%; top: -20%; color: #141414; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-media .ghost { transform: translate(-4%, 4%); }
.card-media span { position: relative; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #3A3A3A; }
.card-body { padding: 26px 28px 30px; }
.tag { font-size: 11px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--ash); }
.card-body h3 { font-size: 24px; margin: 10px 0 6px; }
.card-body p { color: var(--ash); margin: 0 0 22px; }
.card-link { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.card-link::after { content: " →"; display: inline-block; transition: transform .25s; }
.card:hover .card-link::after { transform: translateX(6px); }

/* Music */
/* About: quick facts */
.facts { list-style: none; padding: 0; margin: clamp(40px, 6vw, 64px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 0 0; font-size: 17px; }

/* Games */
.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.game { position: relative; background: var(--black); aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1); --cut: 24px; }
.game:hover { transform: translateY(-6px); }
.game .ghost { position: absolute; width: 80%; height: auto; aspect-ratio: 1; right: -22%; top: 8%; color: #0F0F0F; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.game:hover .ghost { transform: translate(-5%, 5%); }
.game-state { position: absolute; z-index: 1; top: 22px; left: 24px; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--white); }
.game-body { position: relative; padding: 64px 24px 26px; }
.game-body h3 { font-size: 22px; margin: 8px 0 6px; }
.game-body p { color: var(--ash); margin: 0; font-size: 15px; }
/* Cover art: black and white by default, color on hover. Missing files fall back to the monogram. */
.game-cover { position: relative; flex: 1; min-height: 120px; overflow: hidden; }
.game-cover img { position: absolute; inset: 0; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) brightness(.6) contrast(1.1); transform: scale(1.02); transition: filter .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.game:hover .game-cover img { filter: grayscale(0) brightness(.85); transform: scale(1.06); }
.game:has(.game-cover) .ghost { display: none; }
.game:has(.game-cover) .game-state { background: var(--black); padding: 6px 10px; top: 16px; left: 16px; }
.game:has(.game-cover) .game-body { background: var(--black); padding-top: 20px; }

/* Dev */
.chips { list-style: none; padding: 0; margin: -20px 0 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--graphite); padding: 8px 14px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
#dev .card { background: var(--charcoal); }
#dev .card-media { background: #101010; }

/* Stream */
.stream { position: relative; }
#stream { overflow: hidden; }
.stream-ghost { position: absolute; width: min(70vh, 640px); height: min(70vh, 640px); right: -6vw; top: 50%; transform: translateY(-50%); color: #1C1C1C; pointer-events: none; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--ash); border: 1px solid var(--graphite); padding: 8px 14px; margin-bottom: 28px; }
.dot { width: 8px; height: 8px; background: var(--graphite); border-radius: 50%; }
.status.live { color: var(--white); border-color: var(--white); }
.status.live .dot { background: var(--white); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.stream-title { font-size: clamp(48px, 9vw, 120px); line-height: .95; margin-bottom: 20px; }

/* Contact */
.contact-title { font-size: clamp(64px, 14vw, 180px); line-height: .9; letter-spacing: -.04em; margin-bottom: 48px; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.links a { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px; padding: 26px 8px; border-bottom: 1px solid var(--line); font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; transition: background .25s, color .25s, padding .25s; }
.links a .muted { font-size: 15px; font-weight: 400; }
.links a .arrow { transition: transform .25s; }
.link-name { display: inline-flex; align-items: center; gap: 16px; }
.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.links .ico { width: 22px; height: 22px; }
.btn .ico { width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; }
.links a:hover { background: var(--white); color: var(--black); padding-left: 24px; padding-right: 24px; }
.links a:hover .muted { color: #555; }
.links a:hover .arrow { transform: translateX(6px); }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.footer-inner a { margin-left: auto; }
.footer-mono { width: 22px; height: 22px; color: var(--white); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .1s; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--black);
    flex-direction: column; justify-content: center; gap: 28px; padding: 0 var(--gutter);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav-links a { font-size: 28px; letter-spacing: .2em; color: var(--white); }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; }
  /* backdrop-filter would trap the fixed menu inside the bar, so drop it while open */
  .nav.open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--black); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-brand, .nav-toggle { position: relative; z-index: 2; }
  .about-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .games { grid-template-columns: 1fr 1fr; }
  .game { aspect-ratio: auto; min-height: 240px; --cut: 18px; }
  .game-state { top: 16px; left: 16px; }
  .game-body { padding: 52px 16px 18px; }
  .game-body h3 { font-size: 18px; }
  .facets { grid-template-columns: 1fr; }
  .facet { min-height: 0; }
  .cards { grid-template-columns: 1fr; }
  .hero-ghost { right: -45vw; opacity: .9; }
  .stream-ghost { right: -40vw; opacity: .7; }
  .links a { grid-template-columns: 1fr auto; }
  .links a .muted { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
