/* =========================================================
   PERSONAL ARCHIVE INITIATIVE
   Final landing baseline

   Locked interaction rules:
   - approved 2D lamp
   - cabinet / drawer / handle are NOT clickable
   - drawer opens visually on the second scroll/swipe
   - ONLY white drawer card is app CTA
   - record folders animate out with the drawer
   - desktop folders: loose horizontal plane above drawer
   - mobile folders: circle around white CTA card
   ========================================================= */

* {
  box-sizing: border-box;
}

:root {
  --black: #050605;

  --room-top: #20231f;
  --room-mid: #151815;
  --room-bottom: #0c0e0c;

  --steel-1: #30342f;
  --steel-2: #242824;

  --folder: #292c28;
  --folder-hover: #353a34;

  --paper: #d7d2c6;
  --paper-dark: #c6c0b4;

  --text: #e9ece7;
  --soft: #a8aea7;
  --muted: #727972;

  --line: #343934;
  --stamp: #9f554d;

  --mono:
    "Cascadia Code",
    "JetBrains Mono",
    "IBM Plex Mono",
    Consolas,
    monospace;

  --hand:
    "Segoe Print",
    "Bradley Hand",
    cursive;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;

  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--black);
  color: var(--text);

  font-family:
    "Helvetica Neue",
    Arial,
    sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

body::after {
  content: "";

  position: fixed;
  z-index: 9999;
  inset: 0;

  pointer-events: none;

  opacity: .065;

  background-image:
    radial-gradient(
      rgba(255,255,255,.22) .45px,
      transparent .7px
    );

  background-size: 5px 5px;
}


/* =========================================================
   INTRO
   ========================================================= */

.intro {
  position: fixed;
  z-index: 500;
  inset: 0;

  overflow: hidden;

  background: #010201;

  transition:
    transform 1.4s cubic-bezier(.66,0,.2,1),
    opacity .82s ease .36s;
}

.intro-wall {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      ellipse at 50% 28%,
      rgba(255,214,110,0),
      transparent 64%
    );

  transition: background 1s ease;
}




/* =========================================================
   INTRO BRAND
   ========================================================= */

.intro-brand {
  position: absolute;
  z-index: 8;

  left: 50%;
  top: 56%;

  transform: translate(-50%, -50%);

  white-space: nowrap;

  color: #010201;

  font-family: var(--mono);

  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;

  letter-spacing: .28em;
  text-indent: .28em;

  text-align: center;

  text-shadow: none;

  transition:
    color .9s ease,
    text-shadow .9s ease;
}





.enter-note {
  position: absolute;

  left: 50%;
  bottom: calc(8vh + env(safe-area-inset-bottom));

  transform: translateX(-50%);

  white-space: nowrap;

  color: #292c28;

  font-family: var(--mono);
  font-size: 8px;

  letter-spacing: .18em;
  text-transform: uppercase;

  transition: color .72s ease;
}


/* =========================================================
   APPROVED 2D LAMP
   Kept intentionally simple.
   ========================================================= */

.intro-lamp {
  position: absolute;
  z-index: 6;

  left: 50%;
  top: 0;

  width: 260px;
  height: 360px;

  transform: translateX(-50%);
}

.intro-lamp .cable {
  position: absolute;

  left: 50%;
  top: 0;

  width: 3px;
  height: 128px;

  transform: translateX(-50%);

  background:
    linear-gradient(
      90deg,
      #080908,
      #242520,
      #080908
    );

  z-index: 10;
}

.intro-lamp .socket {
  position: absolute;

  left: 50%;
  top: 116px;

  width: 38px;
  height: 58px;

  transform: translateX(-50%);

  border-radius: 5px 5px 9px 9px;

  background:
    linear-gradient(
      90deg,
      #090a09,
      #24251f 48%,
      #090a09
    );

  border: 1px solid #2b2e28;

  z-index: 10;
}

.intro-lamp .socket::before {
  content: "";

  position: absolute;

  left: 7px;
  right: 7px;
  top: 15px;

  height: 1px;

  background: #3b3e36;

  box-shadow:
    0 8px #3b3e36,
    0 16px #3b3e36;
}

.intro-lamp .bulb {
  position: absolute;

  left: 50%;
  top: 232px;

  width: 76px;
  height: 76px;

  transform: translateX(-50%);

  border-radius: 50%;

  background:
    radial-gradient(
      circle at 37% 30%,
      #fffef0 0%,
      #fff4c6 18%,
      #ffdb76 45%,
      #d99b34 72%,
      #6f4a12 100%
    );

  border:
    1px solid rgba(255,231,158,.6);

  box-shadow:
    0 0 16px rgba(255,211,84,.72),
    0 0 48px rgba(255,198,42,.28);

  z-index: 20;

  opacity: .07;

  transition: opacity .7s ease;
}

.intro-lamp .filament {
  position: absolute;

  left: 50%;
  top: 30px;

  width: 26px;
  height: 26px;

  transform: translateX(-50%);

  z-index: 2;
}

