/* ============================================================
   Access gate — registration page (gate/access.php)
   Loads after css/styles.css and reuses its tokens, gradient,
   cover composition, buttons and focus
   styles. Only the layout of the copy beside the form, and the
   form itself, are defined here. The gate is always a dark
   composition (.on-dark), as the publication's cover is.

   Brand rules this file follows (Brand Guidelines June 2026 and
   Design System v3.0):
   - Eyebrows are plain text, no rule or ornament (02-base.css).
   - Light Yellow is the only accent on the dark gradient and the
     two accents never coexist in one composition (guidelines p.4),
     so every accent here is var(--accent), never Signal. The one
     exception, at Carmen's request, is the submit button's hover,
     which takes the master's .btn-signal fill.
   - Form fields follow the master's .field: caption-size semibold
     labels with 0.04em tracking, body-small inputs on --field-bg,
     focus border in --fg3 (03-components.css).
   - No new colours: every value maps to an existing token.

   Built to fit a 1440 × 900 desktop without scrolling; shorter
   viewports tighten the spacing.
   ============================================================ */

.gate-page { background: var(--night); }

/* ---- Composition: a cover slide with the form beside the copy ---- */
.gate {
  --field-bg: rgba(255,255,255,0.06);          /* the master's dark-theme field tokens */
  --field-bg-focus: rgba(255,255,255,0.10);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(24px, 4vh, 56px) clamp(20px, 3vh, 36px);
  overflow: hidden;
  color: var(--fg1);
}
.gate > .frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
/* The cover's left-edge fade would leave only the eastern half of the map
   visible, under the form; here the fade is symmetric, so the whole map
   reads centred between copy and form. Shifted 10 per cent of its box
   width right of centre. */
.gate .cover-map {
  opacity: 0.12;
  transform: translate(-40%, -50%);
  -webkit-mask-image: linear-gradient(to right, transparent 8%, #000 32%, #000 68%, transparent 92%);
  mask-image: linear-gradient(to right, transparent 8%, #000 32%, #000 68%, transparent 92%);
}

.brand-text { font: 600 var(--fs-h4)/1 var(--font-sans); color: var(--off-white); margin: 0; letter-spacing: 0.02em; }

.gate-main {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
  padding-block: clamp(16px, 3vh, 48px);
}

/* ---- The copy: title, subtitle, one paragraph ---- */
.gate-intro .title {
  color: var(--off-white);
  font-size: clamp(46px, 30px + 2.76vw, 74px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 0;
  margin: 0 0 clamp(10px, 1.5vh, 14px);
}
.gate-intro .title .dot { color: var(--highlight); }
/* The cover's subtitle treatment (styles.css scopes it to .cover-main), a step smaller */
.gate-intro .subtitle {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 18.4px + 0.92vw, 31px);
  line-height: 1.25;
  letter-spacing: 0;
  font-variation-settings: "opsz" 32, "SOFT" 0, "WONK" 0;
  color: var(--whisper);
  max-width: 45ch;
  margin: 0 0 clamp(16px, 2.5vh, 24px);
  text-wrap: balance;
}
.gate-para {
  max-width: var(--measure);
  margin: 0 0 var(--s-4);
  color: var(--whisper-60);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.gate-para:last-child { margin-bottom: 0; }

/* ---- The form card: the publication's card on dark, the master's fields ---- */
.gate-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--night-line);
  border-radius: var(--r-card);
  padding: clamp(22px, 2.4vw, 36px);
  /* Blurs the London watermark behind the fields; kept for legibility (Carmen, 13 Oct). */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.gate-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 18px + 0.8vw, 30px);
  line-height: 1.14;
  letter-spacing: -0.008em;
  font-variation-settings: "opsz" 48, "SOFT" 6, "WONK" 0;
  color: var(--off-white);
  margin: 0 0 4px;
}
.gate-card-lead { margin: 0 0 var(--s-4); color: var(--whisper-60); font-size: var(--fs-body-sm); line-height: 1.45; }

