/* Aetheria shared UI — gold + black brand palette */
:root {
  --aetheria-ink: #1a1c1a;
  --aetheria-ink-soft: #2b2a24;
  --aetheria-gold-dark: #3a2e0f;
  --aetheria-gold: #775a19;
  --aetheria-gold-light: #c5a059;
  --aetheria-cream: #fbf6ea;
}

/* The pure Buy-Now gradient (same as the login page "luxury-gradient") */
.luxury-gradient {
  background: linear-gradient(45deg, var(--aetheria-gold) 0%, var(--aetheria-gold-light) 100%);
}

/* The Buy-Now CTA — pure gold, most prominent */
.btn-luxury {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(45deg, var(--aetheria-gold) 0%, var(--aetheria-gold-light) 100%);
  box-shadow: 0 8px 20px -12px rgba(119, 90, 25, 0.6);
  transition: opacity .2s ease, transform .15s ease, box-shadow .2s ease;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-luxury:hover { opacity: .92; }
.btn-luxury:active { transform: scale(.99); }

/* Primary button — Buy-Now gold mixed with black. Use everywhere. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(45deg, var(--aetheria-ink) 0%, var(--aetheria-gold) 65%, var(--aetheria-gold-light) 100%);
  box-shadow: 0 8px 24px -14px rgba(26, 28, 26, 0.7);
  transition: opacity .2s ease, transform .15s ease, box-shadow .2s ease;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { opacity: .92; box-shadow: 0 10px 26px -12px rgba(26,28,26,0.7); }
.btn-primary:active { transform: scale(.99); }

/* Dark variant of primary — for subtle surfaces */
.btn-primary-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(45deg, #000 0%, var(--aetheria-ink) 50%, var(--aetheria-gold) 100%);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s ease;
}
.btn-primary-dark:hover { opacity: .92; }

/* Outline (secondary) — gold border on white */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--aetheria-gold);
  background: #fff;
  border: 1px solid var(--aetheria-gold);
  transition: background .2s ease, color .2s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover { background: var(--aetheria-cream); color: var(--aetheria-gold-dark); }

/* Ghost (tertiary) — low emphasis text link that still feels on-brand */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--aetheria-gold);
  background: transparent;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--aetheria-cream); border-color: var(--aetheria-gold-light); color: var(--aetheria-gold-dark); }

/* Destructive — for delete/remove, but still in brand */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #991b1b;
  background: #fff;
  border: 1px solid #fecaca;
  transition: background .2s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-danger:hover { background: #fef2f2; }

/* Form accent: gold focus rings on inputs */
.input-brand:focus {
  outline: 0;
  border-color: var(--aetheria-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .25);
}

/* Brand text accents */
.text-gold { color: var(--aetheria-gold); }
.text-gold-light { color: var(--aetheria-gold-light); }
.bg-cream { background: var(--aetheria-cream); }

/* --------------------------------------------------------------------
 * Responsive helpers — mobile nav drawer, tap targets, overflow guards
 * ------------------------------------------------------------------ */

/* Never let the page scroll horizontally just because of one rogue element. */
html, body { max-width: 100%; overflow-x: hidden; }

/* Make icon buttons at least 44x44 on touch — Apple/Google guideline. */
.tap-target { min-width: 44px; min-height: 44px; }

/* Hamburger toggle — only visible on small screens. */
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn svg { width: 22px; height: 22px; }
@media (min-width: 768px) {
  .menu-btn { display: none; }
}

/* Mobile drawer.  On desktop, [data-menu] behaves as a normal inline nav. */
@media (max-width: 767px) {
  [data-menu] {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(84vw, 320px);
    background: #fff;
    color: var(--aetheria-ink);
    padding: 72px 24px 28px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
    z-index: 60;
    box-shadow: -20px 0 40px -20px rgba(0,0,0,0.25);
    overflow-y: auto;
  }
  [data-menu].is-open { transform: translateX(0); }

  /* Stretch the links and give them tap-friendly height. */
  [data-menu] > a,
  [data-menu] > form > button,
  [data-menu] > button {
    display: flex; align-items: center;
    min-height: 48px; padding: 12px 4px;
    font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--aetheria-ink) !important;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    width: 100%;
  }
  [data-menu] > a:last-of-type { border-bottom: 0; }

  /* Scrim behind the drawer. */
  body.menu-open { overflow: hidden; }
  body.menu-open::before {
    content: ''; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 55;
    animation: menuScrim .25s ease-out both;
  }
  @keyframes menuScrim {
    from { opacity: 0; } to { opacity: 1; }
  }

  /* Close-drawer "X" button inside the menu. */
  [data-menu-close] {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; cursor: pointer;
    font-size: 24px; color: var(--aetheria-ink);
  }
}
@media (min-width: 768px) {
  [data-menu-close] { display: none; }
}

/* Dark-nav variant (for the landing page's translucent top bar). */
@media (max-width: 767px) {
  .menu-dark[data-menu] {
    background: #1a1c1a;
    color: #faf9f6;
  }
  .menu-dark[data-menu] > a,
  .menu-dark[data-menu] > form > button,
  .menu-dark[data-menu] > button {
    color: #faf9f6 !important;
    border-bottom-color: rgba(255,255,255,0.08);
  }
  .menu-dark[data-menu] [data-menu-close] { color: #faf9f6; }
}

/* Use safe-area insets so nothing sits under the iPhone notch. */
@supports (padding: max(0px)) {
  .safe-px {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