.intro-lamp .filament::before,
.intro-lamp .filament::after {
  content: "";

  position: absolute;

  bottom: 0;

  width: 1px;
  height: 21px;

  background: #f0c65f;
}

.intro-lamp .filament::before {
  left: 5px;
  transform: rotate(-8deg);
}

.intro-lamp .filament::after {
  right: 5px;
  transform: rotate(8deg);
}

.intro-lamp .filament span {
  position: absolute;

  left: 5px;
  right: 5px;
  top: 3px;

  height: 9px;

  border-bottom: 2px solid #ffd36b;

  border-radius: 50%;

  filter:
    drop-shadow(
      0 0 3px #ffb829
    );
}

.intro-lamp .bulb::after {
  content: "";

  position: absolute;

  left: 15px;
  top: 20px;

  width: 9px;
  height: 22px;

  border-left:
    2px solid rgba(255,255,255,.32);

  border-radius: 50%;

  transform: rotate(14deg);

  opacity: .72;
}

.intro-lamp .cover {
  position: absolute;

  left: 50%;
  top: 158px;

  width: 220px;
  height: 105px;

  transform: translateX(-50%);

  clip-path:
    polygon(
      39% 0,
      61% 0,
      100% 100%,
      0 100%
    );

  background:
    linear-gradient(
      180deg,
      #282b25 0%,
      #141612 55%,
      #070807 100%
    );

  filter:
    drop-shadow(
      0 16px 18px rgba(0,0,0,.58)
    );

  z-index: 30;
}

.intro-lamp .cover::before {
  content: "";

  position: absolute;

  left: 38px;
  right: 38px;
  top: 16px;

  height: 1px;

  background:
    rgba(255,255,255,.05);
}

.intro-light {
  position: absolute;
  z-index: 1;

  left: 50%;
  top: 273px;

  width: min(900px,120vw);
  height: 72vh;

  transform: translateX(-50%);

  clip-path:
    polygon(
      44% 0,
      56% 0,
      100% 100%,
      0 100%
    );

  background:
    linear-gradient(
      180deg,
      rgba(255,217,102,.15),
      rgba(255,210,73,.04) 45%,
      transparent 100%
    );

  filter: blur(9px);

  opacity: 0;

  transition: opacity 1s ease;
}

body.light-on .intro-wall {
  background:
    radial-gradient(
      ellipse at 50% 29%,
      rgba(255,217,118,.10),
      rgba(255,215,108,.018) 43%,
      transparent 70%
    );
}

body.light-on .intro-lamp .bulb {
  opacity: 1;
}

body.light-on .intro-light {
  opacity: 1;
}



body.light-on .intro-brand {
  color: #b9ad88;

  text-shadow:
    0 0 10px rgba(255,215,120,.10),
    0 0 24px rgba(255,205,85,.06);
}

body.light-on .enter-note {
  color: #827653;
}

body.archive-entered .intro {
  transform:
    translateY(-110vh)
    scale(1.035);

  opacity: 0;

  pointer-events: none;
}


/* =========================================================
   ARCHIVE STAGE
   ========================================================= */

.stage {
  position: fixed;
  inset: 0;

  overflow: hidden;

  opacity: 0;

  transform:
    translateY(18px)
    scale(1.012);

  transition:
    opacity .78s ease .46s,
    transform 1.05s ease .38s;
}

body.archive-entered .stage {
  opacity: 1;

  transform:
    translateY(0)
    scale(1);
}

.room {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      var(--room-top),
      var(--room-mid) 58%,
      var(--room-bottom)
    );
}

.room::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      ellipse at 50% -5%,
      rgba(255,222,142,.055),
      transparent 47%
    );
}

.room::after {
  content: "";

  position: absolute;

  left: -10%;
  right: -10%;
  top: 69%;

  height: 1px;

  background: #2b302b;
}


/* =========================================================
   REGISTER
   ========================================================= */

/* .register {
  position: absolute;
  z-index: 90;

  left: 0;
  right: 0;
  top: 0;

  height:
    calc(
      56px +
      env(safe-area-inset-top)
    );

  display: flex;
  align-items: center;

  padding:
    env(safe-area-inset-top)
    21px
    0;

  background:
    rgba(5,7,5,.87);

  border-bottom:
    1px solid var(--line);

  backdrop-filter: blur(8px);
} */

.register {
  position: absolute;
  z-index: 90;

  left: 0;
  right: 0;
  top: 0;

  height: auto;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  padding:
    calc(16px + env(safe-area-inset-top))
    24px
    0;

  background: transparent;

  border: 0;

  backdrop-filter: none;

  pointer-events: none;
}

.register .mark,
.register .registry-name {
  display: none;
}
/*  */

.mark {
  position: relative;

  width: 22px;
  height: 29px;

  margin-right: 11px;

  border:
    1px solid #bbc0ba;
}

