@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/**
 * Tusc Herbals — Design System
 * Typography: Outfit (Headings/Display) + Manrope (Product Names, Navigation, Body).
 * Client 7-color palette:
 * Lilac Mist (#F4EFF7), White (#FFFFFF), Purple (#825B96), Deep Plum (#49334E),
 * Ice White (#F4F8FA), Mist Blue (#DCE8ED), Slate Blue (#657E8D), Derived Plum Muted (#77677B).
 */

/* ========================================================================
   1. FONTS (Google Fonts Figtree + self-hosted fallbacks)
   ======================================================================== */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/marcellus-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks — kill the swap reflow (CLS) */
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Marcellus-fallback';
  src: local('Times New Roman');
  size-adjust: 103%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ========================================================================
   2. TOKENS
   ======================================================================== */
:root {
  /* Client Palette (Minimalist restyle) */
  --th-lilac-mist: #F4EFF7;
  --th-white: #FFFFFF;
  --th-purple: #825B96;
  --th-deep-plum: #49334E;
  --th-ice-white: #F4F8FA;
  --th-mist-blue: #DCE8ED;
  --th-slate-blue: #657E8D;
  --th-plum-muted: #77677B;

  /* Canvas */
  --th-warm-white: #FFFFFF;
  --th-cream: #F4EFF7;
  --th-surface: #FFFFFF;
  --th-lavender: #F4F8FA;
  --th-bg: #FFFFFF;
  --th-card-media-bg: #F4F8FA;

  /* Ink */
  --th-text: #49334E;
  --th-text-muted: #77677B;

  /* Brand */
  --th-purple-dark: #49334E;

  /* Accent */
  --th-sage: #657E8D;
  --th-sage-dark: #49334E;

  /* Logo-only */
  --th-logo-sprout: #BADD7F;
  --th-logo-cream: #E2E8BA;

  --th-border: #DCE8ED;
  --th-success: #557052;
  --th-error: #A65B5B;

  /* Type */
  --th-font-display: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --th-font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --th-font-product: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --th-font-nav: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing (8px base) */
  --th-space-xs: 8px;
  --th-space-sm: 12px;
  --th-space-md: 16px;
  --th-space-lg: 24px;
  --th-space-xl: 32px;
  --th-space-2xl: 48px;
  --th-space-3xl: 64px;
  --th-space-4xl: 80px;
  --th-section: 112px;
  --th-section-mobile: 60px;

  /* Layout */
  --th-container: 1200px;
  --th-gutter: 24px;
  --th-container-wide: 1320px;
  --th-measure: 68ch;

  /* Radius */
  --th-radius-sm: 6px;
  --th-radius-md: 10px;
  --th-radius-lg: 16px;
  --th-radius-xl: 24px;
  --th-radius-pill: 999px;

  /* Shadows — barely visible by design */
  --th-shadow-sm: 0 2px 8px rgba(73, 51, 78, .04);
  --th-shadow-md: 0 8px 24px rgba(73, 51, 78, .06);
  --th-shadow-lg: 0 16px 40px rgba(73, 51, 78, .08);

  /* Motion */
  --th-ease: cubic-bezier(.22, .61, .36, 1);
  --th-dur: 300ms;

  /* Astra global overrides */
  --ast-global-color-0: #825B96;
  --ast-global-color-1: #49334E;
  --ast-global-color-2: #49334E;
  --ast-global-color-3: #77677B;
  --ast-global-color-4: #FFFFFF;
  --ast-global-color-5: #FFFFFF;
  --ast-global-color-6: #DCE8ED;
  --ast-container-default-xlg-padding: 0;
}

/* ========================================================================
   3. BASE
   ======================================================================== */
