/* VANTA — Issue N°06. Magazine layout: vertical rail, page numbers, draggable filmstrip (v3 rebuild) */

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../assets/fonts/CabinetGrotesk-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-VariableItalic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #0b0b0c;
  --black-2: #121213;
  --ink: #e9e6df;
  --ink-2: #9d9a93;
  --ink-3: #6a6862;
  --line: rgba(233, 230, 223, 0.14);
  --display: "Cabinet Grotesk", "Arial Black", sans-serif;
  --body: "Satoshi", "Helvetica Neue", sans-serif;
  --rail: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  padding-left: var(--rail);
  background: var(--black);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--black); }

.micro {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Film grain, kept only on this site ---------- */
.grain {
  position: fixed;
  inset: -120px;
  z-index: 60;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-24px, 12px); }
  50% { transform: translate(18px, -22px); }
  75% { transform: translate(-14px, -10px); }
  100% { transform: translate(0, 0); }
}

/* ---------- Cover / preloader — the only opening left in the six ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.cover.is-gone { opacity: 0; visibility: hidden; }
.cover-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 13vw, 9rem);
  letter-spacing: 0.06em;
  line-height: 1;
  overflow: hidden;
}
.cover-word span {
  display: inline-block;
  transform: translateY(102%);
  animation: rise-letter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes rise-letter { to { transform: none; } }
.cover-rule {
  width: min(320px, 60vw);
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.cover-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: sweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes sweep { to { transform: scaleX(1); } }

/* ---------- Vertical rail: this site's navigation ---------- */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  z-index: 50;
  background: var(--black);
}
.rail-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.rail-nav a {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 0.3s ease;
}
.rail-nav a:hover, .rail-nav a.is-here { color: var(--ink); }
.rail-issue { writing-mode: vertical-rl; text-orientation: mixed; }

/* ---------- Pages ---------- */
.book {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 68px);
}

.spread { position: relative; padding: clamp(50px, 9vw, 130px) 0 0; }
.spread:first-of-type { padding-top: clamp(30px, 5vw, 60px); }

/* Oversized page number in the margin */
.folio {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: clamp(22px, 3.5vw, 44px);
}
.folio .n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.folio .t {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.folio .r { margin-left: auto; }

/* ---------- Opening spread ---------- */
.opening {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(22px, 4vw, 64px);
  align-items: end;
}
.opening h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 13vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.opening .stand {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--ink-2);
  max-width: 30ch;
  margin-bottom: 22px;
}
.opening .credits { display: flex; gap: 26px; flex-wrap: wrap; }
.opening figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.opening figcaption { padding-top: 10px; }

/* ---------- Editorial columns ---------- */
.editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 62px);
  align-items: start;
}
.editorial .drop {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.8vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
}
.editorial .body { color: var(--ink-2); }
.editorial .body p + p { margin-top: 1em; }
.editorial .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.editorial .pair img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- Draggable filmstrip (signature) ---------- */
.strip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.strip {
  display: flex;
  gap: clamp(12px, 1.8vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 16px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 230, 223, 0.24) transparent;
}
.strip::-webkit-scrollbar { height: 2px; }
.strip::-webkit-scrollbar-thumb { background: rgba(233, 230, 223, 0.24); }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging * { pointer-events: none; }

.frame {
  flex: 0 0 clamp(230px, 26vw, 360px);
  scroll-snap-align: start;
}
.frame .sprocket {
  display: flex;
  justify-content: space-between;
  padding: 5px 0 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  transition: filter 0.5s ease;
}
.frame:hover img { filter: grayscale(0) contrast(1.1); }
.frame .caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  align-items: baseline;
}
.frame .caption h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.frame .caption .mat { color: var(--ink-3); font-size: 12.5px; }

.drag-hint { display: flex; gap: 10px; align-items: center; }
.drag-hint i { display: block; width: 42px; height: 1px; background: var(--line); }

/* ---------- Full-bleed plate ---------- */
.plate { position: relative; }
.plate img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.plate .over {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: clamp(16px, 3vw, 38px);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(to top, rgba(11, 11, 12, 0.86), transparent);
}

/* ---------- Maison facts (static figures) ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.fact {
  background: var(--black);
  padding: clamp(18px, 2.6vw, 30px) clamp(14px, 2vw, 22px);
}
.fact b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.fact span { color: var(--ink-2); font-size: 14px; }

/* ---------- Press ---------- */
.press {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(26px, 4vw, 52px) 0;
}
.press blockquote {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 24ch;
}
.press cite {
  display: block;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 16px;
}
.press-list { display: grid; gap: 8px; }
.press-list span {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Back cover ---------- */
.back {
  padding: clamp(56px, 9vw, 128px) 0 clamp(26px, 4vw, 46px);
  text-align: center;
}
.back p {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.back .enter {
  display: inline-block;
  margin-top: 12px;
  border: 1px solid var(--line);
  padding: 15px 32px;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: background 0.35s ease, color 0.35s ease;
}
.back .enter:hover { background: var(--ink); color: var(--black); }

.imprint {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 18px 0 32px;
}
.imprint nav { display: flex; gap: 20px; flex-wrap: wrap; }
.imprint a:hover { color: var(--ink); }

/* ---------- Entrance ---------- */
.set { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.set.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .set { opacity: 1; transform: none; transition: none; }
  .grain { animation: none; }
  .cover-word span { transform: none; animation: none; }
  .cover-rule::after { animation: none; transform: scaleX(1); }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .opening { grid-template-columns: 1fr; align-items: start; }
  .editorial { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .press { grid-template-columns: 1fr; }
  .press-list { grid-auto-flow: column; justify-content: start; gap: 18px; }
}

@media (max-width: 720px) {
  :root { --rail: 0px; }
  .rail {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px clamp(16px, 4vw, 24px);
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 16px;
    overflow-x: auto;
  }
  .rail-brand, .rail-nav, .rail-nav a, .rail-issue { writing-mode: horizontal-tb; }
  .rail-nav { flex-direction: row; gap: 16px; }
  .rail-brand { font-size: 15px; letter-spacing: 0.24em; }
  .rail-issue { display: none; }
  body { padding-left: 0; }
  .facts { grid-template-columns: 1fr; }
  .plate img { aspect-ratio: 4 / 3; }
  .editorial .pair { grid-template-columns: 1fr; }
}
