/* ═══════════════════════════════════════════
   style.css — Seashell
   Used by: index.html, verificationpage.html, tos.html
   Layout & components mirror the Verfall site;
   colours are swapped for a deep-sea palette.
═══════════════════════════════════════════ */

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

/* ── Design tokens (change these to re-theme the whole site) ── */
:root {
  --foam:   #a9c4c9;   /* secondary text            */
  --pearl:  #e8f0f0;   /* primary text              */
  --tide:   #2a7f8c;   /* primary button (top)      */
  --deep:   #123f4c;   /* primary button (bottom)   */
  --abyss:  #04090d;   /* page background           */
  --shell:  #e2b48a;   /* accent: ornaments, labels */
  --dim:    #3b4f58;   /* muted text                */
  --shell-rgb: 226,180,138;
}

html, body {
  width: 100%; height: 100%;
  background: var(--abyss);
  color: var(--pearl);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
html { overflow: hidden; }
/* The page (not the card) scrolls when the screen is too short */
body { overflow-x: hidden; overflow-y: auto; }

/* ── Backgrounds: art slideshow → particle canvas → vignette/grain ── */
#background { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-layer {
  position: absolute; inset: -4%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity 2.4s ease-in-out;
  filter: saturate(0.75) brightness(0.55);
  animation: drift 40s ease-in-out infinite alternate;
}
.bg-layer.visible { opacity: 0.55; }

canvas#bg { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

body::after {
  content: ''; position: fixed; inset: 0; z-index: 2; 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;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(2,6,10,0.9) 100%);
}

/* ── Topbar ── */
.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(4,9,13,0.72);
  border-bottom: 1px solid rgba(var(--shell-rgb),0.12);
  backdrop-filter: blur(14px);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar-brand img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(var(--shell-rgb),0.35)); }
.topbar-name {
  font-family: 'Cinzel Decorative', serif; font-size: 15px; font-weight: 700;
  color: var(--pearl); letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(var(--shell-rgb),0.25);
}
#topbar-status {
  font-family: 'Cinzel Decorative', serif; font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--foam);
  padding: 7px 16px; border: 1px solid rgba(var(--shell-rgb),0.2); transition: all 0.3s;
}
#topbar-status:empty { display: none; }

/* ── Stage & card ── */
.stage {
  position: relative; z-index: 10; width: 100%; min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px 56px;
}
body.has-topbar .stage { padding-top: 80px; }

.card {
  width: min(500px, 100%);
  padding: 52px 46px 42px;
  background: rgba(4,12,17,0.78);
  border: 1px solid rgba(var(--shell-rgb),0.2);
  backdrop-filter: blur(16px);
  position: relative;
  animation: fadeUp 1.1s cubic-bezier(0.16,1,0.3,1) both;
}
.card::before { content: ''; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px; border: 2px solid var(--shell); 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(--shell); 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(--shell); 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(--shell); border-right: none; border-top: none; opacity: 0.55; }

/* ── Views (verification page) ── */
.view { display: none; flex-direction: column; align-items: center; text-align: center; }
.view.active { display: flex; animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both; }

/* ── Typography ── */
.logo-wrap { text-align: center; }
.eyebrow {
  display: block; font-family: 'Cinzel Decorative', serif; font-size: 10px;
  letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--shell); opacity: 0.7; margin-bottom: 10px;
}
h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(40px, 9vw, 64px); font-weight: 900; line-height: 1;
  color: var(--pearl); margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(var(--shell-rgb),0.25), 0 0 80px rgba(42,127,140,0.3);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}
h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(20px, 4vw, 28px); font-weight: 700;
  color: var(--pearl); letter-spacing: 0.06em; margin-bottom: 8px;
}
.sub { display: block; font-style: italic; font-size: 13px; letter-spacing: 0.18em; color: var(--foam); opacity: 0.6; }
.desc {
  font-size: 15px; font-weight: 300; font-style: italic; line-height: 1.8;
  color: var(--foam); opacity: 0.85; max-width: 380px; letter-spacing: 0.02em;
}

/* ── Divider ── */
.divider { display: flex; align-items: center; gap: 14px; width: 100%; margin: 24px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(var(--shell-rgb),0.32)); }
.divider::after { transform: scaleX(-1); }
.divider span { font-family: 'Cinzel Decorative', serif; font-size: 14px; color: var(--shell); opacity: 0.5; }

