@font-face {
  font-family: "Troika";
  src: url("./Troika.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #0A0A0A;
  --white: #FDFDFD;
  --red: #FF0002;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--red);
  color: var(--white);
  font-family: "Troika", sans-serif;
}

/* The video stays fixed while all three sections scroll above it. */
.video-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--red);
}
.video-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .10);
}
.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-shell { position: relative; z-index: 1; }

.page-section {
  min-height: 100svh;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px);
  display: grid;
  place-items: center;
  scroll-snap-align: start;
}

.section-inner {
  width: min(100%, 860px);
  padding: clamp(34px, 5.2vw, 64px);
  position: relative;
  background: rgba(10, 10, 10, 1);
  border: 10px solid var(--white);
  box-shadow: 10px 11px 0 rgba(0, 0, 0, .32), 0 24px 58px rgba(0, 0, 0, .40);
}

/* Friendly, not frantic: small differences in the entrance each visit. */
.playful-panel {
  opacity: 1;
  transform-origin: 50% 60%;
  animation: panel-arrive 680ms cubic-bezier(.2, 1.15, .35, 1) both;
  animation-delay: var(--panel-delay, 0ms);
}
@keyframes panel-arrive {
  0% { opacity: 0; transform: translateY(24px) rotate(var(--panel-tilt, -.4deg)) scale(.985); }
  75% { opacity: 1; transform: translateY(-3px) rotate(0) scale(1.004); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(.62rem, .9vw, .74rem);
  letter-spacing: .16em;
}
.dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border: 1px solid var(--white);
  transform: rotate(45deg);
  animation: dot-nudge 4.6s ease-in-out infinite;
}
@keyframes dot-nudge {
  0%, 82%, 100% { transform: rotate(45deg); }
  87% { transform: rotate(135deg) scale(1.2); }
  92% { transform: rotate(30deg) scale(.94); }
}

h1, h2 {
  margin: clamp(22px, 3vw, 30px) 0 16px;
  font-weight: 400;
  line-height: 1.06;
  text-transform: uppercase;
  overflow-wrap: normal;
}
h1 {
  width: 100%;
  white-space: nowrap;
  font-size: clamp(3.15rem, 7.2vw, 6.25rem);
  letter-spacing: -.025em;
}
h2 { font-size: clamp(2.65rem, 6vw, 4.9rem); }
h1 .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(.22em) rotate(var(--letter-tilt, 3deg));
  animation: letter-settle 420ms cubic-bezier(.2, 1.25, .35, 1) forwards;
  animation-delay: var(--letter-delay, 180ms);
}
h1 .letter.space { width: .28em; }
@keyframes letter-settle {
  0% { opacity: 0; transform: translateY(.22em) rotate(var(--letter-tilt)); }
  75% { opacity: 1; transform: translateY(-.04em) rotate(0); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}

.accent { color: var(--red); }
.intro, .section-copy, .legal-copy {
  max-width: 54ch;
  margin: 0;
  color: #C9C9C9;
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}
.tiny-note {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 11px;
  color: var(--black);
  background: var(--white);
  font: 700 .78rem/1.25 Arial, sans-serif;
  transform: rotate(-1deg);
  box-shadow: 3px 3px 0 var(--red);
  transition: transform 180ms ease;
}
.tiny-note:hover { transform: rotate(1deg) translateY(-2px); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(34px, 6vh, 58px);
  padding: 13px 16px;
  border: 2px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-size: .72rem;
  letter-spacing: .13em;
  transition: background 180ms ease, transform 220ms cubic-bezier(.2, 1.3, .35, 1);
}
.scroll-cue-arrow {
  color: var(--red);
  font: 24px Arial, sans-serif;
  animation: arrow-bob 1.5s ease-in-out infinite;
}
@keyframes arrow-bob { 50% { transform: translateY(4px); } }
.scroll-cue:hover { background: var(--red); transform: translateY(-2px) rotate(-.6deg); }

.title-panel, .links-panel, 
.links-panel { }
.section-copy { margin-top: 2px; }
.social-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: clamp(26px, 3.5vw, 36px);
}
.social-links a {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  background: #171717;
  border: 3px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-size: clamp(.96rem, 1.25vw, 1.06rem);
  opacity: 0;
  transform: translateY(12px);
  transition: background 170ms ease, color 170ms ease, transform 230ms cubic-bezier(.2, 1.35, .35, 1), box-shadow 180ms ease;
}
.social-links a.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--rest-tilt, 0deg));
  transition-delay: var(--arrival, 0ms);
}
.social-icon {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--red);
  font: 22px Arial, sans-serif;
  transition: color 170ms ease, transform 240ms cubic-bezier(.2, 1.5, .35, 1);
}
.link-aside {
  margin-left: auto;
  color: #999;
  font: italic .72rem Arial, sans-serif;
}
.arrow {
  flex: 0 0 auto;
  color: var(--red);
  font: 21px Arial, sans-serif;
  transition: color 170ms ease, transform 200ms ease;
}
.social-links a:focus-visible, .scroll-cue:focus-visible, footer a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .social-links a:hover {
    background: var(--red);
    color: var(--white);
    transform: translateX(5px) rotate(var(--hover-tilt, -.5deg));
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .28);
  }
  .social-links a:hover .social-icon {
    color: var(--white);
    transform: rotate(var(--icon-tilt, 10deg)) scale(1.12);
  }
  .social-links a:hover .link-aside { color: var(--white); }
  .social-links a:hover .arrow {
    color: var(--white);
    transform: translate(3px, -3px);
  }
}
.social-links a:active { transform: translateY(2px) scale(.985); }

