/* ═══════════════════════════════════════════════════════════
   TERMS PAGE — TAROTOPIA
   terms.css  (base + terms-specific styles)
═══════════════════════════════════════════════════════════ */

/* ── TOKENS & RESET ──────────────────────────────────────── */

:root {
  --bg-dark:    #030214;
  --bg-purple:  #1D093A;
  --main-purple:#3C0753;
  --gold:       #C9A84C;
  --gold-hover: #dbbe6a;
  --pink:       #C37F9F;
  --soft:       #B8AFD4;
  --deep-blue:  #030637;
  --rose-line:  rgba(195,127,159,0.78);
  --gold-glow:  rgba(219,190,106,0.42);
  --shadow-violet: rgba(60,7,83,0.42);
  --transition: cubic-bezier(.22,1,.36,1);
}

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

html {
  scroll-behavior: smooth;
}

body,
button,
input,
textarea,
select,
a {
  font-family: "Prata", serif;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  color: white;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(60,7,83,0.52), transparent 70%),
    radial-gradient(circle at bottom, rgba(201,168,76,0.08), transparent 30%),
    linear-gradient(180deg, #030214 0%, #07041A 40%, #030214 100%);
  background-attachment: fixed;
}

.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  filter: blur(120px);
  background: radial-gradient(
    circle at center,
    rgba(110,40,160,0.22),
    transparent 50%
  );
}

#starCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ── NAVBAR ──────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: -4px;
  left: 0;
  width: 100%;
  z-index: 50;
  transition:
    transform 0.55s var(--transition),
    padding 0.55s var(--transition),
    opacity 0.35s ease;
}

.navbar.scrolled {
  padding-top: 14px;
}

.navbar.scrolled .nav-inner {
  width: min(1220px, calc(100% - 40px));
  border-radius: 25px;
  background: rgba(8,8,18,0.65);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 40px rgba(80,20,120,0.2);
  backdrop-filter: blur(20px);
}

.nav-inner {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    width 0.55s var(--transition),
    background 0.55s ease,
    border-color 0.55s ease,
    backdrop-filter 0.55s ease,
    box-shadow 0.55s ease,
    transform 0.45s var(--transition);
}

.logo-wrap {
  flex: 0 0 auto;
}

.logo-wrap img {
  display: block;
  width: auto;
  height: 76px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 8px rgba(201,168,76,0.25))
    drop-shadow(0 0 20px rgba(195,127,159,0.18));
  transition:
    filter 0.35s ease,
    transform 0.35s var(--transition);
}

.navbar.scrolled .logo-wrap img {
  transform: scale(0.96);
}

.logo-wrap:hover img,
.logo-wrap:focus-visible img {
  transform: translateY(-1px);
  filter:
    drop-shadow(0 0 10px rgba(219,190,106,0.72))
    drop-shadow(0 0 28px rgba(219,190,106,0.38))
    drop-shadow(0 0 42px rgba(195,127,159,0.18));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
  margin-left: auto;
}

.desktop-nav a,
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  padding: 10px 2px;
  border: 0;
  background: none;
  color: var(--soft);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  font-family: "Prata", serif;
  text-shadow: 0 0 14px rgba(184,175,212,0.08);
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease,
    transform 0.3s var(--transition);
}

.desktop-nav a:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger {
  color: var(--gold-hover);
  text-shadow:
    0 0 10px rgba(219,190,106,0.62),
    0 0 24px rgba(219,190,106,0.3);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  min-width: 170px;
  padding: 12px;
  border: 1px solid rgba(219,190,106,0.24);
  background:
    linear-gradient(135deg, rgba(3,6,55,0.9), rgba(60,7,83,0.72)),
    radial-gradient(circle at top, rgba(219,190,106,0.1), transparent 58%);
  box-shadow:
    0 0 24px rgba(219,190,106,0.12),
    0 20px 52px rgba(3,6,55,0.5);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s var(--transition);
}

.nav-dropdown-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-dropdown-panel a {
  width: 100%;
  justify-content: center;
  padding: 11px 14px;
  font-size: 14px;
  letter-spacing: 0.8px;
}

/* ── SECTION DIVIDER ─────────────────────────────────────── */

.section-divider {
  width: min(320px, 70vw);
  margin: 0 auto 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(219,190,106,0.58));
}

.section-divider-line-right {
  background: linear-gradient(to left, transparent, rgba(219,190,106,0.58));
}

.section-divider-star {
  color: var(--gold-hover);
  font-size: 15px;
  line-height: 1;
  text-shadow:
    0 0 10px rgba(219,190,106,0.56),
    0 0 28px rgba(219,190,106,0.24);
}

