/* ═══════════════════════════════════════════
   shared.css — Verfall & Seashell
   Used by: index.html, verificationpage.html
═══════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  --ash:   #c8bfb0;
  --bone:  #e8dfd0;
  --rust:  #8b3a2a;
  --blood: #5c1a0e;
  --dark:  #0a0806;
  --mid:   #1a1510;
  --gold:  #b8922a;
  --dim:   #3a3028;
}

/* ── Base ── */
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--dark);
  color: var(--bone);
  font-family: 'Cormorant Garamond', serif;
}

/* ── Canvas background ── */
canvas#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── Grain overlay ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 180px; opacity: 0.06; mix-blend-mode: overlay;
}

/* ── Vignette ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.85) 100%);
}

/* ═══════════════════════════════════════════
   Topbar (Seashell only)
═══════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(10, 8, 6, 0.7);
  border-bottom: 1px solid rgba(184, 146, 42, 0.12);
  backdrop-filter: blur(12px);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(184,146,42,0.3));
}

.site-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(184,146,42,0.25);
}

.login-btn {
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(184,146,42,0.3);
  color: var(--ash);
  font-family: 'Cinzel Decorative', serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 8px 18px;
  transition: all 0.25s ease;
}
.login-btn:hover {
  border-color: rgba(184,146,42,0.6);
  color: var(--bone);
  box-shadow: 0 0 16px rgba(184,146,42,0.1);
}

/* ═══════════════════════════════════════════
   Stage & Card
═══════════════════════════════════════════ */
.stage {
  position: relative; z-index: 10;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Offset for pages with a topbar */
body#verification .stage {
  padding-top: 56px;
}

.card {
  width: min(500px, 92vw);
  padding: 52px 48px 44px;
  background: rgba(10, 8, 6, 0.75);
  border: 1px solid rgba(184, 146, 42, 0.2);
  backdrop-filter: blur(14px);
  position: relative;
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Corner ornaments */
.card::before { content: ''; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px; border: 2px solid var(--gold); border-right: none; border-bottom: none; opacity: 0.55; }
.card::after  { content: ''; position: absolute; bottom: -1px; right: -1px; width: 22px; height: 22px; border: 2px solid var(--gold); border-left: none; border-top: none; opacity: 0.55; }
.c-tr { position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; border: 2px solid var(--gold); border-left: none; border-bottom: none; opacity: 0.55; }
.c-bl { position: absolute; bottom: -1px; left: -1px; width: 22px; height: 22px; border: 2px solid var(--gold); border-right: none; border-top: none; opacity: 0.55; }

/* ═══════════════════════════════════════════
   Logo / Title
═══════════════════════════════════════════ */
.logo-wrap { text-align: center; margin-bottom: 28px; }

.eyebrow {
  display: block;
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 10px;
}

h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(46px, 9vw, 68px);
  font-weight: 900;
  line-height: 1;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(184,146,42,0.3), 0 0 80px rgba(139,58,42,0.2);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

.sub {
  display: block;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ash);
  opacity: 0.5;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   Divider
═══════════════════════════════════════════ */
.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(184,146,42,0.3));
}
.divider::after { transform: scaleX(-1); }
.divider span { font-family: 'Cinzel Decorative', serif; font-size: 14px; color: var(--gold); opacity: 0.45; }

/* ═══════════════════════════════════════════
   Body text
═══════════════════════════════════════════ */
.verify-desc {
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.8;
  color: var(--ash);
  opacity: 0.75;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   Buttons
═══════════════════════════════════════════ */
.btn-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }

.btn {
  cursor: pointer; border: none;
  padding: 17px 28px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
  text-decoration: none;
  display: block;
  text-align: center;
  width: 100%;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.04); opacity: 0; transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

