/* ============================================================
   VEPRO — vepro.uk

   A maison, not a dashboard. Four rules hold the whole page up:

     1. Black is the material, not the background. Nothing is
        tinted; every grey is r = g = b.
     2. Nothing is rounded. Couture is cut, not moulded.
     3. Type is silver, never flat white — light rakes across it.
     4. Emptiness is the luxury. Space is spent, not saved.
   ============================================================ */

:root {
  --void:   #000000;
  --pit:    #050505;
  --slab:   #0a0a0a;
  --edge:   #121212;

  /* Hairlines. On black these read as drawn lines, not borders. */
  --rule:   rgba(255,255,255,0.08);
  --rule-2: rgba(255,255,255,0.17);
  --rule-3: rgba(255,255,255,0.36);
  --lip:    rgba(255,255,255,0.13);

  --ink:    #f6f6f6;
  --ink-2:  #b0b0b0;
  --ink-3:  #838383;
  --ink-4:  #767676;   /* 4.6:1 on black — the quietest text still allowed to be read */
  --ink-5:  #4a4a4a;   /* decoration only: dots, dividers, never words */

  --serif:  "Bodoni Moda", "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans:   "Jost", "Futura", "Century Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease:   cubic-bezier(0.19, 1, 0.22, 1);
  --swift:  cubic-bezier(0.32, 0.72, 0, 1);
  --wide:   1160px;
  --gut:    clamp(22px, 5vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The UA rule behind the `hidden` attribute is `display: none`, which any
   author `display` outranks — so `.btn`, `.gate-or` and `.gate-field` all
   kept rendering after a script set `hidden`. Restated here with weight
   enough to win, as app.css already does. */
[hidden] { display: none !important; }


html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.012em;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--ink); }

