/* Argon v2 — app.css (Task A: global shell, views, route panel, boot, CSS fallback deck) */

html {
  overflow-x: clip;
}

html[data-motion="reduce"] {
  scroll-behavior: auto !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed !important;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  clip-path: none;
  white-space: normal;
  z-index: 500;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 18px;
  padding: 8px 12px;
}

.sr-builds {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.views {
  position: relative;
  width: 100%;
  min-height: 100dvh;
}

.view[hidden] {
  display: none !important;
}

.builds-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ground);
}

html[data-route="builds"] body {
  overflow: hidden;
  overscroll-behavior: none;
}

/* 3.6 Route transition panel */
.route-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  transform: translateY(100%);
  visibility: hidden;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.route-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 10vw, 180px);
  line-height: .85;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #FFF;
  opacity: 0;
  text-align: center;
  margin: 0;
}

@media (max-width: 1099.98px) {
  .route-title {
    font-size: clamp(48px, 14vw, 72px);
  }
}

/* 3.7 Boot curtain */
.boot {
  position: fixed;
  inset: 0;
  z-index: 400;
}

html[data-boot="done"] .boot {
  display: none !important;
}

.boot-top,
.boot-bottom {
  position: absolute;
  inset: 0;
  background: var(--dark);
}

.boot-top {
  clip-path: inset(0 0 50% 0);
}

.boot-bottom {
  clip-path: inset(50% 0 0 0);
}

.boot-stage {
  position: absolute;
  inset: 0;
}

.boot-mark {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(72px, 11vw, 168px);
  line-height: .85;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0;
}

.boot-sub {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(36px, 5.5vw, 84px) + 18px);
  transform: translateX(-50%);
  display: flex;
  gap: 48px;
  white-space: nowrap;
}

.boot-sub .t-mono {
  color: rgba(251, 250, 246, .6);
}

.boot-hairline {
  display: block;
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(36px, 5.5vw, 84px) + 44px);
  margin-left: -60px;
  width: 120px;
  height: 1px;
  background: var(--paper);
}

.boot-progress {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: rgba(251, 250, 246, .6);
  margin: 0;
}

@media (max-width: 1099.98px) {
  .boot-progress {
    right: 16px;
    bottom: 16px;
  }
}

/* 0.12 CSS fallback deck */
html[data-deck="webgl"] .deck-css {
  display: none !important;
}

.deck-css {
  position: absolute;
  inset: 0;
}

.deck-css-card {
  --dx: 0px;
  --dy: 0px;
  --s: 1;
  position: absolute;
  width: 62.222vh;
  height: 35vh;
  left: calc(41.667vw + var(--dx));
  top: calc(48.889vh + var(--dy));
  transform: translate(-50%, -50%) rotate(-8deg) scale(var(--s));
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.deck-css-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deck-css-card[data-offset="0"]  { --dx: 0px;       --dy: 0px;       --s: 1;   z-index: 9; box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.06); }
.deck-css-card[data-offset="1"]  { --dx: 4.444vh;   --dy: -6.444vh;  --s: .96; z-index: 5; }
.deck-css-card[data-offset="2"]  { --dx: 8.889vh;   --dy: -12.889vh; --s: .92; z-index: 3; }
.deck-css-card[data-offset="3"]  { --dx: 13.333vh;  --dy: -19.333vh; --s: .88; z-index: 1; }
.deck-css-card[data-offset="-1"] { --dx: -3.778vh;  --dy: 6.444vh;   --s: .96; z-index: 6; }
.deck-css-card[data-offset="-2"] { --dx: -7.556vh;  --dy: 12.889vh;  --s: .92; z-index: 4; }
.deck-css-card[data-offset="-3"] { --dx: -11.333vh; --dy: 19.333vh;  --s: .88; z-index: 2; }
.deck-css-card[data-offset="-4"] { --dx: -15.111vh; --dy: 25.778vh;  --s: .84; z-index: 1; }

@media (max-aspect-ratio: 4/5) {
  .deck-css-card[data-offset="3"],
  .deck-css-card[data-offset="-3"],
  .deck-css-card[data-offset="-4"] {
    display: none;
  }

  .deck-css-card {
    width: 76.923vw;
    height: auto;
    aspect-ratio: 16 / 9;
    left: calc(50vw + var(--dx));
    top: calc(44.313vh + var(--dy));
    transform: translate(-50%, -50%) rotate(-4deg);
    outline: 1px solid var(--line);
    outline-offset: -1px;
    border: 0;
    box-shadow: 0 14px 34px rgba(18,17,16,.16), 0 2px 6px rgba(18,17,16,.06);
  }

  .deck-css-card:not([data-offset="0"])::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(232, 230, 225, .35);
    pointer-events: none;
  }

  .deck-css-card[data-offset="0"]  { --dx: 0px;      --dy: 0px;       z-index: 5; box-shadow: 0 22px 48px rgba(18,17,16,.22), 0 2px 6px rgba(18,17,16,.08); }
  .deck-css-card[data-offset="1"]  { --dx: 3.590vw;  --dy: -6.635vh;  z-index: 2; }
  .deck-css-card[data-offset="2"]  { --dx: 7.179vw;  --dy: -13.270vh; z-index: 1; }
  .deck-css-card[data-offset="-1"] { --dx: -3.590vw; --dy: 6.635vh;   z-index: 2; }
  .deck-css-card[data-offset="-2"] { --dx: -7.179vw; --dy: 13.270vh;  z-index: 1; }
}
