/* =============================================================
   THE ENTRANCE — haute horology schematic
   Matte black ground, brushed gold alignment, strict editorial grid.
   Loaded only by index.html; the atlas pages are untouched.
   ============================================================= */
:root {
  --x-gold: #D4AF37;
  --x-gold-dim: #8A7328;
  --x-ink: #050505;
}

body.page-index { background: var(--x-ink); }
body.x-live { overflow-x: hidden; }

.x-topbar {
  background: linear-gradient(to bottom, rgba(5,5,5,0.96), rgba(5,5,5,0.72));
  border-bottom-color: rgba(212,175,55,0.14);
}

/* ── the canvas ─────────────────────────────────────────────── */
.x-stage {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  overflow: hidden;              /* the canvas can never widen the layout */
  transition: opacity 200ms linear;
}
.x-stage canvas { display: block; width: 100%; height: 100%; }

.x-vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, rgba(5,5,5,0.72) 100%),
    linear-gradient(to bottom, rgba(5,5,5,0.85) 0%, transparent 22%,
                    transparent 74%, rgba(5,5,5,0.92) 100%);
  transition: opacity 200ms linear;
}

/* ── the acts ───────────────────────────────────────────────── */
.x-scroll { position: relative; z-index: 3; }

.x-act {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 0 clamp(20px, 6vw, 110px);
  position: relative;
}
.x-act--end { min-height: 108svh; }

.x-inner { max-width: 620px; }
.x-inner--right { margin-left: auto; text-align: right; }
.x-inner--center { margin: 0 auto; text-align: center; max-width: 720px; }

/* ── engraved type ──────────────────────────────────────────── */
.x-mask { display: block; overflow: hidden; }
.x-mask > span { display: block; will-change: transform; }

.x-eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--label); font-weight: 600; font-size: 0.58rem;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--x-gold); margin-bottom: 26px;
}
.x-inner--right .x-eyebrow { justify-content: flex-end; flex-direction: row-reverse; }
.x-eyebrow--center { justify-content: center; }
.x-rule {
  display: block; width: clamp(40px, 7vw, 92px); height: 1px;
  background: linear-gradient(to right, var(--x-gold), transparent);
  transform-origin: left center;
}
.x-inner--right .x-rule { background: linear-gradient(to left, var(--x-gold), transparent); }
.x-dot { opacity: 0.5; margin: 0 2px; }

.x-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.7rem, 8.4vw, 7rem); line-height: 0.94;
  letter-spacing: -0.026em; color: #F4F1EA;
}
.x-h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 5.2vw, 3.9rem); line-height: 1.04;
  letter-spacing: -0.018em; color: #F4F1EA;
}
.x-gold { color: var(--x-gold); font-style: italic; }
.x-h2 em { font-style: italic; }

.x-sub {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.1rem, 2.3vw, 1.6rem); color: #CFC9BC;
  margin-top: 24px;
}
.x-sub em { color: var(--x-gold); font-style: italic; }

/* Scoped deliberately. This was once called .x-body, which collided with the
   class on <body> itself and capped the whole document at 46ch. Never again. */
.x-inner .x-copy {
  font-family: var(--classic); font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.72; color: #C6C0B4; max-width: 46ch; margin-top: 22px;
}
.x-inner--right .x-copy { margin-left: auto; }
.x-copy--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ── metrics, strict grid ───────────────────────────────────── */
.x-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: 44px;
  background: rgba(212,175,55,0.16);
  border: 1px solid rgba(212,175,55,0.16);
}
.x-metrics > div {
  background: var(--x-ink); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.x-metrics dt {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: var(--x-gold); line-height: 1; font-variant-numeric: tabular-nums;
}
.x-metrics dd {
  font-family: var(--label); font-weight: 500; font-size: 0.5rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: #7C7568;
}

.x-list { list-style: none; margin-top: 34px; }
.x-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; padding: 11px 0;
  border-bottom: 1px solid rgba(212,175,55,0.14);
}
.x-list span {
  font-family: var(--label); font-weight: 500; font-size: 0.62rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: #9A9284;
}
.x-list b {
  font-family: var(--serif); font-weight: 300; font-size: 1.25rem;
  color: var(--x-gold); font-variant-numeric: tabular-nums;
}