::selection { background: rgba(255,255,255,0.22); color: #fff; }

:focus-visible {
  outline: 1px solid var(--rule-3);
  outline-offset: 5px;
}

/* ------------------------------------------------------------
   Atmosphere

   Three fixed layers, all inert: the cannage lattice lifted from
   the boutique glass, a raking light from above, and grain so the
   black has a surface instead of being an absence.
   ------------------------------------------------------------ */

.cannage,
.vignette,
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cannage {
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(45deg,  transparent 0 54px, rgba(255,255,255,0.055) 54px 55px),
    repeating-linear-gradient(-45deg, transparent 0 54px, rgba(255,255,255,0.055) 54px 55px);
  -webkit-mask-image: radial-gradient(72% 52% at 50% 24%, #000 0%, transparent 78%);
  mask-image: radial-gradient(72% 52% at 50% 24%, #000 0%, transparent 78%);
}

.vignette {
  background: radial-gradient(96% 62% at 50% -6%, rgba(255,255,255,0.075), transparent 62%);
}

.grain {
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* `clip` rather than `hidden`: it contains the atmospheres without
   turning main into a scroll container, which would kill the sticky heading. */
main { position: relative; z-index: 1; overflow-x: clip; }
.foot { position: relative; z-index: 1; }

/* ------------------------------------------------------------
   Shared parts
   ------------------------------------------------------------ */

/* The house voice for anything that labels rather than speaks. */
.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  text-indent: 0.46em;
  color: var(--ink-3);
}

/* Light rakes down the face of display type instead of lying flat on it. */
.silver {
  background: linear-gradient(177deg, #ffffff 0%, #f6f6f6 34%, #dcdcdc 72%, #c6c6c6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

kbd {
  display: inline-block;
  min-width: 21px;
  padding: 2px 6px;
  margin: 0 2px;
  border: 1px solid var(--rule-2);
  background: linear-gradient(180deg, var(--edge), var(--slab));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--ink-3);
}

/* The rule-and-dot from the logotype, promoted to the page's punctuation. */
.seam {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.seam i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rule-2)); }
.seam i:last-of-type { background: linear-gradient(90deg, var(--rule-2), transparent); }
.seam b { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

/* Cut, not moulded: every control is a rectangle. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding: 0 34px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.55s var(--ease), border-color 0.55s var(--ease),
              color 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.btn-solid {
  background: #f4f4f4;
  color: #000;
  box-shadow: 0 0 0 rgba(255,255,255,0);
}
.btn-solid:hover { background: #ffffff; box-shadow: 0 0 46px -8px rgba(255,255,255,0.42); }

.btn-line { border-color: var(--rule-2); color: var(--ink-2); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }

/* ------------------------------------------------------------
   Dock
   ------------------------------------------------------------ */

.dock {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
}
.dock.is-stuck {
  background: rgba(0,0,0,0.72);
  border-bottom-color: var(--rule);
  backdrop-filter: saturate(1.3) blur(26px);
  -webkit-backdrop-filter: saturate(1.3) blur(26px);
}

.dock-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 22px var(--gut);
}

.dock-name {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink);
}

.dock-domain {
  margin-right: auto;
  padding-left: 20px;
  border-left: 1px solid var(--rule-2);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.dock-in {
  padding: 11px 24px;
  border: 1px solid var(--rule);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.dock-in:hover { color: var(--ink); border-color: var(--ink); }

/* ------------------------------------------------------------
   Hero

   The wordmark is given the room it would get on a boutique
   facade: light above it, nothing beside it.
   ------------------------------------------------------------ */

.hero {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(60px, 11vw, 150px) var(--gut) clamp(80px, 10vw, 130px);
}

.hero-bloom {
  position: absolute;
  top: -10%;
  left: 50%;
  width: min(1000px, 100%);
  height: 720px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(44% 46% at 50% 40%, rgba(255,255,255,0.11), rgba(255,255,255,0.03) 46%, transparent 74%);
}

.hero-copy { position: relative; text-align: center; }

/* The name is set, not drawn. Type is the only mark this page carries. */
.lockup { margin: clamp(34px, 4.5vw, 56px) auto 0; }

.lockup-name {
  font-family: var(--serif);
  font-size: clamp(50px, 10.5vw, 128px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}

.lockup .seam {
  max-width: min(340px, 62%);
  margin: clamp(14px, 1.8vw, 22px) auto;
  padding: 0;
  gap: 14px;
}

.lockup-expand {
  font-size: clamp(8.5px, 1vw, 10.5px);
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.claim {
  max-width: 20ch;
  margin: clamp(44px, 5.5vw, 70px) auto 0;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 62px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.lede {
  max-width: 54ch;
  margin: clamp(26px, 3vw, 38px) auto 0;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.95;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(38px, 4.5vw, 56px);
}

.auth-note {
  max-width: 44ch;
  margin: 30px auto 0;
  padding: 14px 20px;
  border: 1px solid var(--rule);
  border-left: 1px solid var(--rule-3);
  background: var(--slab);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

/* ---- the vitrine ---- */

.stage {
  position: relative;
  margin: clamp(64px, 9vw, 118px) auto 0;
  max-width: 1020px;
}

.stage-bloom {
  position: absolute;
  inset: -18% 0 -14%;
  pointer-events: none;
  background: radial-gradient(52% 56% at 50% 44%, rgba(255,255,255,0.1), transparent 72%);
}

/* Boutique glass: a hairline frame, a lit top edge, and black behind it. */
.slab {
  position: relative;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  border: 1px solid var(--rule-2);
  background: linear-gradient(180deg, #151515 0%, #060606 72%);
  box-shadow:
    inset 0 1px 0 var(--lip),
    0 2px 6px rgba(0,0,0,0.9),
    0 70px 130px -60px #000,
    0 0 150px -30px rgba(255,255,255,0.12);
  overflow: hidden;
  font-size: 12px;
  isolation: isolate;
}

/* One pass of light across the glass, once, after it has settled. */
.sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(104deg, transparent 38%, rgba(255,255,255,0.075) 48%, rgba(255,255,255,0.02) 56%, transparent 66%);
  transform: translateX(-120%);
  animation: sweep 2.2s var(--swift) 1.7s 1 both;
}
@keyframes sweep { to { transform: translateX(120%); } }

.stage-floor {
  height: 80px;
  margin: 0 4%;
  pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0%, rgba(255,255,255,0.13), transparent 74%);
}

.stage-cap {
  margin-top: -10px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.44em;
  text-indent: 0.44em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---- vitrine: rail ---- */

.d-rail {
  border-right: 1px solid var(--rule);
  background: rgba(0,0,0,0.5);
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
}

.d-rail-top { display: flex; align-items: center; gap: 11px; padding: 0 7px 20px; }
.d-rail-name { font-size: 10px; font-weight: 400; letter-spacing: 0.4em; color: var(--ink-2); }

.d-rail-label {
  padding: 0 7px 12px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.d-envs { display: flex; flex-direction: column; }

.d-env {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 8px;
  border: none;
  border-top: 1px solid var(--rule);
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  transition: color 0.45s var(--ease), background 0.45s var(--ease);
}
.d-env:last-child { border-bottom: 1px solid var(--rule); }
.d-env:hover { color: var(--ink-2); background: rgba(255,255,255,0.03); }
.d-env.is-on { color: var(--ink); background: rgba(255,255,255,0.05); }
.d-env.is-on::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: currentColor;
}

.d-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--rule-2);
  background: linear-gradient(180deg, var(--edge), var(--slab));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.d-env-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.d-rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.d-rail-foot kbd { min-width: 15px; font-size: 8.5px; padding: 1px 4px; letter-spacing: 0.04em; }
.d-keys { display: flex; gap: 4px; }

/* ---- vitrine: canvas ---- */

.d-canvas { min-width: 0; padding: 20px 22px 24px; }

.d-head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; }

.d-mono {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule-2);
  background: linear-gradient(180deg, var(--edge), var(--slab));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.d-head-body { min-width: 0; flex: 1; }
.d-title {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.d-summary {
  display: block;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-status {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-5);
}
.d-status i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

.d-board { display: flex; flex-direction: column; gap: 14px; }
.d-board.is-turning { animation: turn 0.55s var(--swift); }
@keyframes turn {
  0%   { opacity: 1; transform: none; }
  34%  { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}

.d-plate { border-top: 1px solid var(--rule); padding-top: 13px; }

.d-plate-head { display: flex; align-items: baseline; gap: 11px; padding-bottom: 12px; }
.d-bar { display: none; }
.d-plate-name {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}
.d-plate-note {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-plate-count { margin-left: auto; font-size: 9px; font-weight: 300; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.d-items { display: grid; gap: 7px; }
.d-items.grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.d-items.list { grid-template-columns: minmax(0, 1fr); }
.d-items.compact { display: flex; flex-wrap: wrap; }

.d-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--rule-2);
  background: rgba(255,255,255,0.045);
  color: var(--ink-2);
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), color 0.45s var(--ease);
}
.d-card:hover { background: rgba(255,255,255,0.06); border-color: var(--rule-2); color: var(--ink); }
.d-card .d-tile { width: 21px; height: 21px; font-size: 7px; }
.d-card-name { font-size: 11px; font-weight: 300; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-card-host { margin-left: auto; font-size: 8.5px; font-weight: 300; letter-spacing: 0.05em; color: var(--ink-3); white-space: nowrap; }

.d-items.grid .d-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
.d-items.grid .d-card-host { margin-left: 0; }
.d-items.compact .d-card { padding: 6px 14px 6px 7px; }
.d-items.compact .d-card-host { display: none; }

.d-empty {
  padding: 30px 4px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.d-empty span {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  border: 1px solid var(--rule-2);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------
   Anatomy
   ------------------------------------------------------------ */

.anatomy {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 150px) var(--gut) clamp(70px, 9vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.anatomy-head { position: sticky; top: 116px; }
.anatomy-head h2 {
  margin: 30px 0 26px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.016em;
}
.anatomy-lede {
  max-width: 38ch;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.95;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

/* Real ceilings, read straight off the server, set like a spec plate. */
.spec {
  margin-top: 44px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.spec div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.spec b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Each box literally contains the next, because that is the data model. */
.nest-box {
  position: relative;
  border: 1px solid var(--rule);
  padding: 40px 28px 28px;
  transition: border-color 0.6s var(--ease), background 0.6s var(--ease);
}
.nest-box:hover { border-color: var(--rule-2); }
.nest-1 { background: rgba(255,255,255,0.014); }
.nest-2 { margin-top: 26px; background: rgba(255,255,255,0.02); }
.nest-3 { margin-top: 26px; background: rgba(255,255,255,0.026); }

.nest-tag {
  position: absolute;
  top: -8px;
  left: 26px;
  padding: 0 14px;
  background: var(--void);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nest-box > p {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.nest-box:hover > p { color: var(--ink-2); }

/* ------------------------------------------------------------
   Craft
   ------------------------------------------------------------ */

.craft {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(70px, 9vw, 116px) var(--gut);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 68px) clamp(32px, 5vw, 64px);
}

.craft-item { padding-top: 28px; border-top: 1px solid var(--rule); }
.craft-item h3 {
  margin-bottom: 14px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
}
.craft-item p {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------
   Close
   ------------------------------------------------------------ */

.close {
  position: relative;
  text-align: center;
  padding: clamp(100px, 14vw, 190px) var(--gut) clamp(100px, 13vw, 175px);
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.close-bloom {
  position: absolute;
  top: -44%;
  left: 50%;
  width: min(900px, 100%);
  height: 760px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,0.09), transparent 70%);
}

.close h2 {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(30px, 4.8vw, 60px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.018em;
}
.close p {
  position: relative;
  max-width: 42ch;
  margin: 26px auto 48px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}
.close .btn { position: relative; }

/* ------------------------------------------------------------
   Foot
   ------------------------------------------------------------ */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 40px var(--gut) 56px;
  border-top: 1px solid var(--rule);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ------------------------------------------------------------
   The gate — /signin
   ------------------------------------------------------------ */

.gate-page { display: grid; min-height: 100vh; min-height: 100dvh; }

.gate {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 40px var(--gut) 60px;
}

.gate-back {
  position: absolute;
  top: 34px;
  left: var(--gut);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--ink-4);
  transition: color 0.5s var(--ease);
}
.gate-back:hover { color: var(--ink); }

.gate-card { width: 100%; max-width: 396px; text-align: center; }

.gate-title {
  margin: 20px 0 12px;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.gate-sub {
  margin-bottom: 34px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

.gate-error {
  margin-bottom: 22px;
  padding: 13px 16px;
  border: 1px solid var(--rule-2);
  border-left-width: 2px;
  background: rgba(255,255,255,0.03);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  text-align: left;
}

.gate-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }

.gate-field { display: block; }
.gate-field > span {
  display: block;
  margin-bottom: 9px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.gate-field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--rule-2);
  background: rgba(255,255,255,0.02);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.03em;
  outline: none;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.gate-field input:focus { border-color: var(--rule-3); background: rgba(255,255,255,0.045); }

.gate-hint {
  display: block;
  margin-top: 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--ink-4);
}

.gate-submit { width: 100%; margin-top: 8px; }
.gate-submit[disabled] { opacity: 0.55; cursor: default; }

.gate-or {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
}
.gate-or i { flex: 1; height: 1px; background: var(--rule); }
.gate-or span {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.gate-alt { width: 100%; }

.gate-swap {
  margin-top: 30px;
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--ink-4);
}
.gate-swap button {
  border: none;
  background: none;
  padding: 0;
  margin-left: 7px;
  font: inherit;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1px solid var(--rule-2);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.gate-swap button:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ------------------------------------------------------------
   Motion — slow, and only once
   ------------------------------------------------------------ */

@keyframes lift {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

[data-lift] { opacity: 0; animation: lift 1.5s var(--ease) forwards; }
[data-lift="1"] { animation-delay: 0.1s; }
[data-lift="2"] { animation-delay: 0.24s; }
[data-lift="3"] { animation-delay: 0.42s; }
[data-lift="4"] { animation-delay: 0.56s; }
[data-lift="5"] { animation-delay: 0.68s; }
[data-lift="6"] { animation-delay: 0.84s; animation-duration: 2s; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.3s var(--ease), transform 1.3s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1000px) {
  .craft { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .anatomy { grid-template-columns: minmax(0, 1fr); }
  .anatomy-head { position: static; }
  .slab { grid-template-columns: 160px minmax(0, 1fr); }
  .d-items.grid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
  .cannage { opacity: 0.34; }
}

@media (max-width: 640px) {
  .craft { grid-template-columns: minmax(0, 1fr); }
  .dock-domain { display: none; }
  .dock-brand { margin-right: auto; }
  .btn { width: 100%; padding: 0 20px; }
  .actions { flex-direction: column; }
  .slab { grid-template-columns: minmax(0, 1fr); }
  .d-rail { border-right: none; border-bottom: 1px solid var(--rule); }
  .d-envs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .d-envs::-webkit-scrollbar { display: none; }
  .d-env { flex: none; width: auto; border-top: none; border-left: 1px solid var(--rule); }
  .d-env:first-child { border-left: none; }
  .d-env:last-child { border-bottom: none; }
  .d-env.is-on::before { display: none; }
  .d-rail-foot { display: none; }
  .d-canvas { padding: 16px; }
  .d-status { display: none; }
  .stage-cap { letter-spacing: 0.3em; text-indent: 0.3em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-lift] { opacity: 1; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sheen { display: none; }
  .d-board.is-turning { animation: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* The recovery link sits below everything else, quieter than the swap: it is
   the door you hope never to use. */
.gate-recover { margin-top: 14px; }
.gate-recover button { font-size: 11.5px; color: var(--ink-4); }
.gate-recover button:hover { color: var(--ink-2); }
