/* =====================================================
   Astra Rare Gems — Luxury gemstone marketing site styles
   ===================================================== */

/* Design tokens */
:root {
  --bg: #0a050c;
  --surface: #14101a;
  --surface-2: #1c1624;
  --text: #f4f0f7;
  --text-muted: #b6aabf;
  --gold: #d4af37;
  --gold-light: #f0d77a;
  --gold-dark: #8f7518;
  --accent: #b16cff;
  --accent-2: #4fd1ff;
  --ring: rgba(212, 175, 55, 0.5);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 16px;
  --max-width: 1240px;
  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="light"] {
  --bg: #f8f5fa;
  --surface: #ffffff;
  --surface-2: #f0ebf5;
  --text: #1a0f1f;
  --text-muted: #5c4f66;
  --gold: #8f7518;
  --gold-light: #d4af37;
  --gold-dark: #5c4a10;
  --accent: #7e39c4;
  --accent-2: #0077a3;
  --ring: rgba(143, 117, 24, 0.45);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold-light);
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
}

button, input, select, textarea {
  font: inherit;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--gold);
  color: #000;
  padding: 0.5rem 1rem;
  transform: translateY(-100%);
  transition: transform 0.2s;
  z-index: 10000;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(10, 5, 12, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, border-color 0.3s;
}

