:root {
  --ink: #141414;
  --ink-2: #1b1a19;
  --shell: #2a2927;
  --shell-hi: #3a3835;
  --ivory: #f4f1ea;
  --ivory-2: #e9e4d9;
  --muted: #b9b4aa;
  --orange: #e4572e;
  --orange-deep: #b23f1c;
  --rule-dark: rgba(244, 241, 234, 0.14);
  --rule-light: rgba(20, 20, 20, 0.14);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--shell-hi) var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .disk__shutter, .slot .disk { transition: none; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  caret-color: var(--orange);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--orange); color: var(--ink); }

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:focus-visible,
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--orange); color: var(--ink); padding: 0.6rem 1rem; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header ------------------------------------------------------------- */
.top {
  max-width: var(--max); margin: 0 auto; padding: 1.5rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand__mark { width: 2.25rem; height: 2.25rem; margin: -0.3rem; }
.brand__mark path { fill: var(--ivory); }
.brand__mark circle { fill: var(--orange); }
.brand__word { font-weight: 800; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -0.01em; }
.top__nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: 0.95rem; }
.top__nav a { text-decoration: none; color: var(--muted); padding: 0.75rem 0; }
.top__nav a:hover { color: var(--ivory); text-decoration: underline; }

/* Hero --------------------------------------------------------------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 7vh, 5rem) var(--gutter) clamp(4rem, 10vh, 7rem);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 4.5vw, 4.5rem); align-items: end;
}
.hero__title {
  font-weight: 800; font-stretch: 116%; line-height: 0.98; letter-spacing: -0.035em;
  font-size: clamp(2.4rem, 4.8vw, 4.6rem);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { margin-top: 1.75rem; max-width: 34rem; color: var(--muted); font-size: 1.1875rem; }
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero__note { color: var(--muted); font-size: 0.95rem; max-width: 22rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.65rem; min-height: 3.25rem; padding: 0 1.4rem 0 1.5rem;
  background: var(--orange); color: var(--ink); text-decoration: none; font-weight: 700; font-stretch: 108%;
  font-size: 1.0625rem; border-radius: 3px;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7), inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.btn:hover { background: #ec6a42; }
.btn:active { transform: translateY(1px); }
.btn__arrow { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform 0.25s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* The drive: bay clips the disk at the slot line ------------------------ */
.hero__drive { width: min(25rem, 100%); justify-self: end; }
.drive__bay { overflow: hidden; padding: 2rem 1.75rem 0; margin: -2rem -1.75rem 0; }
.drive__bezel {
  position: relative; height: 3.25rem; border-radius: 4px;
  background: linear-gradient(#232220, #191817);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 30px -18px rgba(0, 0, 0, 0.9);
}
.drive__slot {
  position: absolute; left: 7%; right: 7%; top: 0.55rem; height: 0.45rem; border-radius: 1px;
  background: #050505; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.06);
}
.drive__light {
  position: absolute; left: 7%; bottom: 0.85rem; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: #4a2417; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
  transition: background-color 0.15s, box-shadow 0.15s;
}
.drive__light.is-on { background: var(--orange); box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.18), 0 0 10px rgba(228, 87, 46, 0.6); }
.drive__eject {
  position: absolute; right: 7%; bottom: 0.7rem; width: 2.4rem; height: 0.85rem; border-radius: 2px;
  background: linear-gradient(#2c2b29, #22211f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Diskette --------------------------------------------------------------- */
.disk {
  position: relative; display: block; aspect-ratio: 90 / 94; text-decoration: none; color: var(--ink);
  container-type: inline-size;
  --open: 0;
}
.disk__shell {
  position: absolute; inset: 0; border-radius: 3.5% / 3.3%;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    linear-gradient(160deg, var(--shell-hi), var(--shell) 45%, #222120);
  clip-path: polygon(0 0, 93% 0, 100% 6.5%, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.disk::after {
  content: ""; position: absolute; inset: 4% 3% -3%; z-index: -1; border-radius: 6%;
  background: rgba(0, 0, 0, 0.55); filter: blur(18px); transform: translateY(6%);
}
.disk__media {
  position: absolute; top: 4%; left: 40%; width: 20%; height: 26%; border-radius: 2px;
  background: radial-gradient(circle at 50% 120%, #f06a3f, var(--orange) 40%, #a63a18 100%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.disk__shutter {
  position: absolute; top: 0; left: 18%; width: 50%; height: 35%;
  background: linear-gradient(90deg, #8f8b84, #c9c5bd 18%, #b3afa7 50%, #cfcbc3 82%, #8f8b84);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  transform: translateX(calc(var(--open) * 40%));
  transition: transform 0.45s var(--ease-out);
  /* the window is a real hole, so the plastic (closed) or the orange media (open) shows through */
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 4% 11%, 4% 85%, 44% 85%, 44% 11%, 4% 11%, 0 0);
}
.disk__window {
  position: absolute; top: 11%; left: 4%; width: 40%; height: 74%; border-radius: 1px;
  outline: 1px solid rgba(0, 0, 0, 0.35); outline-offset: 0;
}
.disk__hole { position: absolute; bottom: 4%; width: 7%; height: 6.5%; background: #0b0b0b; border-radius: 1px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9); }
.disk__hole--hd { left: 4%; }
.disk__hole--wp { right: 4%; }
.disk__hole--wp::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: #3a3835; }

.disk__label {
  position: absolute; left: 12%; right: 12%; top: 42%; bottom: 3.5%;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 2px 2px 0 0;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(1.45em - 1px), var(--rule-light) calc(1.45em - 1px) 1.45em),
    var(--ivory);
  background-position: 0 0.35em;
  font-size: clamp(0.7rem, 4.2cqi, 1rem);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.label__band {
  display: flex; justify-content: space-between; padding: 0.45em 0.9em; background: var(--orange); color: var(--ink);
  font-family: var(--mono); font-weight: 600; font-size: 0.82em; letter-spacing: 0.06em; text-transform: uppercase;
}
.label__name {
  padding: 0.3em 0.75em 0; font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em;
  font-size: 2.35em; line-height: 1.1;
}
.label__line { padding: 0.15em 0.9em 0; font-size: 1em; line-height: 1.45; }
.label__data {
  margin-top: auto; display: flex; justify-content: space-between; gap: 0.5em; padding: 0.35em 0.9em 0.5em;
  font-family: var(--mono); font-size: max(0.75rem, 0.78em); letter-spacing: 0.04em; text-transform: uppercase; color: #4b4741;
}


/* Interaction: the shutter opens on hover or focus and shows the orange media */
.disk:hover,
.disk:focus-visible,
.disk.is-open { --open: 1; }
.disk:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; border-radius: 6px; }
.disk--hero:focus-visible { outline: none; }
/* the drive bay clips outside rings, so the hero's ring is drawn inside, above the label */
.disk--hero:focus-visible::before {
  content: ""; position: absolute; inset: 4px; z-index: 3; pointer-events: none;
  outline: 2px solid var(--orange); border-radius: 4px;
}

/* Apps -------------------------------------------------------------------- */
.apps { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 10vw, 8rem) var(--gutter); border-top: 1px solid var(--rule-dark); }
.apps__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; }
.apps__head h2,
.rules h2 { font-weight: 800; font-stretch: 116%; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.03em; }
.apps__head p { color: var(--muted); max-width: 30rem; }
.apps__box {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15.5rem, 100%), 1fr)); gap: clamp(1.5rem, 4vw, 3rem);
}
.slot .disk { transition: transform 0.35s var(--ease-out); }
.slot .disk:hover,
.slot .disk:focus-visible { transform: translateY(-6px); }
.slot--empty { position: relative; aspect-ratio: 90 / 94; display: grid; place-items: center; }
.empty__outline {
  position: absolute; inset: 0; border: 1.5px dashed rgba(244, 241, 234, 0.28); border-radius: 3.5% / 3.3%;
  clip-path: polygon(0 0, 93% 0, 100% 6.5%, 100% 100%, 0 100%);
}
.empty__text { position: relative; text-align: center; color: var(--muted); font-size: 0.95rem; display: grid; gap: 0.15rem; }
.empty__text strong { color: var(--ivory); font-weight: 700; font-stretch: 116%; font-size: 1.15rem; }

/* House rules: one big lined label ----------------------------------------- */
.rules { padding: 0 var(--gutter) clamp(4rem, 10vw, 8rem); }
.rules__sheet {
  max-width: var(--max); margin: 0 auto; color: var(--ink); border-radius: 4px; overflow: hidden;
  background: var(--ivory);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4.5rem);
  border-top: clamp(0.75rem, 1.6vw, 1.25rem) solid var(--orange);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.rules__list { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem); }
.rules__list li { padding-top: 1rem; border-top: 2px solid var(--ink); }
.rules__list h3 { font-weight: 800; font-stretch: 110%; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; }
.rules__list p { margin-top: 0.75rem; color: #3d3a35; max-width: 34ch; }

/* Footer ------------------------------------------------------------------ */
.foot { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 2.5rem; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-dark); color: var(--muted); font-size: 0.95rem; }
.foot__row a { color: var(--ivory); }
.foot__row a:hover { color: var(--orange); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__drive { justify-self: center; width: min(21rem, 86%); margin-top: 1rem; }
  .apps__head { grid-template-columns: 1fr; }
  .rules__list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .top__nav a[href="#apps"] { display: none; }
  .hero__lede { font-size: 1.0625rem; }
  .slot--empty { aspect-ratio: auto; min-height: 8rem; }
}
@media (max-width: 360px) {
  .top { gap: 1rem; }
  .top__nav { gap: 0.9rem; font-size: 0.9rem; }
}

/* Entrance: content is visible by default; JS hides it only when it will animate it */
.js.motion .disk--hero { transform: translateY(calc(100% + 2.5rem)); }
