/* ═══════════════════════════════════════════════════════════
   MATCHED BY STARS — Global Stylesheet
   Aesthetic: Deep dark gold luxury, Cormorant Garamond + DM Sans
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --gold: #C9A84C;
  --gold-light: #E8D5A3;
  --gold-dim: rgba(201,168,76,0.15);
  --gold-border: rgba(201,168,76,0.25);
  --dark: #0E0D0B;
  --dark2: #1A1814;
  --dark3: #252219;
  --dark4: #2E2A1F;
  --text: #F0EAD6;
  --text-muted: #9A9078;
  --text-soft: #C8BFA8;
  --accent: #8B6914;
  --error: #C0392B;
  --success: #27AE60;
  --radius: 0px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.15;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

em { color: var(--gold); font-style: italic; }
strong { font-weight: 500; color: var(--text); }

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

p { color: var(--text-soft); line-height: 1.85; }

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14,13,11,0.97);
  border-bottom: 1px solid var(--gold-border);
  transition: all 0.3s ease;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .star-mark { color: var(--gold); font-size: 0.9rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-login {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}
.nav-login:hover { color: var(--gold); }

.nav-register {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--gold);
  padding: 10px 22px;
  text-decoration: none;
  transition: all 0.25s;
  font-weight: 500;
}
.nav-register:hover { background: var(--gold-light); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  transition: all 0.3s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 65px; left: 0; right: 0;
  background: rgba(14,13,11,0.99);
  border-bottom: 1px solid var(--gold-border);
  padding: 24px 32px;
  z-index: 499;
  flex-direction: column;
  gap: 20px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}
.nav-mobile a:hover { color: var(--gold); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 40px;
  text-decoration: none;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover {
  background: transparent;
  color: var(--gold);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-soft);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 40px;
  text-decoration: none;
  border: 1px solid var(--gold-border);
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-text {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: 'DM Sans', sans-serif;
}

/* ── SECTION LAYOUT ── */
.section {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-full {
  padding: 100px 48px;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: block;
}

/* ── DIVIDER ── */
.divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 24px auto;
}
.divider.left { margin-left: 0; }

/* ── FORM ELEMENTS ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input, select, textarea {
  background: var(--dark3);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

select option {
  background: var(--dark3);
  color: var(--text);
}

textarea { resize: vertical; min-height: 120px; }

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  letter-spacing: 0.05em;
}

.form-success {
  font-size: 0.78rem;
  color: var(--success);
  letter-spacing: 0.05em;
}

/* ── ALERT MESSAGES ── */
.alert {
  padding: 14px 20px;
  border-left: 3px solid;
  font-size: 0.88rem;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}
.alert-error { border-color: var(--error); background: rgba(192,57,43,0.1); color: #e0826e; }
.alert-success { border-color: var(--success); background: rgba(39,174,96,0.1); color: #5eca88; }
.alert-info { border-color: var(--gold); background: var(--gold-dim); color: var(--gold-light); }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding: 160px 48px 80px;
  text-align: center;
  background: linear-gradient(to bottom, var(--dark2) 0%, var(--dark) 100%);
  border-bottom: 1px solid var(--gold-border);
}
.page-header h1 { margin-bottom: 16px; }
.page-header p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ── STAR DECORATION ── */
.stars-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.star-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: twinkle var(--d, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FADE ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── FOOTER ── */
footer {
  background: var(--dark2);
  border-top: 1px solid var(--gold-border);
  padding: 64px 48px 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-brand .footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-brand p { font-size: 0.9rem; max-width: 280px; line-height: 1.7; }
.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(201,168,76,0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }
.footer-bottom a { color: var(--text-muted); font-size: 0.78rem; }
.footer-bottom a:hover { color: var(--gold); }

/* ── LOADING SPINNER ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gold-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CARD ── */
.card {
  background: var(--dark2);
  border: 1px solid var(--gold-border);
  padding: 40px;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(201,168,76,0.5); }

/* ── TOAST NOTIFICATION ── */
#toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  background: var(--dark3);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--text-soft);
  max-width: 340px;
  animation: fadeIn 0.3s ease;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.toast.toast-error { border-left-color: var(--error); }
.toast.toast-success { border-left-color: var(--success); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  
  .section { padding: 70px 24px; }
  .section-full { padding: 70px 24px; }
  .page-header { padding: 120px 24px 60px; }
  
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  footer { padding: 56px 24px 32px; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .nav { padding: 16px 20px; }
}