/* Primary — filled rust/blood */
.btn-primary {
  background: linear-gradient(135deg, var(--rust) 0%, var(--blood) 100%);
  color: var(--bone);
  border: 1px solid rgba(139,58,42,0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(92,26,14,0.55), 0 0 0 1px rgba(184,146,42,0.3);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary — outlined gold (Verfall "Go to Game") */
.btn-secondary {
  background: transparent;
  color: var(--ash);
  border: 1px solid rgba(184,146,42,0.25);
}
.btn-secondary:hover {
  border-color: rgba(184,146,42,0.55);
  color: var(--bone);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(184,146,42,0.1);
}

/* Ghost — subtle outline (Seashell cancel) */
.btn-ghost {
  background: transparent;
  color: var(--ash);
  border: 1px solid rgba(184,146,42,0.2);
  width: auto;
  display: inline-block;
}
.btn-ghost:hover {
  border-color: rgba(184,146,42,0.45);
  color: var(--bone);
}

/* ── ToS trigger link ── */
.tos-wrap { text-align: center; }
.tos-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 12px;
  letter-spacing: 0.1em; color: var(--dim);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(58,48,40,0.5);
  transition: color 0.2s; padding: 4px 8px;
}
.tos-btn:hover { color: var(--ash); }

/* ═══════════════════════════════════════════
   Modals — shared
═══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  width: min(480px, 90vw);
  max-height: 70vh;
  background: #110e0b;
  border: 1px solid rgba(184,146,42,0.25);
  padding: 40px 36px;
  overflow-y: auto;
  animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1) both;
  position: relative;
}

.modal h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 20px; color: var(--bone);
  margin-bottom: 16px; letter-spacing: 0.08em;
}

.modal p {
  font-size: 13px; font-weight: 300;
  line-height: 1.85; color: var(--ash);
  margin-bottom: 14px;
}
.modal p strong { color: var(--bone); font-weight: 400; }

.modal-close {
  margin-top: 24px; cursor: pointer;
  padding: 12px 28px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px; letter-spacing: 0.25em;
  background: transparent; color: var(--ash);
  border: 1px solid rgba(200,191,176,0.2);
  transition: all 0.25s; display: block; margin-left: auto;
}
.modal-close:hover { border-color: rgba(200,191,176,0.5); color: var(--bone); }

.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: rgba(184,146,42,0.25); border-radius: 2px; }

/* ── Tabbed modal (Privacy / ToS) ── */
.modal-tabs {
  display: flex; gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(184,146,42,0.18);
}

.modal-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); padding: 10px 20px 12px;
  transition: color 0.2s; position: relative;
}
.modal-tab::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: var(--gold); opacity: 0; transition: opacity 0.2s;
}
.modal-tab:hover { color: var(--ash); }
.modal-tab.active { color: var(--gold); }
.modal-tab.active::after { opacity: 1; }

.modal-section h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--gold); opacity: 0.8;
  margin: 20px 0 8px; text-transform: uppercase;
}

.modal-section ul { padding-left: 18px; margin-bottom: 10px; }
.modal-section ul li {
  font-size: 13px; font-weight: 300;
  line-height: 1.75; color: var(--ash); margin-bottom: 4px;
}

.modal-date {
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--dim); margin-bottom: 6px;
}

.modal-consent {
  margin-top: 20px; padding: 14px 16px;
  border-left: 2px solid rgba(184,146,42,0.3);
  font-style: italic; font-size: 12px;
  color: var(--ash); opacity: 0.75; line-height: 1.7;
}

/* ── Confirm modal (Before You Verify) ── */
.terms-confirm-modal {
  max-height: unset;
  text-align: center;
  padding: 44px 40px 36px;
}

.confirm-icon {
  font-size: 28px; margin-bottom: 16px;
  opacity: 0.5;
  filter: sepia(1) saturate(2) hue-rotate(-10deg);
}

.confirm-actions {
  display: flex; justify-content: center;
  gap: 14px; margin-top: 28px; flex-wrap: wrap;
}
.confirm-actions .btn { width: auto; display: inline-block; }

/* ── Inline text link ── */
.inline-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 13px;
  color: var(--gold); opacity: 0.85;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 0; transition: opacity 0.2s;
}
.inline-link:hover { opacity: 1; }

.hidden { display: none; }

/* ═══════════════════════════════════════════
   Footer (Seashell only)
═══════════════════════════════════════════ */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0; z-index: 20;
  text-align: center; padding: 14px;
  font-size: 11px; letter-spacing: 0.08em; color: var(--dim);
  background: linear-gradient(to top, rgba(10,8,6,0.7), transparent);
}

.footer-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; letter-spacing: 0.08em; color: var(--dim);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.2s; padding: 0;
}
.footer-link:hover { color: var(--ash); }

/* ═══════════════════════════════════════════
   Animations
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulseGlow {
  from { text-shadow: 0 0 30px rgba(184,146,42,0.2), 0 0 60px rgba(139,58,42,0.1); }
  to   { text-shadow: 0 0 50px rgba(184,146,42,0.45), 0 0 100px rgba(139,58,42,0.3); }
}