/* ── Step dots ── */
.steps { display: flex; align-items: center; gap: 8px; width: 120px; margin-bottom: 22px; }
.step-dot { width: 8px; height: 8px; border: 1px solid rgba(var(--shell-rgb),0.35); border-radius: 50%; transition: all 0.4s ease; }
.step-dot.active { background: var(--shell); border-color: var(--shell); box-shadow: 0 0 10px rgba(var(--shell-rgb),0.5); }
.step-dot.done { background: rgba(var(--shell-rgb),0.35); border-color: rgba(var(--shell-rgb),0.5); }
.step-line { flex: 1; height: 1px; background: rgba(var(--shell-rgb),0.15); }

/* ── Buttons ── */
.btn-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 26px; }
.logo-wrap + .divider + .btn-stack { margin-top: 0; }
.btn {
  cursor: pointer; border: none; width: 100%; padding: 16px 26px;
  font-family: 'Cinzel Decorative', serif; font-size: 10px;
  letter-spacing: 0.26em; text-transform: uppercase; text-decoration: none;
  transition: all 0.3s ease; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.05); opacity: 0; transition: opacity 0.2s; }
.btn:not(:disabled):hover::after { opacity: 1; }
.btn:focus-visible, .tos-btn:focus-visible, .footer-link:focus-visible, .inline-link:focus-visible, .modal-tab:focus-visible, .modal-close-btn:focus-visible {
  outline: 1px solid var(--shell); outline-offset: 3px;
}

.btn-primary { background: linear-gradient(135deg, var(--tide) 0%, var(--deep) 100%); color: var(--pearl); border: 1px solid rgba(42,127,140,0.6); }
.btn-primary:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(18,63,76,0.6), 0 0 0 1px rgba(var(--shell-rgb),0.3); }

.btn-secondary { background: transparent; color: var(--foam); border: 1px solid rgba(var(--shell-rgb),0.28); }
.btn-secondary:not(:disabled):hover { border-color: rgba(var(--shell-rgb),0.6); color: var(--pearl); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(var(--shell-rgb),0.1); }

.btn-ghost { background: transparent; color: var(--foam); border: 1px solid rgba(var(--shell-rgb),0.22); }
.btn-ghost:not(:disabled):hover { border-color: rgba(var(--shell-rgb),0.48); color: var(--pearl); }

.btn-discord { background: linear-gradient(135deg, #4552b8 0%, #2a3680 100%); color: #fff; border: 1px solid rgba(88,101,242,0.45); }
.btn-discord:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(88,101,242,0.3); }

.btn-roblox { background: linear-gradient(135deg, #c23a3a 0%, #8a1a1a 100%); color: #fff; border: 1px solid rgba(226,68,68,0.4); }
.btn-roblox:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(226,68,68,0.22); }

.btn-danger { background: transparent; color: #d58b7e; border: 1px solid rgba(196,94,76,0.35); font-size: 9px; }
.btn-danger:not(:disabled):hover { background: rgba(120,40,30,0.2); border-color: rgba(196,94,76,0.6); }

.btn-icon { width: 17px; height: 17px; flex-shrink: 0; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.2); border-top-color: rgba(255,255,255,0.8); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }

/* ── ToS trigger links ── */
.tos-wrap, .tos-foot { text-align: center; margin-top: 18px; }
.tos-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 13px;
  letter-spacing: 0.1em; color: var(--foam); opacity: 0.6;
  text-decoration: underline; text-underline-offset: 3px;
  transition: opacity 0.2s; padding: 4px 8px;
}
.tos-btn:hover { opacity: 1; }

/* ── Profile ── */
.avatar-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 18px; }
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.avatar-wrap img { width: 68px; height: 68px; border-radius: 50%; border: 2px solid rgba(var(--shell-rgb),0.25); box-shadow: 0 0 18px rgba(var(--shell-rgb),0.12); object-fit: cover; background: #0b1a20; }
.avatar-label { font-family: 'Cinzel Decorative', serif; font-size: 8px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--shell); opacity: 0.6; }
.avatar-sep { font-size: 20px; color: var(--shell); opacity: 0.3; margin-bottom: 14px; }
.profile-name { font-size: 20px; font-weight: 600; color: var(--pearl); letter-spacing: 0.04em; margin-bottom: 6px; }
.profile-ids { font-size: 12px; letter-spacing: 0.06em; color: var(--foam); opacity: 0.7; line-height: 1.9; }