/* ── MOBILE MENU ─────────────────────────────────────────── */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    transform 0.25s var(--transition);
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  color: var(--gold-hover);
  text-shadow: 0 0 18px rgba(219,190,106,0.58);
  transform: translateY(-1px);
  outline: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  background: rgba(5,5,15,0.92);
  backdrop-filter: blur(20px);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--soft);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.mobile-close:hover {
  color: var(--gold-hover);
  text-shadow: 0 0 16px rgba(219,190,106,0.55);
}

.mobile-menu-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.mobile-menu-content a,
.mobile-contact-group span {
  text-decoration: none;
  color: var(--soft);
  font-size: 20px;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease,
    transform 0.2s var(--transition);
}

.mobile-menu-content a:hover {
  color: var(--gold-hover);
  text-shadow:
    0 0 12px rgba(219,190,106,0.58),
    0 0 28px rgba(219,190,106,0.24);
  transform: translateY(-1px);
}

.mobile-contact-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.mobile-contact-group span {
  color: var(--gold-hover);
  font-family: "Grenze", serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(219,190,106,0.34);
}

.mobile-contact-group a {
  font-size: 18px;
}

/* ── FOOTER ──────────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(219,190,106,0.16);
  background:
    linear-gradient(180deg, transparent, rgba(3,6,55,0.58)),
    radial-gradient(circle at top, rgba(60,7,83,0.2), transparent 58%);
}

.footer-inner {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 42px;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 10px;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 58px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 8px rgba(201,168,76,0.22))
    drop-shadow(0 0 18px rgba(195,127,159,0.14));
  transition:
    filter 0.3s ease,
    transform 0.3s var(--transition);
}

.footer-logo:hover img,
.footer-logo:focus-visible img {
  transform: translateY(-1px);
  filter:
    drop-shadow(0 0 10px rgba(219,190,106,0.6))
    drop-shadow(0 0 24px rgba(219,190,106,0.26));
}

.footer-tagline {
  color: var(--soft);
  font-size: 14px;
  opacity: 0.78;
}

.footer-links {
  margin: 28px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    transform 0.25s var(--transition);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-hover);
  text-shadow:
    0 0 10px rgba(219,190,106,0.5),
    0 0 24px rgba(219,190,106,0.2);
  transform: translateY(-1px);
}

.footer-copy {
  color: rgba(184,175,212,0.58);
  font-size: 12px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   TERMS-SPECIFIC STYLES
═══════════════════════════════════════════════════════════ */

.terms-page {
  position: relative;
  z-index: 10;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 170px 0 120px;
}

/* ── HERO ────────────────────────────────────────────────── */

.terms-hero {
  position: relative;
  margin: 0 auto 72px;
  text-align: center;
  max-width: 860px;
}

.terms-hero::before {
  content: "✦";
  position: absolute;
  top: -72px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-hover);
  font-size: 54px;
  line-height: 1;
  text-shadow:
    0 0 16px rgba(219,190,106,0.35),
    0 0 48px #FFF6DE;
  opacity: 0.9;
}

.terms-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--pink);
  font-family: "Grenze", serif;
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.9;
}

.terms-kicker::before,
.terms-kicker::after {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(219,190,106,0.65));
}

.terms-title {
  margin: 22px auto 20px;
  color: var(--gold);
  font-family: "Grenze", serif;
  font-size: clamp(46px, 5vw, 78px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0.5px;
  text-shadow:
    0 0 18px rgba(201,168,76,0.22),
    0 0 54px rgba(219,190,106,0.12);
}

.terms-meta {
  color: var(--pink);
  font-family: "Grenze", serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
}

.terms-intro {
  max-width: 760px;
  margin: 28px auto 0;
  color: var(--soft);
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.9;
  opacity: 0.88;
}

/* ── SECTION STACK ───────────────────────────────────────── */

.terms-stack {
  display: grid;
  gap: 30px;
}

/* ── CARD ────────────────────────────────────────────────── */

.terms-card {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: 8px;
  border: 1px solid rgba(201,168,76,0.14);
  background:
    linear-gradient(135deg, rgba(3,6,55,0.96), rgba(60,7,83,0.55)),
    radial-gradient(circle at top right, rgba(195,127,159,0.07), transparent 42%);
  box-shadow:
    0 24px 72px rgba(3,6,55,0.24),
    inset 0 1px 0 rgba(255,255,255,0.03);
  backdrop-filter: blur(18px);
  transition:
    transform 0.35s var(--transition),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.terms-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at top, rgba(219,190,106,0.08), transparent 55%);
  transition: opacity 0.35s ease;
}

