/* ============================================
   Good Twigs — Style Lab font variants
   ============================================
   Testing-only alternate font pairings for the
   home page. Activated by style-lab.js, which
   sets data-font on <html> and loads the extra
   Google Fonts only in testing contexts, so
   the live site never downloads them. Colors
   always stay Signature (defined in styles.css).
   The default (no data-font) is the approved
   Fraunces + Inter pairing.
   ============================================ */

/* Smooth font swaps while switching */
body,
h1, h2, h3,
.logo,
.btn,
.form-field input {
  transition: font-family 0.2s ease;
}

/* ---------- Bookish ----------
   Playfair Display + Source Sans 3.
   Higher contrast, more dramatic serif.
   Feels like a well-made catalog. */
html[data-font="bookish"] {
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Storybook ----------
   Lora + Open Sans. Softer and rounder.
   Gentle storybook warmth for a family brand. */
html[data-font="storybook"] {
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Open Sans', -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Botanical ----------
   Cormorant Garamond + Nunito Sans. Delicate,
   airy serif with a friendly rounded sans.
   The lightest touch of the pairings. */
html[data-font="botanical"] {
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', -apple-system, 'Segoe UI', sans-serif;
}
/* Cormorant has a small x-height; nudge sizes up so it holds the page */
html[data-font="botanical"] .hero-title {
  font-size: clamp(3.2rem, 10vw, 6.8rem);
  font-weight: 600;
}
html[data-font="botanical"] .section-title,
html[data-font="botanical"] .signup-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
html[data-font="botanical"] .logo {
  font-size: 1.5rem;
}

/* ---------- Studio ----------
   DM Serif Display + DM Sans. Sharp contemporary
   serif with a clean geometric sans. Most modern. */
html[data-font="studio"] {
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
}
/* DM Serif Display is designed at one weight (400);
   stop the browser from fake-bolding it */
html[data-font="studio"] .hero-title,
html[data-font="studio"] .section-title,
html[data-font="studio"] .signup-title,
html[data-font="studio"] .philosophy-statement,
html[data-font="studio"] .category-card h3,
html[data-font="studio"] .value-item h3,
html[data-font="studio"] .logo,
html[data-font="studio"] .brand-headline {
  font-weight: 400;
}

/* ---------- Print ----------
   Libre Baskerville + Karla. Sturdy bookish serif
   with a quirky humanist sans. Handcrafted print feel. */
html[data-font="print"] {
  --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', -apple-system, 'Segoe UI', sans-serif;
}
/* Libre Baskerville runs wide; pull sizes in slightly */
html[data-font="print"] .hero-title {
  font-size: clamp(2.4rem, 7.5vw, 4.8rem);
}
html[data-font="print"] .brand-headline {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
}
html[data-font="print"] .logo {
  font-size: 1.25rem;
}

/* ============================================
   Style Lab switcher widget
   Fixed neutral colors so it stays legible on
   the page regardless of which font is active.
   ============================================ */
.style-lab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
}
.style-lab[hidden] {
  display: none;
}

.style-lab-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #2A2722;
  color: #FAF7F2;
  border: 1px solid rgba(255, 252, 247, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}
.style-lab-toggle:hover {
  transform: translateY(-2px);
  background: #443F37;
}
.style-lab-toggle svg {
  width: 22px;
  height: 22px;
}

.style-lab-panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 280px;
  max-height: min(430px, calc(100vh - 8rem));
  overflow-y: auto;
  background: #FFFCF7;
  color: #2A2722;
  border: 1px solid #E5DDD1;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  padding: 0.5rem;
  display: none;
  text-align: left;
}
.style-lab.open .style-lab-panel {
  display: block;
}

.style-lab-head {
  padding: 0.45rem 0.7rem 0.6rem;
  border-bottom: 1px solid #EDE7DC;
  margin-bottom: 0.35rem;
}
.style-lab-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}
.style-lab-note {
  font-size: 0.72rem;
  color: #8A8278;
  margin: 0;
  line-height: 1.4;
}

.style-lab-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.style-lab-option:hover {
  background: #F3EDE3;
}
.style-lab-option.active {
  background: rgba(91, 107, 77, 0.1);
  border-color: #5B6B4D;
}

.style-lab-glyph {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3EDE3;
  border: 1px solid #E5DDD1;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  color: #2A2722;
}

.style-lab-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.style-lab-desc {
  display: block;
  font-size: 0.75rem;
  color: #8A8278;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .style-lab {
    bottom: 1rem;
    right: 1rem;
  }
  .style-lab-panel {
    width: min(280px, calc(100vw - 2rem));
  }
}