body {
  background-color: var(--th-warm-white);
  color: var(--th-text);
  font-family: var(--th-font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .page-title {
  font-family: var(--th-font-display);
  color: var(--th-deep-plum);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

/* Display sizes */
.th-display { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }
.th-h2      { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.18; letter-spacing: -.02em; font-weight: 600; }
.th-h3      { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.25;  letter-spacing: -.015em; font-weight: 600; }

p { margin: 0 0 1.1em; }
.th-lede {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--th-text-muted);
  max-width: 56ch;
}
.th-body-measure { max-width: var(--th-measure); }

a { color: var(--th-purple); transition: color 150ms var(--th-ease); }
a:hover { color: var(--th-deep-plum); }

/* Eyebrow */
.th-eyebrow {
  display: inline-block;
  font-family: var(--th-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--th-slate-blue);
  margin: 0 0 14px;
}
.th-eyebrow--onpurple { color: rgba(255, 255, 255, .85); }

/* Script accent */
.th-script {
  font-family: 'Segoe Script', 'Bradley Hand', cursive;
  font-size: 1.05em;
  color: var(--th-purple);
}

/* ========================================================================
   4. LAYOUT
   ======================================================================== */
/* ONE canonical content rail.
   Everything on the site — my sections, Astra's containers and WooCommerce's
   blocks — resolves to the same left edge and width. Previously three widths
   competed (1200 / 1152 / 1240) and nothing lined up between sections. */
.th-container {
  width: 100%;
  max-width: calc(var(--th-container) + (var(--th-gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--th-gutter);
  box-sizing: border-box;
}
.th-section { padding-block: var(--th-section); position: relative; }
.th-section--tight { padding-block: var(--th-space-4xl); }

/* Background rhythm — never two saturated bands adjacent */
.th-bg-warm { background: var(--th-warm-white); }
.th-bg-cream { background: var(--th-cream); }
.th-bg-white { background: var(--th-white); }
.th-bg-lav { background: var(--th-lavender); }
.th-bg-purple { background: var(--th-purple-dark); color: #fff; }
.th-bg-purple h2, .th-bg-purple h3 { color: #fff; }

.th-rule { height: 1px; background: var(--th-border); border: 0; margin: 0; }

/* Paper grain — kills the flat-CSS-color feel for ~1KB */
.th-grain { position: relative; }
.th-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.th-grain > * { position: relative; z-index: 1; }

/* Section header with optional right-side action */
.th-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--th-space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--th-space-2xl);
}
.th-sec-head p { margin: 10px 0 0; }

/* ========================================================================
   5. BUTTONS
   ======================================================================== */
.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 30px;
  border-radius: var(--th-radius-pill);
  font-family: var(--th-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 200ms var(--th-ease),
              color 200ms var(--th-ease),
              border-color 200ms var(--th-ease),
              box-shadow 200ms var(--th-ease),
              transform 200ms var(--th-ease);
}
.th-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(73, 51, 78, 0.2);
}
.th-btn:active {
  transform: translateY(0);
}
.th-btn--primary { background: var(--th-purple); color: #fff; }
.th-btn--primary:hover {
  background: var(--th-deep-plum);
  color: #fff;
  box-shadow: 0 6px 20px rgba(73, 51, 78, 0.3);
}
.th-btn--dark {
  background: var(--th-deep-plum);
  color: #fff;
}
.th-btn--dark:hover {
  background: var(--th-purple);
  color: #fff;
  box-shadow: 0 6px 20px rgba(130, 91, 150, 0.35);
}
.th-btn--ghost {
  background: transparent;
  color: var(--th-deep-plum);
  border-color: var(--th-slate-blue);
}
.th-btn--ghost:hover {
  border-color: var(--th-purple);
  background: var(--th-lilac-mist);
  color: var(--th-purple);
  box-shadow: 0 4px 14px rgba(130, 91, 150, 0.18);
}
.th-btn--sage { background: var(--th-slate-blue); color: #fff; }
.th-btn--sage:hover {
  background: var(--th-deep-plum);
  color: #fff;
  box-shadow: 0 6px 20px rgba(73, 51, 78, 0.28);
}
.th-btn--onpurple { background: #fff; color: var(--th-deep-plum); }
.th-btn--onpurple:hover {
  background: var(--th-lilac-mist);
  color: var(--th-purple);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.th-btn--sm { min-height: 42px; padding: 10px 20px; font-size: 13px; }

/* Text link with growing underline */
.th-link {
  display: inline-block;
  color: var(--th-purple-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--th-purple), var(--th-purple));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 250ms var(--th-ease);
}
.th-link:hover { background-size: 100% 1px; color: var(--th-purple); }

/* ========================================================================
   6. SCROLL REVEAL (IntersectionObserver-driven)
   ======================================================================== */
.th-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--th-ease), transform 500ms var(--th-ease);
  will-change: opacity, transform;
}
.th-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .th-reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ========================================================================
   7. RESPONSIVE
   ======================================================================== */
@media (max-width: 921px) {
  :root {
    --th-section: var(--th-section-mobile);
    --th-gutter: 20px;
  }
  .th-sec-head { margin-bottom: var(--th-space-xl); }
}