.shuffle-line {
  display: inline-block;
  margin: 22px 0 0;
  padding: 7px 10px;
  border: 1px dashed #777;
  color: #ccc;
  font: italic .76rem Arial, sans-serif;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 180ms ease;
}
.shuffle-line:hover { color: var(--white); border-color: var(--red); transform: rotate(-1deg); }
.shuffle-line.boing { animation: tiny-boing 300ms ease; }
@keyframes tiny-boing { 50% { transform: rotate(1deg) scale(1.035); } }

.legal-section { min-height: 82svh; }

.legal-copy { margin-top: 16px; font-size: clamp(.8rem, 1.1vw, .9rem); }
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 18px;
  margin-top: clamp(28px, 4vw, 42px);
  padding-top: 16px;
  border-top: 2px solid #414141;
  color: #A5A5A5;
  font-size: .68rem;
  letter-spacing: .04em;
}
.footer-aside { font: italic .7rem Arial, sans-serif; }
footer a { color: var(--white); text-decoration: none; transition: color 160ms, transform 160ms; }
footer a:hover { color: var(--red); transform: translateY(-2px); }

.motion-ready .playful-panel:not(.is-visible) { opacity: 0; transform: translateY(22px); }
.playful-panel.is-visible { opacity: 1; }

@media (max-width: 700px) {
  .page-section { min-height: 100svh; padding: 22px 14px; }
  .section-inner { padding: 30px 24px; border-width: 6px; }
  h1 { font-size: clamp(2.45rem, 9.2vw, 4.65rem); letter-spacing: -.045em; }
  h2 { font-size: clamp(2.35rem, 8.8vw, 3.75rem); }
  .intro, .section-copy, .legal-copy { font-size: .9rem; line-height: 1.7; }
  .social-links a { min-height: 60px; padding: 12px 14px; border-width: 3px; }
  .link-aside { display: none; }
  footer { align-items: flex-start; }
}
@media (max-width: 380px) {
  .section-inner { padding: 25px 17px; }
  h1 { font-size: clamp(1.9rem, 8vw, 2.3rem); }
  .eyebrow { font-size: .56rem; letter-spacing: .12em; }
  .social-links a { gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready .playful-panel:not(.is-visible), .social-links a { opacity: 1; transform: none; }
  h1 .letter { opacity: 1; transform: none; }
}

/* LEGAL SECTION: wider horizontal panel with centered copy */
.legal-section {
  min-height: 82svh;
}

.legal-panel {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(34px, 4.5vw, 58px);
}

.legal-panel .eyebrow {
  justify-content: center;
  text-align: center;
}

.legal-panel h2 {
  text-align: center;
  margin-inline: auto;
}

.legal-panel .legal-copy {
  width: min(100%, 78ch);
  max-width: 78ch;
  margin: 18px auto 0;
  text-align: center;
}

.legal-panel footer {
  width: 100%;
  margin-top: clamp(30px, 4vw, 46px);
}

/* Keep the wide legal panel balanced on smaller screens. */
@media (max-width: 700px) {
  .legal-panel {
    width: 100%;
    padding: 28px 20px;
  }

  .legal-panel .legal-copy {
    max-width: 52ch;
    margin-top: 15px;
    text-align: center;
  }

  .legal-panel footer {
    justify-content: center;
    text-align: center;
  }
}


/* -------------------------------------------------------------------------
   Responsive refinements: phones, tablets, laptops, wide screens and touch.
   These rules intentionally override the original visual styling above.
   ------------------------------------------------------------------------- */

html {
  min-width: 320px;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
}

img, video, svg {
  max-width: 100%;
}

.video-background video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-section {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  padding-top: clamp(24px, 5vh, 64px);
  padding-bottom: clamp(24px, 5vh, 64px);
}

.section-inner {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

h1, h2, p, a, footer, .eyebrow {
  min-width: 0;
}

h1, h2 {
  text-wrap: balance;
}

.intro, .section-copy, .legal-copy {
  overflow-wrap: anywhere;
}

.social-links a {
  min-width: 0;
  min-height: 48px;
}

.social-links a > span {
  min-width: 0;
}

.social-links a > span:nth-child(2) {
  overflow-wrap: anywhere;
}

.shuffle-line {
  max-width: 100%;
  cursor: pointer;
  line-height: 1.5;
}

.shuffle-line:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

footer a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* Mid-size tablets and compact laptops */
@media (min-width: 701px) and (max-width: 1024px) {
  .page-section {
    padding-inline: clamp(24px, 5vw, 48px);
  }

  .section-inner {
    width: min(100%, 800px);
    padding: clamp(34px, 5vw, 54px);
  }

  .legal-panel {
    width: min(100%, 900px);
  }

  h1 {
    font-size: clamp(3.4rem, 8vw, 5.8rem);
  }

  h2 {
    font-size: clamp(2.8rem, 6.2vw, 4.4rem);
  }
}

/* Phones */
@media (max-width: 700px) {
  html {
    scroll-snap-type: y proximity;
  }

  .page-section {
    min-height: 100vh;
    min-height: 100svh;
    padding: 20px 14px;
  }

  .section-inner {
    width: 100%;
    padding: clamp(24px, 7vw, 34px) clamp(18px, 5.5vw, 26px);
    border-width: 5px;
    box-shadow: 6px 7px 0 rgba(0, 0, 0, .32), 0 16px 36px rgba(0, 0, 0, .35);
  }

  .title-panel {
    text-align: left;
  }

  h1 {
    white-space: normal;
    overflow-wrap: normal;
    font-size: clamp(2.05rem, 10.2vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -.035em;
  }

  h2 {
    font-size: clamp(2.15rem, 9vw, 3.7rem);
    line-height: 1.04;
  }

  .intro, .section-copy, .legal-copy {
    font-size: clamp(.9rem, 3.7vw, 1rem);
    line-height: 1.65;
  }

  .eyebrow {
    gap: 8px;
    font-size: clamp(.56rem, 2.4vw, .68rem);
    letter-spacing: .11em;
    line-height: 1.5;
  }

  .dot {
    flex-basis: 8px;
    width: 8px;
    height: 8px;
  }

  .scroll-cue {
    min-height: 46px;
    gap: 12px;
    margin-top: 30px;
    padding: 11px 13px;
    font-size: .65rem;
    letter-spacing: .09em;
  }

  .social-links {
    gap: 10px;
    margin-top: 24px;
  }

  .social-links a {
    min-height: 54px;
    gap: 10px;
    padding: 10px 12px;
    border-width: 2px;
    font-size: .96rem;
  }

  .social-icon {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

  .link-aside {
    display: none;
  }

  .arrow {
    margin-left: auto;
  }

  .shuffle-line {
    margin-top: 18px;
    padding: 8px 9px;
    font-size: .74rem;
  }

  .legal-section {
    min-height: 82vh;
    min-height: 82svh;
  }

  .legal-panel {
    width: 100%;
    padding: 26px 18px;
  }

  .legal-panel .eyebrow {
    justify-content: flex-start;
    text-align: left;
  }

  .legal-panel h2 {
    text-align: left;
  }

  .legal-panel .legal-copy {
    max-width: 58ch;
    margin: 15px 0 0;
    text-align: left;
  }

  .legal-panel footer {
    justify-content: flex-start;
    text-align: left;
    gap: 10px 16px;
    margin-top: 26px;
  }
}

/* Narrow phones: prevent the title and link rows from forcing horizontal scroll. */
@media (max-width: 380px) {
  .page-section {
    padding-inline: 10px;
  }

  .section-inner {
    padding: 23px 15px;
    border-width: 4px;
  }

  h1 {
    font-size: clamp(1.85rem, 9.4vw, 2.35rem);
    letter-spacing: -.04em;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }

  .eyebrow {
    font-size: .54rem;
    letter-spacing: .095em;
  }

  .social-links a {
    gap: 8px;
    padding-inline: 9px;
    font-size: .9rem;
  }
}

/* Very short screens and landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  .page-section {
    min-height: 100vh;
    padding-block: 18px;
  }

  .section-inner {
    padding-block: 24px;
  }

  .scroll-cue {
    margin-top: 20px;
  }

  .legal-section {
    min-height: 100vh;
  }
}

/* Touch devices: avoid relying on hover-only feedback. */
@media (hover: none), (pointer: coarse) {
  .social-links a:hover,
  .scroll-cue:hover,
  .shuffle-line:hover,
  footer a:hover {
    transform: none;
  }

  .social-links a:active {
    background: var(--red);
  }
}

/* Keep the page usable when the visitor requests less motion. */
@media (prefers-reduced-motion: reduce) {
  .video-background video {
    visibility: hidden;
  }

  .playful-panel,
  .social-links a,
  h1 .letter {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