.discord-badge { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid rgba(88,101,242,0.25); background: rgba(58,74,154,0.12); margin-bottom: 4px; }
.discord-badge img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(88,101,242,0.3); object-fit: cover; }
.discord-badge-info { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.discord-badge-name { font-size: 14px; color: var(--pearl); }
.discord-badge-label { font-family: 'Cinzel Decorative', serif; font-size: 7px; letter-spacing: 0.2em; color: #8d9cf0; opacity: 0.8; text-transform: uppercase; }

.error-box {
  width: 100%; padding: 12px 16px;
  background: rgba(92,26,14,0.3); border: 1px solid rgba(160,70,50,0.4); border-left: 3px solid #b5523e;
  font-size: 13px; letter-spacing: 0.03em; color: #e2a090; line-height: 1.65; text-align: left;
}

/* ── Modals ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(7px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  width: min(480px, 100%); background: #08141a;
  border: 1px solid rgba(var(--shell-rgb),0.24);
  padding: 40px 36px 32px; position: relative;
  animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.modal-confirm { text-align: center; }
.modal-confirm .conf-icon { font-size: 26px; margin-bottom: 14px; color: var(--shell); opacity: 0.6; }
.modal-confirm h2 { font-size: 18px; margin-bottom: 14px; }
.modal-confirm p { font-size: 14px; font-weight: 300; line-height: 1.85; color: var(--foam); }
.modal-confirm p strong { color: var(--pearl); font-weight: 500; }
.modal-actions { display: flex; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.modal-actions .btn { width: auto; padding: 13px 26px; }

.modal-tos { padding: 0; max-height: 78vh; overflow-y: auto; }
.modal-tos-inner { padding: 34px 32px 28px; }
.modal-tabs { display: flex; border-bottom: 1px solid rgba(var(--shell-rgb),0.15); margin-bottom: 24px; }
.modal-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Cinzel Decorative', serif; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); padding: 9px 16px 11px; position: relative; transition: color 0.2s;
}
.modal-tab::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: var(--shell); opacity: 0; transition: opacity 0.2s; }
.modal-tab:hover { color: var(--foam); }
.modal-tab.active { color: var(--shell); }
.modal-tab.active::after { opacity: 1; }
.modal-section { display: none; }
.modal-section.active { display: block; }

.legal h3, .modal-section h3 {
  font-family: 'Cinzel Decorative', serif; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--shell); opacity: 0.85; margin: 20px 0 8px;
}
.legal p, .modal-section p { font-size: 14px; font-weight: 300; line-height: 1.85; color: var(--foam); margin-bottom: 11px; }
.legal ul, .modal-section ul { padding-left: 18px; margin-bottom: 10px; }
.legal li, .modal-section li { font-size: 14px; font-weight: 300; line-height: 1.75; color: var(--foam); margin-bottom: 4px; }
.legal strong, .modal-section strong { color: var(--pearl); font-weight: 500; }
.legal a, .modal-section a { color: var(--shell); text-underline-offset: 3px; }
.modal-date { font-size: 12px !important; letter-spacing: 0.06em; opacity: 0.75; margin-bottom: 6px !important; }
.modal-consent { margin-top: 16px; padding: 11px 14px; border-left: 2px solid rgba(var(--shell-rgb),0.35); font-style: italic; opacity: 0.85; }

.modal-close-btn {
  display: block; margin: 22px auto 0; cursor: pointer; padding: 10px 26px;
  font-family: 'Cinzel Decorative', serif; font-size: 9px; letter-spacing: 0.25em;
  background: transparent; color: var(--foam); border: 1px solid rgba(200,220,225,0.2); transition: all 0.25s;
}
.modal-close-btn:hover { border-color: rgba(200,220,225,0.45); color: var(--pearl); }

.inline-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: inherit;
  color: var(--shell); opacity: 0.9; text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.inline-link:hover { opacity: 1; }

.modal-tos::-webkit-scrollbar, .legal-page::-webkit-scrollbar { width: 4px; }
.modal-tos::-webkit-scrollbar-thumb, .legal-page::-webkit-scrollbar-thumb { background: rgba(var(--shell-rgb),0.22); border-radius: 2px; }

/* ── Footer ── */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  text-align: center; padding: 14px;
  font-size: 12px; letter-spacing: 0.08em; color: var(--dim);
  background: linear-gradient(to top, rgba(4,9,13,0.8), transparent);
}
.footer-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 0.08em;
  color: var(--foam); opacity: 0.6; text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.footer-link:hover { opacity: 1; }

/* ── Standalone legal page (tos.html) ── */
body.legal-body { overflow: hidden; }
.legal-page { position: relative; z-index: 10; height: 100%; overflow-y: auto; padding: 88px 16px 80px; }
.legal-page .card { margin: 0 auto 24px; padding: 40px 40px 32px; }
.legal-nav { display: flex; justify-content: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.legal-nav .btn { width: auto; padding: 11px 22px; }

/* ── Small screens ── */
@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .card { padding: 42px 22px 32px; }
  .modal { padding: 32px 22px 26px; }
  .modal-tos-inner { padding: 28px 20px 22px; }
  .legal-page .card { padding: 32px 20px 26px; }
  .btn { letter-spacing: 0.18em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulseGlow {
  from { text-shadow: 0 0 30px rgba(var(--shell-rgb),0.15), 0 0 60px rgba(42,127,140,0.2); }
  to   { text-shadow: 0 0 50px rgba(var(--shell-rgb),0.4),  0 0 100px rgba(42,127,140,0.45); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: scale(1) translate(0,0); } to { transform: scale(1.06) translate(-1.5%, -1%); } }

/* ═══════════════════════════════════════════
   Home page layout + gallery
═══════════════════════════════════════════ */
body#homepage .stage { padding: 40px 16px 72px; }

.home-layout {
  display: grid;
  grid-template-columns: 440px minmax(0, 640px);
  gap: 36px;
  align-items: center;
  width: min(1116px, 100%);
}
.home-layout .card { width: 100%; }

.gallery {
  position: relative;
  padding: 26px 26px 20px;
  background: rgba(4,12,17,0.78);
  border: 1px solid rgba(var(--shell-rgb),0.2);
  backdrop-filter: blur(16px);
  animation: fadeUp 1.1s 0.15s cubic-bezier(0.16,1,0.3,1) both;
}
.gallery::before { content: ''; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px; border: 2px solid var(--shell); border-right: none; border-bottom: none; opacity: 0.55; }
.gallery::after  { content: ''; position: absolute; bottom: -1px; right: -1px; width: 22px; height: 22px; border: 2px solid var(--shell); border-left: none; border-top: none; opacity: 0.55; }

.gallery-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.gallery-head .eyebrow { margin-bottom: 0; }
.gallery-count { font-family: 'Cinzel Decorative', serif; font-size: 10px; letter-spacing: 0.2em; color: var(--foam); opacity: 0.6; font-variant-numeric: tabular-nums; }

.gallery-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0b1a20 0%, #02070a 100%);
  border: 1px solid rgba(var(--shell-rgb),0.12);
  cursor: pointer;
}
.gallery-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; transform: scale(1.03);
  transition: opacity 1.1s ease, transform 7s ease-out;
}
.gallery-slide.visible { opacity: 1; transform: scale(1); }

.gallery-progress { height: 1px; background: rgba(var(--shell-rgb),0.12); margin-top: 12px; overflow: hidden; }
.gallery-progress span { display: block; height: 100%; width: 0; background: var(--shell); opacity: 0.7; }
.gallery-progress span.run { animation: galleryProgress var(--gallery-ms, 6000ms) linear forwards; }
.gallery.paused .gallery-progress span.run { animation-play-state: paused; }

.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.gallery-btn {
  flex-shrink: 0; width: 38px; height: 38px; cursor: pointer;
  background: transparent; color: var(--foam);
  border: 1px solid rgba(var(--shell-rgb),0.25);
  font-family: 'Cormorant Garamond', serif; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.gallery-btn:hover { border-color: rgba(var(--shell-rgb),0.6); color: var(--pearl); }
.gallery-btn:focus-visible, .gallery-dot:focus-visible { outline: 1px solid var(--shell); outline-offset: 3px; }

.gallery-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gallery-dot {
  width: 22px; height: 22px; padding: 0; cursor: pointer;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
}
.gallery-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  border: 1px solid rgba(var(--shell-rgb),0.4); transition: all 0.3s;
}
.gallery-dot:hover::before { border-color: var(--shell); }
.gallery-dot.active::before { background: var(--shell); border-color: var(--shell); box-shadow: 0 0 8px rgba(var(--shell-rgb),0.5); }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.92); align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; animation: fadeUp 0.3s ease both; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border: 1px solid rgba(var(--shell-rgb),0.2); }

@media (max-width: 1100px) {
  .home-layout { grid-template-columns: minmax(0, 560px); justify-content: center; gap: 24px; }
}
@media (max-width: 520px) {
  .gallery { padding: 18px 14px 14px; }
  .gallery-dots { gap: 2px; }
  .gallery-dot { width: 12px; height: 20px; }
  .gallery-dot::before { width: 5px; height: 5px; }
  .gallery-btn { width: 34px; height: 34px; }
}

@keyframes galleryProgress { from { width: 0; } to { width: 100%; } }
