/* Antherium — Enchanted, whimsical styling (earth-toned refresh) */
:root {
  --bg1: #e9e4da; /* warm ivory (slightly darker) */
  --bg2: #dee6de; /* sage mist (slightly darker) */
  --bg3: #efe0d1; /* soft sand (slightly darker) */
  --glass: rgba(255,255,255,0.6);
  --ink: #2e2a27; /* charcoal brown */
  --ink-soft: #5a524b; /* mushroom */
  --accent: #6f8f72;  /* moss */
  --accent-2: #c07a45; /* terracotta */
  --accent-3: #d9b36a; /* oat gold */
  --success: #7da07a;
  --shadow: 0 10px 30px rgba(34, 28, 20, 0.16);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  overflow-x: hidden;
}

/* Soft animated gradient background */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(900px 600px at 15% 15%, var(--bg2), transparent 55%),
              radial-gradient(900px 700px at 85% 25%, var(--bg3), transparent 55%),
              linear-gradient(180deg, var(--bg1), #f8f6f2 60%, var(--bg1));
  filter: saturate(0.9) brightness(0.97);
  animation: drift 22s ease-in-out infinite alternate;
  z-index: -3;
}

@keyframes drift {
  from { transform: translateY(-1%) translateX(0.5%); }
  to   { transform: translateY(1%)  translateX(-0.5%); }
}

/* Sparkle canvas */
#sparkle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

/* Frosted header */
.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px min(5vw, 36px);
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.28));
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid rgba(46, 42, 39, 0.12);
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); cursor: pointer; }
.brand:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; border-radius: 10px; }
.logo { height: 48px; width: auto; filter: drop-shadow(0 2px 6px rgba(34, 28, 20, 0.12)); }
.wordmark {
  font-family: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 350; /* thinner, more elegant */
  font-size: 32px;
  letter-spacing: 0.35px; /* a touch more air for a "fun yet refined" feel */
  color: var(--ink);
  line-height: 1;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 32;
  text-rendering: optimizeLegibility;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.nav a:hover {
  background: rgba(255,255,255,0.65);
  box-shadow: 0 6px 16px rgba(34, 28, 20, 0.12);
  color: var(--accent);
}

/* Collapsible nav (mobile) — only active when JS is enabled */
.nav-toggle { display: none; }
.nav-toggle {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(46, 42, 39, 0.15);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 10px 26px rgba(34, 28, 20, 0.12);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.nav-toggle:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(34, 28, 20, 0.14); }
.nav-toggle:active { transform: translateY(0); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }

.nav-toggle-icon {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: background .18s ease;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

/* When open, morph into an "X" */
.nav.is-open ~ .nav-toggle { /* fallback if ordering changes */ }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-header { position: sticky; }

  .js .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(46, 42, 39, 0.12);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(34, 28, 20, 0.18);
    backdrop-filter: blur(10px) saturate(1.15);
    z-index: 20;

    /* collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.985);
    transition: max-height .24s ease, opacity .2s ease, transform .2s ease;
  }

  .js .nav.is-open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .js .nav a {
    display: block;
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
  }
}

main { padding: min(6vw, 60px) min(5vw, 36px); }

.hero {
  text-align: center;
  padding: min(8vw, 80px) 0;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 10px 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 3px 14px rgba(34, 28, 20, 0.08);
}
.lead { font-size: clamp(16px, 1.8vw, 20px); color: var(--ink-soft); margin-bottom: 22px; }

.cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(46, 42, 39, 0.15);
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(34, 28, 20, 0.14); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: white;
  border: none;
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(111, 143, 114, 0.5); /* moss outline */
}
.btn.tiny { padding: 8px 12px; font-size: 14px; border-radius: 12px; }

/* Card grid */
.cards { margin-top: min(8vw, 70px); }
.cards h2 { text-align: center; margin-bottom: 16px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.50));
  border: 1px solid rgba(46, 42, 39, 0.10);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(34, 28, 20, 0.18); }
.card h3 { margin-top: 4px; margin-bottom: 6px; }
.card p { color: var(--ink-soft); margin-top: 0; margin-bottom: 14px; }

/* Card image styling for consistent, polished presentation */
.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #f3eee7; /* warm placeholder behind transparent PNGs */
  border: 1px solid rgba(46,42,39,0.08);
  box-shadow: 0 4px 14px rgba(34, 28, 20, 0.10);
  margin-bottom: 10px;
}