.terms-card:hover {
  transform: translateY(-4px);
  border-color: rgba(219,190,106,0.38);
  box-shadow:
    0 0 18px rgba(219,190,106,0.08),
    0 0 44px rgba(219,190,106,0.06),
    0 26px 80px rgba(60,7,83,0.34);
}

.terms-card:hover::before {
  opacity: 1;
}

.terms-card > * {
  position: relative;
  z-index: 1;
}

/* ── HEADINGS ────────────────────────────────────────────── */

.terms-card h2 {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 18px;
  color: var(--gold);
  font-family: "Grenze", serif;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 500;
  letter-spacing: 0.4px;
  text-shadow: 0 0 18px rgba(219,190,106,0.12);
}

.terms-card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, rgba(219,190,106,0.65), transparent);
}

.terms-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 16px;
  color: var(--gold-hover);
  font-family: "Grenze", serif;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 500;
}

.terms-card h3::before {
  content: "✦";
  color: var(--gold);
  font-size: 16px;
  text-shadow: 0 0 12px rgba(219,190,106,0.4);
}

.terms-card h4 {
  margin: 24px 0 12px;
  color: var(--pink);
  font-family: "Grenze", serif;
  font-size: 22px;
  font-weight: 500;
}

/* ── BODY TEXT ───────────────────────────────────────────── */

.terms-card p,
.terms-card li,
.terms-definitions dt,
.terms-definitions dd {
  color: var(--soft);
  font-size: 15.5px;
  line-height: 1.95;
}

.terms-card p {
  opacity: 0.92;
}

.terms-card p + p {
  margin-top: 18px;
}

.terms-card ul,
.terms-card ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
  padding-left: 28px;
}

.terms-card li::marker {
  color: var(--gold-hover);
}

/* ── DEFINITION BLOCK ────────────────────────────────────── */

.terms-definitions {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 12px 14px;
  align-items: stretch;
  margin-top: 22px;
}

.terms-definitions div,
.terms-definitions dt {
  margin: 0;
}

.terms-definitions dt {
  color: var(--gold-hover);
  font-family: "Grenze", serif;
  font-size: 22px;
}

.terms-definitions dd {
  margin-left: 0;
  opacity: 0.9;
}

.terms-definitions dt,
.terms-definitions dd {
  position: relative;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
}

/* ── NOTE BOX ────────────────────────────────────────────── */

.terms-note {
  margin-top: 20px !important;
  padding: 20px 24px;
  border-radius: 8px;
  border: 1px solid rgba(195,127,159,0.16);
  background: linear-gradient(135deg, rgba(195,127,159,0.10), rgba(60,7,83,0.08));
  color: #d5cce9;
}

/* ── DIVIDER OVERRIDE ────────────────────────────────────── */

.section-divider {
  margin-bottom: 58px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 768px) {

  .background-glow {
    filter: blur(60px);
    background: radial-gradient(circle at center, rgba(110,40,160,0.16), transparent 54%);
  }

  .desktop-nav  { display: none; }
  .menu-toggle  { display: block; }

  .nav-inner {
    width: 100%;
    justify-content: center;
    position: relative;
  }

  .menu-toggle {
    position: absolute;
    right: 18px;
  }

  .logo-wrap img {
    width: auto;
    height: 62px;
    filter: none;
  }

  .logo-wrap:hover img,
  .logo-wrap:focus-visible img { filter: none; }

  .navbar.scrolled .nav-inner,
  .mobile-menu { backdrop-filter: blur(12px); }

  .footer-inner {
    width: min(100% - 36px, 620px);
    padding: 38px 0 34px;
  }

  .footer-logo img {
    height: 48px;
    filter: none;
  }

  .footer-links { gap: 16px 20px; }

  /* terms */
  .terms-page {
    width: calc(100% - 28px);
    padding-top: 138px;
  }

  .terms-title {
    font-size: 42px;
    line-height: 1.02;
  }

  .terms-intro {
    font-size: 15px;
    line-height: 1.8;
  }

  .terms-card {
    padding: 26px 22px;
    border-radius: 8px;
  }

  .terms-card h2 { font-size: 32px; }
  .terms-card h3 { font-size: 25px; }
  .terms-card h4 { font-size: 20px; }

  .terms-card p,
  .terms-card li,
  .terms-definitions dt,
  .terms-definitions dd {
    font-size: 14.5px;
    line-height: 1.85;
  }

  .terms-definitions {
    grid-template-columns: minmax(104px, 0.4fr) minmax(0, 1fr);
    gap: 10px;
  }

  .terms-definitions dt,
  .terms-definitions dd {
    padding: 14px;
  }

  .terms-hero::before {
    top: -54px;
    font-size: 40px;
    text-shadow:
      0 0 12px rgba(219,190,106,0.3),
      0 0 32px rgba(255,246,222,0.42);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}