[data-theme="light"] .site-header {
  background: rgba(248, 245, 250, 0.82);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand-icon {
  color: var(--gold);
  font-size: 1.1rem;
}

.brand-word {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-sub {
  font-size: 0.75em;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.35rem;
}

.main-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
  color: var(--gold-light);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover, .icon-btn:focus {
  transform: translateY(-2px);
  border-color: var(--gold);
  outline: none;
}

.cart-toggle {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 1.25rem;
  z-index: 999;
  transform: translateY(-120%);
  transition: transform 0.3s ease;
}

.mobile-menu[aria-hidden="false"] {
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu a {
  color: var(--text);
  font-size: 1.1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 8rem 1.25rem 6rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(177, 108, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(79, 209, 255, 0.14) 0%, transparent 55%),
    linear-gradient(135deg, #0a050c 0%, #1a0f22 50%, #0f0812 100%);
}

[data-theme="light"] .hero {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(177, 108, 255, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(79, 209, 255, 0.08) 0%, transparent 55%),
    linear-gradient(135deg, #f8f5fa 0%, #e8e0ef 50%, #f0ebf5 100%);
}

#sparkle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.hero-gem {
  display: flex;
  justify-content: center;
  order: 2;
}

.hero-text {
  order: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.65rem;
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.65em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(90deg, var(--gold-light), var(--accent-2), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 1.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn:hover, .btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
  border-color: var(--gold-light);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border-color: var(--gold);
}

.btn-outline:hover, .btn-outline:focus {
  background: var(--gold);
  color: #000;
}

.btn-block { width: 100%; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-dark);
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 2px solid var(--gold);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.scroll-hint span {
  display: block;
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollBounce 1.5s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* Gem visual */
.gem-large {
  position: relative;
  width: min(38vw, 360px);
  height: min(38vw, 360px);
  border-radius: 28% 72% 45% 55% / 52% 42% 58% 48%;
  box-shadow:
    inset -20px -20px 60px rgba(0, 0, 0, 0.6),
    inset 10px 10px 40px rgba(255, 255, 255, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(212, 175, 55, 0.25);
  animation: gemFloat 6s ease-in-out infinite;
  overflow: hidden;
}

.gem-large.gem-secondary {
  width: min(32vw, 280px);
  height: min(32vw, 280px);
  border-radius: 55% 45% 60% 40% / 40% 60% 30% 70%;
}

@keyframes gemFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(2deg); }
}

.gem-stone {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, #d4af37 0%, #8a1c1c 40%, #3a0505 100%);
  opacity: 0.92;
}

.gem-facet {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.22) 48%, transparent 52%),
    linear-gradient(210deg, transparent 40%, rgba(255,255,255,0.14) 48%, transparent 52%),
    linear-gradient(30deg, transparent 40%, rgba(255,255,255,0.08) 48%, transparent 52%);
}

.gem-shine {
  position: absolute;
  top: -30%;
  left: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 60%);
  animation: shineMove 7s linear infinite;
  pointer-events: none;
}

@keyframes shineMove {
  0% { transform: translate(-20%, -20%) rotate(0deg); }
  100% { transform: translate(80%, 80%) rotate(360deg); }
}

/* Sections */
section {
  padding: 5.5rem 1.25rem;
}

.section-head {
  max-width: var(--max-width);
  margin: 0 auto 2.5rem;
}

.section-head.centered {
  text-align: center;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: -0.4rem;
}

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Trust ribbon */
.trust-ribbon {
  padding: 3rem 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.trust-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.trust-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
}

.trust-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Spotlight */
.spotlight-card {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.25rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
}

.spotlight-visual {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

.spotlight-visual .gem-stone,
.spotlight-visual .gem-facet,
.spotlight-visual .gem-shine {
  border-radius: 0;
}

.spotlight-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.spotlight-info h3 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.spotlight-origin {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.spotlight-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Catalog controls */
.controls {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
}

.search-box input:focus {
  outline: 2px solid var(--ring);
  border-color: var(--gold);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.filter select {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.filter select:focus {
  outline: 2px solid var(--ring);
}

.results-count {
  max-width: var(--max-width);
  margin: 0 auto 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Gem grid */
.gem-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gem-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
  cursor: pointer;
}

.gem-card:hover, .gem-card:focus-within {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.gem-card:focus-within {
  outline: 2px solid var(--ring);
}

.gem-card-visual {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.gem-card-stone {
  position: absolute;
  inset: 0;
}

.gem-card-facet {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.18) 48%, transparent 52%),
    linear-gradient(210deg, transparent 40%, rgba(255,255,255,0.10) 48%, transparent 52%);
}

.rarity-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gem-card-info {
  padding: 1.25rem;
}

.gem-card-info h3 {
  margin-bottom: 0.15rem;
}

.gem-card-origin {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.gem-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.gem-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.gem-card-carat {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gem-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.gem-card-actions {
  display: flex;
  gap: 0.6rem;
}

.gem-card-actions .btn {
  flex: 1;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
}

/* About */
.about {
  background: var(--surface);
}

.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.about-list li {
  padding: 0.45rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text);
}

.about-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* Testimonials carousel */
.carousel {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial {
  min-width: 100%;
  padding: 0 1rem;
  text-align: center;
  opacity: 0.25;
  transition: opacity 0.4s;
}

.testimonial.active {
  opacity: 1;
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  margin: 0 0 1rem;
  color: var(--text);
}

.testimonial figcaption {
  color: var(--gold);
  font-weight: 600;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.carousel-btn:hover, .carousel-btn:focus {
  background: var(--gold);
  color: #000;
  outline: none;
}

.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }

/* Care */
.care-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.care-card {
  padding: 1.5rem;
}

.care-card h3 {
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.care-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* FAQ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  padding: 1rem 1.25rem;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold);
  transition: transform 0.25s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

/* Contact */
.contact-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.contact-form {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--ring);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff6b6b;
}

.error {
  color: #ff6b6b;
  font-size: 0.82rem;
  display: none;
}

.error.visible { display: block; }

.form-success {
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Newsletter */
.newsletter {
  padding-top: 2rem;
}

.newsletter-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.newsletter-form input {
  flex: 1 1 260px;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
}

.newsletter-form input:focus {
  outline: 2px solid var(--ring);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 1.25rem 2rem;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-grid h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid a {
  color: var(--text-muted);
}

.footer-grid a:hover, .footer-grid a:focus {
  color: var(--gold-light);
}

.socials {
  display: flex;
  gap: 0.75rem;
}

.socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.socials a:hover, .socials a:focus {
  background: var(--gold);
  color: #000;
  text-decoration: none;
}

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Cart drawer */
.cart-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1100;
}

.cart-overlay.active,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer,
.product-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1200;
  display: flex;
  flex-direction: column;
}

.product-modal {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(820px, 92vw);
  height: auto;
  max-height: 90vh;
  border-radius: var(--radius);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
}

.product-modal[aria-hidden="false"],
.product-modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer[aria-hidden="false"],
.cart-drawer.active {
  transform: translateX(0);
}

.cart-header,
.modal-body {
  padding: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.cart-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.cart-info h4 {
  font-size: 0.95rem;
  margin: 0;
}

.cart-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cart-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.cart-qty button:hover, .cart-qty button:focus {
  border-color: var(--gold);
}

.cart-qty span {
  min-width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.cart-remove {
  background: transparent;
  border: none;
  color: #ff6b6b;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--glass-border);
  background: var(--surface-2);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.cart-subtotal strong {
  color: var(--gold);
}

.checkout-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.6rem 0 0;
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover, .close-btn:focus {
  border-color: var(--gold);
  outline: none;
}

/* Product modal */
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  padding: 2rem;
  border: none;
}

.modal-visual {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal-info h2 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.modal-origin {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.modal-desc {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.spec {
  background: var(--surface-2);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.spec-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.spec-value {
  font-weight: 700;
  color: var(--gold);
}

.modal-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quantity-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.25rem;
}

.quantity-picker button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.quantity-picker button:hover, .quantity-picker button:focus {
  background: var(--gold);
  color: #000;
}

.quantity-picker span {
  min-width: 24px;
  text-align: center;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-dark);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--gold);
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover, .back-to-top:focus {
  background: var(--gold);
  color: #000;
  outline: none;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal animations — hidden state only applies when JS runs (progressive enhancement) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-gem { order: 1; }
  .hero-text { order: 2; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .about-grid, .contact-grid, .modal-body { grid-template-columns: 1fr; }
  .care-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .spotlight-card { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 560px) {
  .gem-grid { grid-template-columns: 1fr; }
  .care-grid, .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .modal-body { padding: 1.25rem; }
  .modal-visual { min-height: 220px; }
}