.mark::before,
.mark::after {
  content: "";

  position: absolute;

  left: 5px;
  right: 5px;

  height: 1px;

  background:
    #bbc0ba;
}

.mark::before {
  top: 9px;
}

.mark::after {
  top: 17px;
}

.registry-name {
  font-family: var(--mono);

  font-size: 9px;
  font-weight: 700;

  letter-spacing: .13em;
}

.registry-meta {
  margin-left: auto;

  display: flex;

  gap: 26px;

  color: #646a64;

  font-family: var(--mono);
  font-size: 7px;

  letter-spacing: .09em;
}

.registry-meta strong {
  color: #b8beb8;
  font-weight: 500;
}



.top-support {
  color: #d6dbd5;

  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;

  letter-spacing: .10em;

  text-decoration: none;

  pointer-events: auto;

  white-space: nowrap;
}

.top-support:hover,
.top-support:focus-visible {
  color: #ffffff;
}


/* =========================================================
   COLLECTION NOTE
   ========================================================= */

.collection-note {
  position: absolute;
  z-index: 20;

  left: 30px;
  /* top: 88px; */
  /* top: 32px; */
  top: 16px;

  width: 255px;

  font-family: var(--mono);
}

.collection-note small {
  display: block;

  color: #666d66;

  font-size: 7px;

  letter-spacing: .16em;
}

.collection-note strong {
  display: block;

  margin-top: 10px;

  color: #dfe3dd;

  font-size: 12px;
  line-height: 1.35;
}

.collection-note span {
  display: block;

  margin-top: 12px;

  color: #717871;

  font-size: 10px;
  line-height: 1.55;
}


/* =========================================================
   CABINET — VISUAL ONLY / NOT CLICKABLE
   ========================================================= */

.cabinet {
  position: absolute;
  z-index: 30;

  pointer-events: none;

  left: 50%;
  /* top: 56%; */
  top: calc(56% - 150px);

  width:
    min(
      780px,
      71vw
    );

  height:
    min(
      560px,
      64vh
    );

  transform:
    translate(-50%,-50%);

  background:
    linear-gradient(
      180deg,
      #30342f,
      #242824
    );

  border:
    1px solid #414641;

  box-shadow:
    0 50px 110px rgba(0,0,0,.57),
    inset 0 0 0 4px rgba(255,255,255,.015);
}

.cabinet::before {
  content: "";

  position: absolute;
  inset: 13px;

  border:
    1px solid #141714;
}

.cabinet-label {
  position: absolute;

  top: 29px;
  left: 29px;

  padding: 7px 10px;

  background: #171a18;

  border:
    1px solid #4b514b;

  color: #a6aca6;

  font-family: var(--mono);
  font-size: 7px;

  letter-spacing: .1em;
}

.cabinet-no {
  position: absolute;

  right: 28px;
  top: 31px;

  color: #656b65;

  font-family: var(--mono);
  font-size: 8px;
}

.drawer-frame {
  position: absolute;

  left: 8%;
  right: 8%;
  top: 22%;
  bottom: 14%;

  perspective: 1200px;

  overflow: visible;

  background: #121512;

  border:
    1px solid #454b45;

  pointer-events: none;
}

.drawer {
  position: absolute;
  inset: 7px;

  transform-style: preserve-3d;
  transform-origin: top center;

  transform:
    translateZ(0)
    translateY(0)
    rotateX(0deg);

  transition:
    transform
      1.08s
      cubic-bezier(.17,.86,.22,1);

  pointer-events: none;
}

/*
  The drawer VISUALLY opens.
  It is still not clickable.
*/
.stage.drawer-open .drawer {
  transform:
    translateZ(360px)
    translateY(122px)
    rotateX(-4deg);
}

.drawer-front {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      #30342f,
      #252925
    );

  border:
    1px solid #444944;

  box-shadow:
    inset 0 1px rgba(255,255,255,.04),
    0 12px 25px rgba(0,0,0,.28);
}

.drawer-handle {
  position: absolute;

  pointer-events: none;

  left: 50%;
  top: 23%;

  width: 150px;
  height: 38px;

  transform:
    translateX(-50%);

  background:
    #1b1f1c;

  border:
    1px solid #575e57;
}

.drawer-handle::before {
  content: "";

  position: absolute;

  left: 18px;
  right: 18px;
  top: 11px;

  height: 10px;

  border:
    1px solid #515851;
}


/* =========================================================
   WHITE ARCHIVAL CARD = ONLY APP BUTTON
   ========================================================= */

.drawer-label {
  position: absolute;
  z-index: 40;

  left: 50%;
  bottom: 18%;

  width: 270px;

  transform:
    translateX(-50%);

  padding:
    13px 16px 12px;

  background:
    var(--paper);

  color:
    #181a18;

  border:
    1px solid #73776f;

  text-align: center;
  text-decoration: none;

  box-shadow:
    0 4px 13px rgba(0,0,0,.18);

  cursor: pointer;

  pointer-events: auto;

  transition:
    background .14s ease,
    box-shadow .14s ease;
}

