/* ─────────────────────────────────────────────────────────────────────────────
   Yamazaki Fan Portal — private pages design system
   Used by: /login, /profile, /vault (and other gated/private surfaces).
   Mirrors yamazaki.hu's design language while keeping the existing
   token names so the bespoke <style> blocks in each page Just Work.

   ⚠️  Do NOT replace /shared/styles.css with this file globally.
       Public pages (smartlinks, newsletter, presave, bio, thank-you,
       privacy, discord-verify) still use the old styles.css —
       only the private fan portal pages should link this stylesheet.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* ── yamazaki.hu design tokens ──────────────────────────────────────── */
  --bg:        #0a0a0d;
  --bg-elev:   #15151a;
  --bg-card:   #1a1a22;
  --line:      #2a2a35;
  --text-primary: #e8e8ea;
  --text-dim:  #9a9aa6;
  --text-mute: #6a6a78;
  --cyan:      #00d9ff;
  --cyan-soft: #00d9ff33;
  --magenta:   #ff2e93;
  --gradient-bg:
    radial-gradient(ellipse 80% 50% at 50% 0%,
                    rgba(0, 217, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%,
                    rgba(255, 46, 147, 0.06) 0%, transparent 50%);

  --font-display: "Geist", "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-jp:      "Noto Sans JP", sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 24px;

  --max-w: 1280px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* ── Legacy token bridges ─────────────────────────────────────────────
     The existing portal pages (login/profile/vault) reference the original
     token names from /shared/styles.css inline. By re-mapping them here
     we get the new look without rewriting every inline <style> block. */

  --accent:         var(--cyan);
  --accent-soft:    var(--cyan-soft);
  --accent-gold:    var(--magenta);  /* old gold accent now uses magenta */
  --accent-pink:    var(--magenta);
  --accent-brown:   #8B6914;
  --accent-cream:   var(--text-primary);
  --text:           var(--text-primary);
  --text-secondary: var(--text-dim);
  --text-muted:     var(--text-mute);
  --card-bg:        var(--bg-card);
  --card-border:    var(--line);
  --spotify:        #1DB954;
  --discord:        #5865F2;
  --apple:          #fc3c44;
  --youtube:        #ff0000;
  --tiktok:         #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image: var(--gradient-bg);
  background-attachment: fixed;
}

/* Kill old shared/styles.css's body::before glow if it ever shows up */
body::before { content: none !important; }

/* The legacy /shared/styles.css defined .hidden — the portal pages still
   rely on `class="hidden"` to toggle inline-edit rows, modals, etc.  */
.hidden { display: none !important; }
[hidden] { display: none !important; }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 200ms ease; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ─────────── Typography ─────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cyan);
  font-family: var(--font-display);
}
.eyebrow::before {
  content: ""; width: 1.4rem; height: 1px; background: var(--cyan);
}

p { color: var(--text-dim); }
.lead { font-size: 1.05rem; color: var(--text-primary); max-width: 60ch; }

/* ─────────── Layout primitives ─────────── */

.container {
  max-width: 720px;          /* portal pages are narrower than the main site */
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─────────── Fixed header (matches yamazaki.hu) ─────────── */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(10, 10, 13, 0.75);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.05em; color: #fff;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.site-header .brand .kanji {
  font-family: var(--font-jp); color: var(--cyan); font-weight: 400;
}
.site-header nav {
  display: flex; gap: 1.5rem; align-items: center;
}
.site-header nav a {
  font-size: 0.83rem; font-weight: 500; color: var(--text-dim);
  letter-spacing: 0.02em;
}
.site-header nav a:hover, .site-header nav a.active { color: #fff; }
.site-header nav a.cyan { color: var(--cyan); }
.site-header nav a.cyan:hover { color: #fff; }

@media (max-width: 600px) {
  .site-header nav { gap: 0.85rem; }
  .site-header nav a { font-size: 0.78rem; }
  .site-header .brand .kanji { display: none; }
}

/* Body offset so first content isn't under fixed header */
.portal-body { padding-top: 5rem; padding-bottom: 4rem; }

/* ─────────── Buttons (override the old "btn-add" / generic buttons) ─────── */

.btn,
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--cyan);
  color: #000;
  border: 0;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
  text-decoration: none;
}
.btn:hover, .btn-primary:hover { background: #fff; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--cyan); color: #fff;
}

/* ─────────── Cards ─────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Back link pattern (rewritten to look like a yamazaki.hu pill) */
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--cyan);
  padding: 0.4rem 0.85rem;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 999px;
  text-decoration: none;
  transition: all 200ms ease;
  margin-bottom: 1.5rem;
}
.back-link:hover {
  background: rgba(0, 217, 255, 0.15);
  border-color: var(--cyan);
}

/* ─────────── Inputs (used by login + data-request forms) ─────────── */

.input,
.login-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 200ms ease;
}
.input:focus, .login-input:focus { border-color: var(--cyan); }
.input::placeholder, .login-input::placeholder { color: var(--text-mute); }

/* ─────────── Loading state ─────────── */

.loading-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 50vh; gap: 0.85rem;
}
.loading-spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: yz-spin 0.85s linear infinite;
}
@keyframes yz-spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.85rem; color: var(--text-dim); }

/* ─────────── Page header (eyebrow + title pattern) ─────────── */

.page-head {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
.page-head .eyebrow { margin-bottom: 0.6rem; }
.page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.page-head .subtitle {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ─────────── Footer (small, unobtrusive on portal pages) ─────────── */

.portal-footer {
  margin-top: 4rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-mute);
}
.portal-footer a { color: var(--text-dim); }
.portal-footer a:hover { color: var(--cyan); }

/* ─────────── Status pills (for "subscribed" / "verified" / etc.) ─────── */

.pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
}
.pill-cyan    { background: rgba(0, 217, 255, 0.1); color: var(--cyan);    border-color: rgba(0, 217, 255, 0.3); }
.pill-magenta { background: rgba(255, 46, 147, 0.1); color: var(--magenta); border-color: rgba(255, 46, 147, 0.3); }
.pill-muted   { background: rgba(255, 255, 255, 0.04); color: var(--text-mute); border-color: var(--line); }
