/*
  Style bramy z kodem (functions/_middleware.js). Plik jest publiczny (bez kodu),
  samodzielny: nie korzysta z style.css, który jest dostępny dopiero po wejściu.
  Czcionki Bodoni Moda i Montserrat: SIL Open Font License 1.1.
*/

/* latin-ext */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/bodoni-moda-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/bodoni-moda-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/bodoni-moda-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/bodoni-moda-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/assets/fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/assets/fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Reset i focus (z base.css) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, p { margin: 0; padding: 0; }
svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 3px;
}

/* ===== Brama z kodem: wygląd hero motywu 3 (Kość słoniowa i złoto) ===== */
:root {
  --paper: #FBF8F2;
  --ink: #1E1C19;
  --gold: #B4975A;
  --gold-deep: #96793F;   /* złoto dla dużego tekstu (kontrast >= 3:1) */
  --gold-text: #7D6634;   /* złoto dla małego tekstu */
  --taupe: #6F665B;
  --error: #9B2C2C;       /* czerwień komunikatu błędu (kontrast ~7:1 na papierze) */

  --text: var(--ink);
  --focus: var(--gold-text);
  --font-display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
}

body { background: var(--paper); font-weight: 300; font-size: 16px; }
h1 { font-weight: 400; }

.sprite { position: absolute; width: 0; height: 0; }
.sprite * { vector-effect: non-scaling-stroke; }
.crest-ring { fill: none; stroke: var(--gold); }
.crest-ring--inner { opacity: 0.6; }
.crest-letter { fill: currentColor; stroke: none; font: 400 36px/1 var(--font-display); text-anchor: middle; }

.label {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
}
.amp { font-style: italic; }

/* Pełny ekran: karta wyśrodkowana w pionie i poziomie, w podwójnej ramce
   (padding = położenie zewnętrznej ramki). */
.gate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 12px;
  background: var(--paper);
}
.gate::before,
.gate::after {
  content: '';
  position: absolute;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.gate::before { inset: 12px; }
.gate::after { inset: 18px; opacity: 0.55; }

.gate-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 420px);
  padding: 24px 24px 28px;
  text-align: center;
}
.gate-card .crest { width: 66px; height: 66px; margin-bottom: 14px; color: var(--ink); }
.eyebrow { color: var(--taupe); }

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  font: italic 400 clamp(44px, 12vw, 56px)/0.95 var(--font-display);
  font-variation-settings: 'opsz' 28;
  color: var(--ink);
}
.names .amp {
  margin: 0.02em 0 0.06em;
  font-size: 0.82em;
  line-height: 0.8;
  color: var(--gold-deep);
}

.intro { max-width: 340px; margin-top: 20px; font-size: 15px; font-weight: 400; color: var(--taupe); text-wrap: balance; }

.gate-form { width: min(100%, 320px); margin-top: 26px; }
.gate-form .label { display: block; color: var(--gold-text); }
.gate-form input {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1 var(--font-body);
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}
.gate-form input::placeholder { color: var(--taupe); opacity: 1; }
.gate-form input[aria-invalid="true"] { border-color: var(--error); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  padding: 0 34px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.gate-error { width: min(100%, 320px); margin-top: 16px; font-size: 14px; font-weight: 400; color: var(--error); text-wrap: balance; }

@media (min-width: 1024px) {
  .gate { padding: 28px; }
  .gate::before { inset: 28px; }
  .gate::after { inset: 36px; }
  .gate-card { padding: 40px 32px; }
  .gate-card .crest { width: 84px; height: 84px; margin-bottom: 18px; }
}