.drawer-label:hover,
.drawer-label:active,
.drawer-label:focus-visible {
  background: #e7e3d9;

  box-shadow:
    0 7px 18px rgba(0,0,0,.24);
}

.drawer-label:focus-visible {
  outline:
    2px solid #f1f2ee;

  outline-offset:
    4px;
}

.drawer-label small {
  display: block;

  color: #656961;

  font-family: var(--mono);
  font-size: 7px;

  letter-spacing: .13em;
}

.drawer-label strong {
  display: block;

  margin-top: 7px;

  font-family: var(--mono);
  font-size: 10px;

  letter-spacing: .045em;
}

.drawer-domain {
  position: relative;

  width: 84%;
  height: 24px;

  margin:
    8px auto 0;
}

.drawer-domain-line {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 5px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      rgba(62,65,59,.16),
      rgba(62,65,59,.72) 10%,
      rgba(62,65,59,.72) 90%,
      rgba(62,65,59,.16)
    );
}

.drawer-domain-hand {
  position: absolute;

  right: 7px;
  bottom: 3px;

  padding:
    0 4px;

  background:
    var(--paper);

  color:
    #5d5748;

  font-family:
    var(--hand);

  font-size:
    10px;

  line-height: 1;

  letter-spacing: -.02em;

  transform:
    rotate(-2.4deg);

  opacity: .9;
}

.drawer-label:hover .drawer-domain-hand,
.drawer-label:active .drawer-domain-hand,
.drawer-label:focus-visible .drawer-domain-hand {
  background:
    #e7e3d9;
}


/* =========================================================
   RECORD FOLDERS — THE ONLY MOVING OBJECTS IN ARCHIVE ROOM
   ========================================================= */

.records {
  position: absolute;
  z-index: 55;
  inset: 0;

  pointer-events: none;
}

.record-card {
  position: absolute;

  left: 50%;
  top: 50%;

  width: 220px;
  height: 146px;

  padding:
    18px 16px;

  opacity: 1;
  visibility: hidden;

  background:
    var(--folder);

  border:
    1px solid #505650;

  box-shadow:
    0 10px 25px rgba(0,0,0,.28);

  cursor: pointer;

  pointer-events: none;

  /*
    Cards start stacked behind the drawer/white card.
    No fading. Only transform moves them out.
  */
  transform:
    translate(
      calc(-50% + var(--origin-x, 0px)),
      calc(-50% + var(--origin-y, 0px))
    )
    rotate(0deg);

  transition:
    transform
      .88s
      cubic-bezier(.17,.84,.24,1),
    background
      .12s ease,
    border-color
      .12s ease,
    box-shadow
      .12s ease;
}

.record-card::before {
  content: "";

  position: absolute;

  left: -1px;
  top: -19px;

  width: 92px;
  height: 19px;

  background:
    var(--folder);

  border:
    1px solid #505650;

  border-bottom:
    0;

  transition:
    background .12s ease,
    border-color .12s ease;
}

.stage.records-open .record-card {
  visibility: visible;
  pointer-events: auto;

  transform:
    translate(
      calc(-50% + var(--card-x, 0px)),
      calc(-50% + var(--card-y, 0px))
    )
    rotate(var(--card-r, 0deg));
}

.record-card:hover,
.record-card:active,
.record-card.is-pressed {
  background:
    var(--folder-hover);

  border-color:
    #858c85;

  box-shadow:
    0 15px 36px rgba(0,0,0,.38);
}

.record-card:hover::before,
.record-card:active::before,
.record-card.is-pressed::before {
  background:
    var(--folder-hover);

  border-color:
    #858c85;
}

.record-id {
  color: #747b74;

  font-family: var(--mono);
  font-size: 6px;

  letter-spacing: .14em;
}

.record-title {
  margin-top: 14px;

  color: #e4e7e2;

  font-size: 17px;
  font-weight: 600;

  line-height: 1.02;
  letter-spacing: -.04em;
}

.record-subtitle {
  max-width: 180px;

  margin-top: 7px;

  color: #8c938c;

  font-size: 8px;
  line-height: 1.4;
}

.record-hand {
  position: absolute;

  right: 11px;
  top: 10px;

  max-width: 90px;

  color: #c0b9a4;

  font-family: var(--hand);

  font-size: 8px;
  line-height: 1.18;

  text-align: right;

  transform:
    rotate(var(--hand-r,-4deg));

  opacity: .9;
}

.record-hand::after {
  content: "";

  display: block;

  width: 92%;
  height: 1px;

  margin:
    3px 0 0 auto;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(186,180,159,.42)
    );
}

.record-code {
  position: absolute;

  left: 15px;
  bottom: 12px;

  color: #616861;

  font-family: var(--mono);
  font-size: 5px;

  letter-spacing: .08em;
}