.card-shine {
  position: absolute;
  inset: -40% -40% auto auto;
  height: 140%; width: 140%;
  background: radial-gradient(500px 200px at 0% 0%, rgba(255,255,255,0.65), transparent 60%),
              radial-gradient(300px 200px at 40% 20%, rgba(208,165,96,0.12), transparent 70%),
              radial-gradient(300px 200px at 60% 40%, rgba(111,143,114,0.12), transparent 70%);
  transform: rotate(8deg);
  pointer-events: none;
}

/* Story & Promise */
.story, .promise {
  margin-top: min(10vw, 90px);
  max-width: 900px;
  margin-left: auto; margin-right: auto;
  padding: 0 min(2vw, 12px);
}
.story p { font-size: 18px; color: var(--ink-soft); }
.promise ul { list-style: none; padding: 0; margin: 0; }
.promise li { padding: 10px 14px; margin: 8px 0; background: rgba(255,255,255,0.6); border-radius: 14px; border: 1px solid rgba(46,42,39,0.08); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 28px;
  color: var(--ink-soft);
}

/* Fun subtle float for hero */
.hero .btn.primary { animation: softpulse 3s ease-in-out infinite; }
@keyframes softpulse { 0%,100%{ filter: saturate(1); } 50%{ filter: saturate(1.2) brightness(1.03); } }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .bg-gradient { animation: none; }
  .hero .btn.primary { animation: none; }
}

/* Subpage helpers */
.page-hero { text-align: center; padding: min(6vw, 60px) 0 10px; }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 6px 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero .lead { color: var(--ink-soft); max-width: 820px; margin: 0 auto; }

/* FAQ styling */
.faq { max-width: 900px; margin: 0 auto; }
.faq .faq-item {
  margin: 10px 0;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(46,42,39,0.10);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq .faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
}
.faq .faq-item[open] summary { background: rgba(255,255,255,0.55); }
.faq .faq-body { padding: 0 16px 16px; color: var(--ink-soft); }

/* Hide default marker in some browsers */
details > summary::-webkit-details-marker { display: none; }

/* Customizer styles */
.customize { margin-top: min(10vw, 90px); }
.customizer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.preview {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.55));
  border: 1px solid rgba(46,42,39,0.10);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.preview svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 20px rgba(34,28,20,0.12)); }

.controls {
  background: linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.50));
  border: 1px solid rgba(46,42,39,0.10);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
}
.controls .sliders { display: grid; gap: 10px; }
.controls label { font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.controls label span { color: var(--ink-soft); font-weight: 400; font-size: 0.9em; }

/* Range inputs */
.controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
/* Better track/slider aesthetics (where supported) */
@supports selector(input[type="range"]::-webkit-slider-thumb) {
  .controls input[type="range"] { -webkit-appearance: none; height: 6px; background: rgba(46,42,39,0.10); border-radius: 999px; }
  .controls input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-3)); box-shadow: 0 2px 8px rgba(34,28,20,0.18); border: 1px solid rgba(46,42,39,0.20); }
}
@supports selector(input[type="range"]::-moz-range-thumb) {
  .controls input[type="range"] { height: 6px; background: rgba(46,42,39,0.10); border-radius: 999px; }
  .controls input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-3)); box-shadow: 0 2px 8px rgba(34,28,20,0.18); border: 1px solid rgba(46,42,39,0.20); }
}

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(46,42,39,0.15);
  background: var(--sw, var(--accent-3));
  box-shadow: 0 2px 8px rgba(34,28,20,0.12);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, outline-color .2s ease;
}
.swatch:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(34,28,20,0.16); }
.swatch:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
.swatch.active { outline: 3px solid var(--accent); outline-offset: 2px; }

.picker { display: grid; gap: 6px; }
.picker input[type="color"] {
  width: 52px; height: 32px; border: 1px solid rgba(46,42,39,0.15); border-radius: 10px; padding: 0; background: transparent;
}

/* Responsive collapse */
@media (max-width: 800px) {
  .customizer { grid-template-columns: 1fr; }
}


/* Pattern controls */
.patternset { display: grid; gap: 10px; margin-top: 6px; }
.patternset legend { font-weight: 700; margin-bottom: 2px; }
.patterns { display: flex; flex-wrap: wrap; gap: 10px; }
.pattern {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(46,42,39,0.15);
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(34, 28, 20, 0.12);
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.pattern:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(34,28,20,0.16); }
.pattern:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }
.pattern.active { outline: 3px solid var(--accent); outline-offset: 2px; }