.x-cap {
  font-family: var(--label); font-weight: 500; font-size: 0.6rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: #7C7568;
  margin-top: 14px; padding-left: 18px; position: relative;
}
.x-cap::before {
  content: ''; position: absolute; left: 0; top: 0.52em;
  width: 9px; height: 1px; background: var(--x-gold);
}
.x-cap .x-gold { font-style: normal; }

.x-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.x-cta .btn { border-color: rgba(212,175,55,0.34); }
.x-cta .btn:hover { border-color: var(--x-gold); color: var(--x-gold); }
.x-cta .btn-primary { background: var(--x-gold); border-color: var(--x-gold); color: #12100A; }
.x-cta .btn-primary:hover { background: #F4F1EA; border-color: #F4F1EA; color: #12100A; }

/* ── the handoff into the atlas ─────────────────────────────── */
.x-handoff {
  position: relative; z-index: 4;
  background: var(--ink);
  border-top: 1px solid rgba(212,175,55,0.16);
  box-shadow: 0 -40px 90px rgba(0,0,0,0.9);
}

/* ── plain mode ─────────────────────────────────────────────── */
body.x-plain .x-stage,
body.x-plain .x-vignette { display: none; }
body.x-plain .x-act { min-height: auto; padding-top: 90px; padding-bottom: 90px; }
body.x-plain .x-mask > span { transform: none !important; opacity: 1 !important; }

/* ── small screens ──────────────────────────────────────────── */
@media (max-width: 820px) {
  /* Full viewport height and centred, the same as desktop. min-height (not
     height) means a long act simply grows instead of clipping. The top pad
     clears the fixed bar so the centring reads against the visible area. */
  /* Centred in the area below the fixed bar: the top padding exceeds the
     bottom by exactly the bar height. */
  .x-act {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: calc(var(--bar) + 28px) 20px 28px;
  }
  .x-act--end { min-height: 100svh; }
  .x-inner, .x-inner--right, .x-inner--center { max-width: none; text-align: left; margin: 0; }
  .x-inner--right .x-eyebrow { justify-content: flex-start; flex-direction: row; }
  .x-inner--right .x-rule { background: linear-gradient(to right, var(--x-gold), transparent); }
  .x-inner--right .x-copy { margin-left: 0; }
  .x-copy--center { text-align: left; margin-left: 0; }
  .x-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-cta { justify-content: flex-start; }
  .x-cta .btn { flex: 1 1 100%; text-align: center; }
  .x-vignette {
    background: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.55) 30%,
                rgba(5,5,5,0.6) 70%, rgba(5,5,5,0.95) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .x-stage, .x-vignette { display: none; }
  .x-act { min-height: auto; padding: 80px 20px; }
}

/* =============================================================
   MOBILE ALIGNMENT
   The eyebrow's rule sits inline with its label, which on a narrow
   column pushed the label ~50px right of the headline beneath it.
   Nothing lined up on the left edge. On mobile the rule moves to
   its own line so every element starts flush.
   ============================================================= */
@media (max-width: 820px) {
  .x-eyebrow,
  .x-inner--right .x-eyebrow,
  .x-eyebrow--center {
    display: block;
    margin-bottom: 20px;
  }
  .x-rule,
  .x-inner--right .x-rule {
    width: 46px; height: 1px; display: block; margin: 0 0 11px;
    background: linear-gradient(to right, var(--x-gold), transparent);
  }
  .x-cap { padding-left: 16px; }
  .x-list li { padding: 13px 0; gap: 14px; }
  .x-list span { font-size: 0.58rem; letter-spacing: 0.18em; }
  .x-metrics > div { padding: 15px 13px; }
  .x-title { font-size: clamp(2.4rem, 12.5vw, 3.6rem); }
  .x-sub { font-size: 1.05rem; margin-top: 18px; }
}