.record-stamp {
  position: absolute;

  right: 12px;
  bottom: 11px;

  color:
    var(--stamp);

  font-family: var(--mono);

  font-size: 6px;
  font-weight: 700;

  transform:
    rotate(-6deg);
}


/* =========================================================
   SCROLL HINT
   ========================================================= */

.scroll-hint {
  position: absolute;
  z-index: 80;

  left: 50%;
  bottom: 22px;

  transform:
    translateX(-50%);

  color: #626962;

  font-family: var(--mono);
  font-size: 7px;

  letter-spacing: .16em;

  white-space: nowrap;

  text-transform: uppercase;

  transition: opacity .2s ease;
}

.scroll-hint::before {
  content: "↓";

  display: block;

  margin-bottom: 7px;

  text-align: center;

  color: #9ca29c;

  font-size: 11px;
}

.stage.records-open .scroll-hint {
  opacity: 0;
  visibility: hidden;
}



/* =========================================================
   SPONSORS
   ========================================================= */

.sponsor-strip {
  position: fixed;
  z-index: 11000;

  left: 24px;
  right: 24px;

  bottom:
    calc(
      92px +
      env(safe-area-inset-bottom)
    );

  font-family: var(--mono);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform:
    translateY(8px);

  transition:
    opacity .35s ease,
    transform .35s ease,
    visibility .35s ease;
}


body.records-open .sponsor-strip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform:
    translateY(0);
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.sponsor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 12px;
}


.sponsor-label {
  color:
    rgba(205,212,204,.72);

  font-size: 14px;
  font-weight: 700;

  letter-spacing: .16em;

  white-space: nowrap;
}


/* ---------------------------------------------------------
   CONTROLS
   --------------------------------------------------------- */

.sponsor-controls {
  display: flex;
  align-items: center;

  gap: 8px;
}


.sponsor-arrow {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  padding: 0;

  background:
    rgba(18,21,18,.78);

  border:
    1px solid rgba(132,142,131,.58);

  color:
    rgba(220,225,219,.82);

  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;

  line-height: 1;

  cursor: pointer;

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .16s ease;
}


.sponsor-arrow:hover,
.sponsor-arrow:focus-visible {
  background:
    rgba(35,40,35,.94);

  border-color:
    rgba(181,191,180,.82);

  color: #ffffff;
}


.sponsor-arrow:active {
  transform:
    scale(.94);
}


.sponsor-arrow:focus-visible {
  outline:
    1px solid rgba(230,235,229,.88);

  outline-offset: 3px;
}


/* ---------------------------------------------------------
   REAL HORIZONTAL RAIL
   --------------------------------------------------------- */

.sponsor-marquee {
  position: relative;

  width: 100%;

  overflow-x: hidden;
  overflow-y: hidden;

  scrollbar-width: none;

  overscroll-behavior-x: contain;

  touch-action: pan-y;

  cursor: default;

  user-select: none;

  -webkit-user-select: none;

  mask-image:
    linear-gradient(
      90deg,
      transparent,
      #000 1.5%,
      #000 98.5%,
      transparent
    );
}


.sponsor-marquee::-webkit-scrollbar {
  display: none;
}


.sponsor-marquee.is-dragging {
  cursor: grabbing;
}


.sponsor-track {
  width: max-content;

  display: flex;
  align-items: center;

  gap: 64px;

  padding:
    2px
    18px
    10px;

  will-change: transform;
}


.sponsor-group {
  flex: 0 0 auto;

  display: flex;
  align-items: center;

  gap: 64px;
}


/* ---------------------------------------------------------
   SUPPORTER TILE
   --------------------------------------------------------- */

.sponsor-slot {
  flex: 0 0 144px;

  width: 144px;
  height: 144px;

  display: grid;
  place-items: center;

  overflow: hidden;

  background:
    rgba(18,21,18,.72);

  border:
    1px solid rgba(132,142,131,.58);

  box-shadow:
    0 12px 32px rgba(0,0,0,.18),
    inset 0 1px rgba(255,255,255,.025);

  color:
    rgba(190,198,189,.76);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: .10em;

  text-align: center;
  text-decoration: none;

  white-space: nowrap;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}


.sponsor-slot:hover,
.sponsor-slot:focus-visible {
  background:
    rgba(27,31,27,.92);

  border-color:
    rgba(174,185,173,.82);

  box-shadow:
    0 16px 38px rgba(0,0,0,.24),
    inset 0 1px rgba(255,255,255,.04);
}


.sponsor-slot:focus-visible {
  outline:
    1px solid rgba(230,235,229,.88);

  outline-offset: 3px;
}


/* ---------------------------------------------------------
   LOGOS — ORIGINAL COLORS
   --------------------------------------------------------- */

.sponsor-slot img {
  display: block;

  width: auto;
  height: auto;

  max-width: 82%;
  max-height: 82%;

  object-fit: contain;

  opacity: 1;

  pointer-events: none;

  transform:
    scale(1);

  transition:
    transform .18s ease;
}


