/* ============================================================
   THE GENTLEMEN — landing styles
   Old oil painting × on-chain terminal.
   ============================================================ */

:root {
  /* — colour — */
  --canvas:     #0C0A0B;                      /* oil-canvas almost-black */
  --canvas-2:   #141010;                      /* section / card ground   */
  --cream:      #EDE6D6;                       /* the "burning" text       */
  --cream-dim:  rgba(237, 230, 214, 0.60);     /* serif body, secondary    */
  --cream-faint:rgba(237, 230, 214, 0.42);
  --line:       rgba(237, 230, 214, 0.12);     /* hairlines / borders      */
  --line-strong:rgba(237, 230, 214, 0.28);
  --ember:      rgba(206, 150, 96, 0.16);      /* faint warm lamp glow     */
  --error:      #C2553F;                        /* muted brick red          */
  --focus:      #EDE6D6;

  /* — glow — */
  --glow: 0 0 16px rgba(237,230,214,.30),
          0 0 38px rgba(237,230,214,.12),
          0 0 60px var(--ember);
  --glow-soft: 0 0 12px rgba(237,230,214,.20),
               0 0 30px var(--ember);

  /* — type — */
  --font-display: 'VT323', 'Courier New', monospace;
  --font-body:    'EB Garamond', Georgia, 'Times New Roman', serif;

  /* — space — */
  --s-1: 8px;  --s-2: 16px;  --s-3: 24px;  --s-4: 40px;
  --s-5: 64px; --s-6: 96px;
  --wrap: 1100px;
  --radius: 2px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 18px;
  background: var(--canvas-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .04em;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 14px; }

/* ---------- shared layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

#main { position: relative; z-index: 1; }   /* content above the fixed gallery */

.section { padding-block: var(--s-6); }
.section--allowlist{
  background: transparent;   /* one continuous gallery background — no seam */
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: .04em;
  color: var(--cream);
  text-shadow: var(--glow-soft);
  margin: 0 0 var(--s-3);
  text-align: center;
}

.prose {
  max-width: 60ch;
  margin-inline: auto;
  color: var(--cream-dim);
  font-size: 1.18rem;
}
.prose p { margin: 0 0 var(--s-2); }
.prose p:last-child { margin-bottom: 0; }
.prose--center { text-align: center; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-5) var(--s-3);
  background: transparent;
}

/* full-page drifting gallery — square tiles held ONLY by aspect-ratio:1/1
   (no height, no inline width/height — that was the old bug). */
.bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.wall{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;gap:14px;opacity:0;transition:opacity 1.4s ease}
.wall.is-visible{opacity:.42}
.wall__row{display:flex;overflow:hidden;flex:0 0 auto}/* never shrink: a compressed row would stretch the square cell into a strip (aspect-ratio loses to flex). Overflowing rows just get clipped whole by .bg. */
.wall__track{display:flex;gap:14px;flex:0 0 auto;will-change:transform;animation:drift 80s linear infinite}
.wall__row:nth-child(even) .wall__track{animation-direction:reverse}
.wall__cell{flex:0 0 auto;width:200px;aspect-ratio:1/1;overflow:hidden;border-radius:2px;background:#14110f}/* dark placeholder: a not-yet-painted tile is a soft square, never a transparent gap */
.wall__cell img{width:100%;height:100%;object-fit:cover;display:block}
@keyframes drift{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(max-width:680px){.wall__cell{width:130px}}
@media(prefers-reduced-motion:reduce){.wall__track{animation:none}.wall{transition:none}}

/* veil over the gallery — keeps text readable across the whole page */
.bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 58% at 50% 24%,
        rgba(12,10,11,.40) 0%, rgba(12,10,11,.62) 52%, rgba(12,10,11,.82) 100%),
    linear-gradient(180deg, rgba(12,10,11,.26) 0%, rgba(12,10,11,.40) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 1.04;
  letter-spacing: .02em;
  margin: 0;
  color: var(--cream);
  text-shadow: var(--glow);
  min-height: 1.1em;            /* reserve space so layout doesn't jump while typing */
}
.caret {
  display: inline-block;
  margin-left: .04em;
  font-weight: 400;
  color: var(--cream);
  text-shadow: var(--glow);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-style: italic;
  color: var(--cream-dim);
  margin: var(--s-3) auto var(--s-4);
  max-width: 36ch;
}

.hero__data {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .08em;
  color: var(--cream-faint);
  margin: var(--s-4) 0 0;
  text-transform: uppercase;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .05em;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 30px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease,
              box-shadow .18s ease, transform .18s ease, color .18s ease;
}
.btn:hover {
  border-color: var(--cream);
  box-shadow: var(--glow-soft);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: rgba(237,230,214,.05);
  border-color: var(--line-strong);
}
.btn--primary:hover {
  background: rgba(237,230,214,.10);
  border-color: var(--cream);
}

.btn--x { margin-bottom: var(--s-4); }

.btn--submit {
  width: 100%;
  margin-top: var(--s-3);
  font-size: 1.6rem;
}
.btn[disabled] { opacity: .5; cursor: progress; box-shadow: none; }

/* ============================================================
   ALLOWLIST FORM
   ============================================================ */
.section--allowlist .wrap { text-align: center; }
.section--allowlist .form { text-align: center; }

.form {
  max-width: 480px;
  margin: var(--s-4) auto 0;
  text-align: left;
}
.form__label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: .05em;
  color: var(--cream-dim);
  margin-bottom: var(--s-1);
  text-transform: uppercase;
}
.form__input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .02em;
  color: var(--cream);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form__input::placeholder { color: var(--cream-faint); }
.form__input:hover { border-color: var(--cream-faint); }
.form__input:focus {
  outline: none;
  border-color: var(--cream);
  box-shadow: var(--glow-soft);
}
.form__input.is-invalid { border-color: var(--error); }

.form__error {
  margin: var(--s-1) 0 0;
  color: var(--error);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .03em;
}

/* Honeypot — pushed off-screen (NOT display:none, so bots still fill it),
   unreachable by keyboard/AT. A filled value means a bot; the server drops it. */
.form__hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  margin: var(--s-3) 0 0;
  min-height: 1.4em;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: var(--cream);
}
.form__status.is-success { text-shadow: var(--glow-soft); }
.form__status.is-error   { color: var(--error); }

/* success state — replace the form with the confirmation */
.form.is-done .form__label,
.form.is-done .form__input,
.form.is-done .form__error,
.form.is-done .btn--submit { display: none; }
.form.is-done .form__status {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin-top: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  background: transparent;
  padding-block: var(--s-5);
  text-align: center;
}
.footer__x {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: .05em;
  color: var(--cream);
  text-decoration: none;
}
.footer__x:hover { text-shadow: var(--glow-soft); }
.footer__line {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--cream-dim);
  margin: var(--s-2) 0 var(--s-1);
}
.footer__copy {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .06em;
  color: var(--cream-faint);
  margin: 0;
}

/* ============================================================
   FOCUS — visible keyboard focus everywhere
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.btn:focus-visible { box-shadow: var(--glow-soft); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  body { font-size: 17px; }
  .section { padding-block: var(--s-5); }
  .wrap { padding-inline: var(--s-2); }
  .hero { padding-inline: var(--s-2); }
  .hero__data { font-size: 1.25rem; letter-spacing: .05em; }
  .btn { width: 100%; }
  .btn--x { display: block; }
}

/* ============================================================
   REDUCED MOTION — no typing drama, no drift
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; opacity: 0; }   /* steady, unobtrusive */
  .btn:active { transform: none; }
}
