/* ============================================================
   MATCHED BY STARS — Global Stylesheet
   Fonts:   Cormorant Garamond (headings) + DM Sans (body)
   Palette: --gold #C9A84C  --dark #0E0D0B  --text #F0EAD6
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --gold:         #C9A84C;
  --gold-light:   #E8D5A3;
  --gold-dim:     rgba(201, 168, 76, 0.12);
  --gold-border:  rgba(201, 168, 76, 0.22);

  --dark:         #0E0D0B;
  --dark2:        #1A1814;
  --dark3:        #252219;
  --dark4:        #2E2A1F;

  --text:         #F0EAD6;
  --text-soft:    #C8BFA8;
  --text-muted:   #9A9078;

  --error:        #C0392B;
  --error-bg:     rgba(192, 57, 43, 0.10);
  --success:      #27AE60;
  --success-bg:   rgba(39, 174, 96, 0.10);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── BASE ───────────────────────────────────────────────── */
body {
  background: var(--dark);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: clip;
  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='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.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.45;
}

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

h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem,   4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw,  1.5rem); }

p   { color: var(--text-soft); line-height: 1.85; }
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 ease;
}
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ── NAVIGATION ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: rgba(14, 13, 11, 0.97);
  border-bottom: 1px solid var(--gold-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav__logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav__logo:hover { color: var(--gold-light); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--gold); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__link-plain {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__link-plain:hover { color: var(--gold); }

.nav__cta {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  background: var(--gold);
  padding: 10px 24px;
  transition: background 0.25s, color 0.25s;
  border: 1px solid var(--gold);
}
.nav__cta:hover {
  background: transparent;
  color: var(--gold);
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(14, 13, 11, 0.99);
  border-bottom: 1px solid var(--gold-border);
  padding: 28px 32px;
  z-index: 499;
  flex-direction: column;
  gap: 0;
}
.nav-mobile.is-open { display: flex; }

.nav-mobile a {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  transition: color 0.2s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover,
.nav-mobile a.is-active { color: var(--gold); }
.nav-mobile a.nav-mobile__cta { color: var(--gold); }

/* ── 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: 48px;
}
.footer__brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer__brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}
.footer__col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul a {
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__col ul a:hover { color: var(--gold); }
.footer__bottom {
  border-top: 1px solid rgba(201, 168, 76, 0.10);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.footer__legal {
  display: flex;
  gap: 24px;
}
.footer__legal a {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.footer__legal a:hover { color: var(--gold); }

/* ── LAYOUT HELPERS ─────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* When a container is a direct child of a .section, the section already
   provides horizontal padding — the container only needs to constrain width. */
.section > .container {
  padding-left: 0;
  padding-right: 0;
}

.section {
  padding: 100px 48px;
}
.section--dark2 { background: var(--dark2); }
.section--dark3 { background: var(--dark3); }

.section__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

/* Page header (inner pages) */
.page-header {
  padding: 148px 48px 80px;
  text-align: center;
  background: linear-gradient(to bottom, var(--dark2), var(--dark));
  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; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 15px 38px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.btn--primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--gold-border);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--full { width: 100%; }

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

.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  background: var(--dark3);
  border: 1px solid rgba(201, 168, 76, 0.18);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.25s ease;
  width: 100%;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}
input.is-error, select.is-error, textarea.is-error {
  border-color: var(--error);
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}
select option {
  background: var(--dark3);
  color: var(--text);
}
textarea {
  resize: vertical;
  min-height: 120px;
}

.field-error {
  font-size: 0.76rem;
  color: var(--error);
  letter-spacing: 0.04em;
  min-height: 16px;
}

/* Checkbox */
.checkbox-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 3px;
  accent-color: var(--gold);
  cursor: pointer;
}
.checkbox-wrap label {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1.6;
}
.checkbox-wrap label a { color: var(--gold); }

/* ── ALERT MESSAGES ─────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-left: 3px solid;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.alert--error   { border-color: var(--error);   background: var(--error-bg);   color: #e5897e; }
.alert--success { border-color: var(--success);  background: var(--success-bg); color: #6dd4a0; }
.alert--info    { border-color: var(--gold);     background: var(--gold-dim);   color: var(--gold-light); }

/* ── CARD ───────────────────────────────────────────────── */
.card {
  background: var(--dark2);
  border: 1px solid var(--gold-border);
  padding: 40px;
}

/* Auth card variant */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
}
.auth-box {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
}
.auth-header {
  text-align: center;
  margin-bottom: 40px;
}
.auth-header__mark {
  display: block;
  color: var(--gold);
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.auth-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 10px;
}
.auth-header p {
  font-size: 0.93rem;
  max-width: 380px;
  margin: 0 auto;
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--gold); }

/* ── STARS BACKGROUND ───────────────────────────────────── */
.stars-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 0.05; transform: scale(0.7); }
  50%       { opacity: 0.55; transform: scale(1.2); }
}

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

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

/* ── SPINNER ────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(201, 168, 76, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ──────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 13px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.is-visible { opacity: 1; }
.toast--success { background: var(--gold);  color: var(--dark); }
.toast--error   { background: var(--error); color: #fff; }

/* ── UTILITY ────────────────────────────────────────────── */
/* Strips button chrome — for action elements styled as links */
.btn-reset {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.btn-reset:hover { color: var(--gold); }

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

/* ── PASSWORD STRENGTH ──────────────────────────────────── */
.pw-strength-bar {
  height: 3px;
  background: var(--dark4);
  margin-top: 6px;
  transition: width 0.3s, background 0.3s;
  width: 0;
}
.pw-strength-label {
  font-size: 0.72rem;
  margin-top: 4px;
  color: var(--text-muted);
  min-height: 14px;
}

/* ── PASSWORD SHOW / HIDE TOGGLE ────────────────────────── */
.pw-input-wrap {
  position: relative;
}
.pw-input-wrap input {
  padding-right: 62px;
  width: 100%;
}
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-size: 0.68rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  user-select: none;
  -webkit-user-select: none;
}
.pw-toggle:hover { color: var(--gold); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav { padding: 0 24px; }
  .nav__links  { display: none; }
  .nav__actions { display: none; }
  .nav__burger { display: flex; }

  .section { padding: 72px 24px; }
  .container { padding: 0 24px; }
  .section > .container { padding-left: 0; padding-right: 0; }
  .page-header { padding: 120px 24px 60px; }

  .footer { padding: 56px 24px 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .auth-box .card { padding: 28px 20px; }
}