.sponsor-slot:hover img,
.sponsor-slot:focus-visible img {
  transform:
    scale(1.035);
}


/* ---------------------------------------------------------
   RECORD MODAL HIDES RAIL
   --------------------------------------------------------- */

.record-overlay.open ~ .sponsor-strip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  position: fixed;
  z-index: 12000;

  left: 50%;
  bottom:
    calc(
      18px +
      env(safe-area-inset-bottom)
    );

  width:
    min(
      560px,
      calc(100vw - 32px)
    );

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transform:
    translateX(-50%)
    translateY(8px);

  text-align: center;

  font-family: var(--mono);

  pointer-events: none;
  user-select: none;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .35s ease,
    transform .35s ease,
    visibility .35s ease;
}


/* SHOW ONLY AFTER DRAWER OPENS */

body.records-open .site-footer {
  opacity: 1;
  visibility: visible;

  transform:
    translateX(-50%)
    translateY(0);
}


/* LINE 1 */

.site-footer-line {
  margin-bottom: 7px;

  color: rgba(225,230,222,.72);

  font-size: 9px;
  font-weight: 600;

  line-height: 1.2;

  letter-spacing: .08em;
}


/* LINE 2 */

.site-footer-product {
  margin-bottom: 5px;

  color: rgba(205,212,202,.55);

  font-size: 8px;
  font-weight: 700;

  line-height: 1.2;

  letter-spacing: .11em;
}


/* LINE 3 */

.site-footer-studio {
  color: rgba(195,202,192,.48);

  font-size: 8px;
  font-weight: 600;

  line-height: 1.2;

  letter-spacing: .06em;
}


.site-footer-studio a {
  color: rgba(232,237,226,.78);

  text-decoration: none;

  pointer-events: auto;

  cursor: pointer;

  transition:
    color .14s ease,
    text-shadow .14s ease;
}


.site-footer-studio a:hover,
.site-footer-studio a:focus-visible {
  color: #ffffff;

  text-shadow:
    0 0 9px rgba(230,235,222,.22);
}


/* =========================================================
   RECORD DOCUMENT
   ========================================================= */

.record-overlay {
  position: fixed;
  z-index: 20000;
  inset: 0;

  display: none;
  place-items: center;

  padding:
    max(12px,env(safe-area-inset-top))
    12px
    max(12px,env(safe-area-inset-bottom));

  background:
    rgba(1,2,1,.83);
}

.record-overlay.open {
  display: grid;
}

.record-sheet {
  position: relative;

  width:
    min(
      820px,
      90vw
    );

  max-height:
    min(
      680px,
      88dvh
    );

  overflow: auto;

  padding:
    48px 52px 54px;

  background:
    var(--paper);

  color:
    #181a18;

  border:
    1px solid #868278;

  box-shadow:
    0 45px 140px rgba(0,0,0,.72);
}

.sheet-kicker {
  color: #696b64;

  font-family: var(--mono);
  font-size: 7px;

  letter-spacing: .14em;
}

.sheet-id {
  margin-top: 11px;

  color: #6f716a;

  font-family: var(--mono);
  font-size: 7px;
}

.record-sheet h2 {
  max-width: 640px;

  margin:
    22px 0 13px;

  color:
    #171917;

  font-size:
    clamp(38px,5vw,58px);

  line-height: .94;
  letter-spacing: -.055em;
}

.sheet-subtitle {
  max-width: 600px;

  margin-bottom: 30px;

  color: #61645e;

  font-family: var(--mono);

  font-size: 9px;
  line-height: 1.55;
}

.sheet-copy {
  max-width: 610px;

  color: #343834;

  font-size: 15px;
  line-height: 1.68;
}