/* Form response, as the master's .form-response, in the composition's accent */
.gate-alert {
  margin: 0 0 var(--s-4);
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--off-white);
  font-size: var(--fs-body-sm);
  line-height: 1.45;
}

.gate-form { display: grid; gap: var(--s-3); }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

.gate-field { display: flex; flex-direction: column; gap: 6px; }
.gate-field label {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg2);
}
.gate-field input[type="text"],
.gate-field input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  line-height: 1.4;
  color: var(--fg1);
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.gate-field input::placeholder { color: var(--fg-muted); }
.gate-field input:hover { border-color: var(--border-strong); }
.gate-field input:focus { border-color: var(--fg3); background: var(--field-bg-focus); }
.gate-field.is-invalid input { border-color: var(--accent); }
.gate-error { margin: 0; color: var(--accent); font-size: var(--fs-caption); line-height: 1.4; }

/* Consent: checkbox, its label, then the privacy notice */
.gate-consent { margin-top: 4px; gap: 6px; }
.gate-check { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; }
.gate-check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.gate-check label {
  font-size: var(--fs-body-sm);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--whisper-60);
  cursor: pointer;
}
.gate-consent.is-invalid .gate-check label { color: var(--off-white); }
.gate-privacy { margin: 0; color: var(--fg-muted); font-size: var(--fs-caption); line-height: 1.5; }
.gate-privacy a { color: var(--whisper); }

/* Honeypot: present for robots, absent for people and assistive technology */
.gate-hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.gate-submit { width: 100%; justify-content: center; margin-top: var(--s-2); padding: 15px 24px; }
.gate-submit:hover { background: var(--signal); color: var(--off-white); border-color: var(--signal); }
.gate-note { margin: 0; color: var(--fg-muted); font-size: var(--fs-caption); line-height: 1.5; text-align: center; }

.gate-foot { padding-top: var(--s-4); color: var(--fg-muted); font-size: var(--fs-caption); }
.gate-foot p { margin: 0; }
.gate-foot a { color: var(--whisper-60); text-decoration: none; }
.gate-foot a:hover, .gate-foot a:focus-visible { color: var(--accent); text-decoration: underline; }

/* ---- Short desktop viewports (1366 × 768 laptops): tighter, so the form still fits ---- */
@media (min-width: 901px) and (max-height: 820px) {
  .gate { padding-block: 18px 14px; }
  .gate-main { padding-block: 8px; gap: clamp(28px, 4vw, 64px); }
  .gate-intro .title { font-size: clamp(41px, 25px + 2.3vw, 60px); margin-bottom: 8px; }
  .gate-intro .subtitle { margin-bottom: 14px; }
  .gate-card { padding: 20px 24px; }
  .gate-card-lead { margin-bottom: 10px; }
  .gate-form, .gate-row { gap: 10px; }
  .gate-field input[type="text"], .gate-field input[type="email"] { min-height: 40px; padding-block: 8px; }
  .gate-foot { padding-top: 10px; }
}

/* ---- Responsive: the same breakpoints as the publication ---- */
@media (max-width: 1180px) {
  .gate-main { grid-template-columns: minmax(0, 6fr) minmax(300px, 5fr); gap: clamp(28px, 4vw, 64px); }
}
@media (max-width: 900px) {
  /* One column: the copy, then the form. */
  .gate-main { display: flex; flex-direction: column; gap: clamp(24px, 4vh, 40px); padding-block: clamp(16px, 3vh, 40px); }
  .gate .cover-map { width: 100vw; opacity: 0.10; transform: translate(-50%, -50%); }   /* whole and centred on tablets and phones */
}
@media (max-width: 760px) {
  .gate { padding-block: 24px 20px; }
  .gate-card { padding: 22px 18px; }
}
@media (max-width: 480px) {
  .gate-row { grid-template-columns: 1fr; }
  .cover-top .brand-mark { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-field input { transition: none; }
}

@media print {
  .gate .cover-map, .gate-hp { display: none; }
}
