/* ============================================================================
   BASE v2 — light editorial page, paper grain, CRT option, cabinet buttons
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Editorial backdrop: cool light wash + soft paper grain ------------- */
.bg-paper { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(140% 100% at 50% 0%, #f3f6fa 0%, var(--paper) 46%, var(--paper-2) 100%);
}
.bg-grain { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: calc(0.5 + 0.35 * var(--fx));
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
/* faint editorial ruled lines, lookbook margin feel */
.bg-rules { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(90deg, rgba(31,40,67,0.04) 1px, transparent 1px);
  background-size: 64px 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
/* Optional CRT scanlines (toggle via :root.crt) */
.bg-crt { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 4px); }
:root.crt .bg-crt { opacity: calc(0.6 * (0.4 + 0.6 * var(--fx))); }

/* ---- Type --------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.04; }
h1 { font-size: clamp(28px, 4vw, 46px); }
h2 { font-size: clamp(20px, 2.6vw, 30px); }
h3 { font-size: 17px; }
p  { margin: 0; }

.caption { font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
em.editorial { font-style: normal; color: var(--ink-dim); font-size: 16px; }

/* small arcade label (pixel) */
.arcade-label { font-family: var(--font-arcade); font-size: 9px; letter-spacing: 0.02em; line-height: 1.6; text-transform: uppercase; color: var(--ink); }

/* ---- Buttons — chunky arcade cabinet ----------------------------------- */
button {
  font-family: var(--font-display); font-weight: 900;
  border: 2.5px solid var(--ink-strong);
  background: var(--arc-yellow);
  color: var(--ink-strong);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform .08s steps(2), box-shadow .08s steps(2), background .15s;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  box-shadow: var(--cab-shadow);
}
button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink-strong); }
button:focus-visible { outline: 3px solid var(--arc-blue); outline-offset: 3px; }
button.secondary { background: var(--card); }
button.ghost { background: var(--card); box-shadow: var(--cab-shadow-sm); }
/* Hover only where a real pointer can hover. On touch, :hover sticks after a tap
   (tiles flashing red, buttons staying highlighted), so phones/tablets skip it. */
@media (hover: hover) {
  button:hover { background: var(--arc-red); }
  button.secondary:hover { background: #eef2f8; }
  button.ghost:hover { background: #eef2f8; }
}

/* ---- Inputs ------------------------------------------------------------- */
input[type=email], input[type=text] {
  font-family: var(--font-body); font-size: 16px;
  padding: 13px 14px;
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); width: 100%;
}
input::placeholder { color: var(--ink-mut); }
input:focus-visible { outline: none; border-color: var(--arc-blue); box-shadow: var(--cab-shadow-sm); }

label.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-dim); cursor: pointer; }
label.checkbox input { margin-top: 3px; accent-color: var(--arc-red); width: 18px; height: 18px; }

/* ---- App shell ---------------------------------------------------------- */
.app { display: flex; justify-content: center; padding: clamp(16px, 3.5vw, 44px); min-height: 100dvh; }

/* ---- Toast — arcade ticket --------------------------------------------- */
.toast-region { position: fixed; inset-inline: 0; bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 50; }
.toast {
  background: var(--ink-strong); color: #fff;
  border: 2.5px solid var(--ink-strong);
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 12px; font-weight: 900;
  letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: var(--cab-shadow);
  animation: toast-pop .3s var(--ease-pop) both, toast-fade .4s 2.6s var(--ease-soft) both;
}
.toast::first-letter { color: var(--arc-yellow); }
@keyframes toast-pop  { from { transform: translateY(16px) scale(.9); opacity: 0; } }
@keyframes toast-fade { to   { transform: translateY(-10px); opacity: 0; } }

.tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 11px; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--card); border: 2px solid var(--ink-strong); color: var(--ink-strong);
}

.stitch-divider { height: 2px; border: 0; background: var(--ink-strong); opacity: 0.12; margin: var(--space-5) 0; }