.sheet-hand {
  max-width: 610px;

  margin-top: 40px;
  padding-top: 18px;

  border-top:
    1px solid #aaa59a;

  color: #6f594b;

  font-family: var(--hand);
  font-size: 12px;

  /* transform:
    rotate(-1deg); */
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.close {
  position: absolute;

  right: 14px;
  top: 14px;

  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  background:
    transparent;

  border:
    1px solid #8e8a80;

  color:
    #4f534e;
}

.close:hover,
.close:focus-visible {
  background:
    #161816;

  color:
    #f0eee7;
}


/* =========================================================
   PHONE PORTRAIT LOCK
   ========================================================= */

.portrait-lock {
  display: none;
}


@media
(pointer:coarse)
and
(orientation:landscape)
and
(max-height:600px) {

  .portrait-lock {
    position: fixed;
    z-index: 50000;

    inset: 0;

    display: grid;
    place-items: center;

    padding: 28px;

    background: #010201;

    color: var(--text);

    font-family: var(--mono);

    text-align: center;
  }


  .portrait-lock-inner {
    display: flex;

    flex-direction: column;
    align-items: center;

    gap: 13px;
  }


  .portrait-lock strong {
    color: #b9ad88;

    font-size: 15px;

    letter-spacing: .22em;

    text-indent: .22em;
  }


  .portrait-lock span {
    color: #727972;

    font-size: 8px;

    letter-spacing: .12em;

    text-transform: uppercase;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media
(max-width:760px) {

  .top-support {
  font-size: 9px;
  font-weight: 800;
}

    .sponsor-label {
    font-size: 8px;
  }


  .sponsor-controls {
    display: none;
  }


  .sponsor-head {
    margin-bottom: 9px;
  }


  .sponsor-track {
    gap: 28px;

    padding:
      2px
      10px
      8px;
  }


  .sponsor-group {
    gap: 28px;
  }


  .sponsor-slot {
    flex: 0 0 66px;

    width: 66px;
    height: 66px;
  }


  .sponsor-slot img {
    max-width: 84%;
    max-height: 84%;
  }

  .registry-meta span:not(:first-child) {
    display: none;
  }

  .registry-name {
    font-size: 8px;
  }

  .collection-note {
    top:
      calc(
        16px +
        env(safe-area-inset-top)
      );

    left: 17px;

    width: 210px;
  }

  .collection-note span {
    display: none;
  }

  .cabinet {
    /* top: 56%; */

  top: calc(56% - 110px);

    width: 92vw;
    height: 39vh;

    min-height: 290px;
  }

  .cabinet-label {
    top: 18px;
    left: 17px;
  }

  .cabinet-no {
    top: 20px;
    right: 17px;
  }

  .drawer-frame {
    left: 6%;
    right: 6%;
    top: 22%;
    bottom: 11%;
  }

  .stage.drawer-open .drawer {
    transform:
      translateZ(185px)
      translateY(62px)
      rotateX(-3deg);
  }

  .drawer-handle {
    width: 118px;
    height: 34px;
  }

  /*
    Smaller white CTA card leaves enough room
    for 5 folders on a true circle around it.
  */
  .drawer-label {
    width: 164px;

    bottom: 17%;

    padding:
      11px 10px 9px;
  }

  .drawer-label small {
    font-size: 5.5px;
  }

  .drawer-label strong {
    font-size: 7.5px;
    line-height: 1.3;
  }

  .drawer-domain {
    width: 92%;
    height: 19px;

    margin-top: 6px;
  }

  .drawer-domain-hand {
    right: 3px;
    bottom: 2px;

    font-size: 8px;
  }

  /*
    Phone cards: compact enough for a real circle.
  */
  .record-card {
    width: 104px;
    height: 84px;

    padding:
      9px 8px;
  }

  .record-card::before {
    top: -12px;

    width: 55px;
    height: 12px;
  }

  .record-title {
    margin-top: 7px;

    font-size: 10px;
  }

  .record-subtitle {
    display: none;
  }

  .record-id {
    font-size: 4.4px;
  }

  .record-hand {
    top: 5px;
    right: 6px;

    max-width: 47px;

    font-size: 5.4px;
  }

  .record-code {
    left: 7px;
    bottom: 6px;

    font-size: 3.8px;
  }

  .record-stamp {
    right: 6px;
    bottom: 6px;

    font-size: 4px;
  }

  .scroll-hint {
    bottom:
      calc(
        20px +
        env(safe-area-inset-bottom)
      );
  }

  .record-sheet {
    width:
      calc(
        100vw -
        20px
      );

    max-height:
      calc(
        100dvh -
        24px -
        env(safe-area-inset-top) -
        env(safe-area-inset-bottom)
      );

    padding:
      44px 24px 46px;
  }

  .record-sheet h2 {
    font-size:
      clamp(
        34px,
        10vw,
        46px
      );
  }

  .manifest-paper {
    width:
      calc(
        100vw -
        20px
      );

    max-height:
      calc(
        100dvh -
        24px -
        env(safe-area-inset-top) -
        env(safe-area-inset-bottom)
      );

    padding:
      42px 24px 45px;
  }

  .manifest-paper h2 {
    font-size: 34px;
  }

  .intro-lamp {
    transform:
      translateX(-50%)
      scale(.88);

    transform-origin:
      top center;
  }

  .intro-light {
    top: 240px;

    width: 125vw;
  }




}


/* =========================================================
   RESPONSIVE SCENE — MEDIUM / COMPACT VIEWPORTS

   Content breakpoint, not device detection.
   Covers tablets and compact laptops with the same fluid rules.
   Large desktop keeps the baseline above.
   Phone keeps the dedicated <= 760px composition above.

   Uses:
   - svh  = stable small viewport height (browser chrome safe)
   - vmin = limiting viewport dimension
   - clamp() = fluid value with hard safe bounds
   ========================================================= */

@media
(min-width: 761px)
and
(max-width: 1600px) {

  .top-support {
    font-size: clamp(10px, 1.15vmin, 13px);
    font-weight: 800;
  }


  .collection-note {
    top: calc(16px + env(safe-area-inset-top));
    left: clamp(18px, 2.2vw, 30px);
    width: clamp(220px, 22vw, 255px);
  }

  .collection-note strong {
    font-size: clamp(10px, 1.2vmin, 12px);
  }

  .collection-note span {
    font-size: clamp(8px, 1vmin, 10px);
  }


  /*
    One cabinet formula for tablet + 13-inch/compact laptops.
    vmin keeps width proportional to whichever screen axis is tighter.
    svh keeps the composition inside the visible browser viewport.
  */
  .cabinet {
    top: clamp(
      270px,
      calc(56svh - 120px),
      500px
    );

    width: clamp(
      640px,
      88vmin,
      780px
    );

    height: clamp(
      340px,
      54svh,
      500px
    );
  }


  .cabinet-label {
    top: clamp(20px, 2.7vmin, 29px);
    left: clamp(20px, 2.7vmin, 29px);
  }


  .cabinet-no {
    top: clamp(22px, 2.9vmin, 31px);
    right: clamp(20px, 2.7vmin, 28px);
  }


  .drawer-frame {
    left: 7%;
    right: 7%;
    top: 22%;
    bottom: 12%;
  }


  .stage.drawer-open .drawer {
    transform:
      translateZ(
        clamp(
          170px,
          24svh,
          235px
        )
      )
      translateY(
        clamp(
          52px,
          8svh,
          78px
        )
      )
      rotateX(-3deg);
  }


  .drawer-handle {
    width: clamp(122px, 17vmin, 138px);
    height: clamp(32px, 4.2vmin, 36px);
  }


  .drawer-label {
    width: clamp(210px, 28vmin, 235px);
    bottom: 17%;

    padding:
      clamp(10px, 1.3vmin, 12px)
      clamp(11px, 1.5vmin, 14px)
      clamp(9px, 1.2vmin, 11px);
  }


  .drawer-label small {
    font-size: clamp(5.8px, .8vmin, 6.8px);
  }


  .drawer-label strong {
    font-size: clamp(8px, 1vmin, 9.5px);
  }


  .drawer-domain {
    height: clamp(18px, 2.3vmin, 22px);
    margin-top: 6px;
  }


  .drawer-domain-hand {
    font-size: clamp(8px, 1vmin, 9.5px);
  }


  /*
    Same folder size on every medium viewport.
    No tablet-vs-laptop browser detection.
  */
  .record-card {
    transform:
      translate(
        calc(-50% + var(--origin-x, 0px)),
        calc(-50% + var(--origin-y, 0px))
      )
      rotate(0deg)
      scale(.88);
  }


  .stage.records-open .record-card {
    transform:
      translate(
        calc(-50% + var(--card-x, 0px)),
        calc(-50% + var(--card-y, 0px))
      )
      rotate(var(--card-r, 0deg))
      scale(.88);
  }


  .sponsor-strip {
    left: clamp(18px, 2vw, 24px);
    right: clamp(18px, 2vw, 24px);

    bottom:
      calc(
        clamp(56px, 8.5svh, 82px) +
        env(safe-area-inset-bottom)
      );
  }


  .sponsor-label {
    font-size: clamp(9px, 1vmin, 11px);
  }


  .sponsor-head {
    margin-bottom: clamp(7px, 1svh, 10px);
  }


  .sponsor-arrow {
    width: clamp(28px, 3.8vmin, 32px);
    height: clamp(28px, 3.8vmin, 32px);
    font-size: clamp(12px, 1.5vmin, 14px);
  }


  .sponsor-track {
    gap: clamp(24px, 3.6vmin, 36px);

    padding:
      2px
      clamp(12px, 1.8vmin, 16px)
      8px;
  }


  .sponsor-group {
    gap: clamp(24px, 3.6vmin, 36px);
  }


  .sponsor-slot {
    flex:
      0 0
      clamp(76px, 12svh, 104px);

    width: clamp(76px, 12svh, 104px);
    height: clamp(76px, 12svh, 104px);
  }


  .sponsor-slot img {
    max-width: 82%;
    max-height: 82%;
  }


  .site-footer {
    bottom:
      calc(
        clamp(10px, 1.8svh, 18px) +
        env(safe-area-inset-bottom)
      );
  }


  .site-footer-line {
    font-size: clamp(7px, .95vmin, 9px);
  }


  .site-footer-product,
  .site-footer-studio {
    font-size: clamp(6.5px, .85vmin, 8px);
  }


  .record-sheet {
    width: min(720px, calc(100vw - 36px));

    max-height:
      calc(
        100svh -
        30px -
        env(safe-area-inset-top) -
        env(safe-area-inset-bottom)
      );

    padding:
      clamp(42px, 5vmin, 48px)
      clamp(38px, 5vmin, 52px)
      clamp(44px, 5vmin, 54px);
  }

}

