/* ==========================================================================
   KÄLLAN BOTANIK — Editorial Botanical Design System
   ========================================================================== */

:root {
  /* Brand Forest & Mineral Colors */
  --color-pine:    #23342A;   /* Primary Deep Nordic Evergreen */
  --color-spruce:  #435548;   /* Muted Mid-Tone Sage Green */
  --color-lichen:  #788A79;   /* Light Botanical Accent Green */
  --color-amber:   #C88242;   /* Warm Resin / Oil Accent */

  /* Neutral Granite & Birch Tones */
  --color-birch:   #F6F4EE;   /* Warm Off-White / Sand Background */
  --color-granite: #E5E0D8;   /* Light Card Container Fill */
  --color-stone:   #B5AFA6;   /* Secondary Muted Gray-Brown */
  --color-bark:    #524B43;   /* Deep Earthy Neutral Text */

  /* Overlay & Borders */
  --border-light:  rgba(35, 52, 42, 0.12);
  --glass-bg:      rgba(246, 244, 238, 0.78);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--color-birch);
  color: var(--color-pine);
}

/* Serif display headings */
h1, h2, h3, h4, .font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Uppercase label utility */
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ==========================================================================
   Scroll-reveal states (driven by GSAP ScrollTrigger)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Lucide icon sizing guard
   ========================================================================== */
[data-lucide] {
  display: inline-block;
  stroke-width: 1.6;
}

/* ==========================================================================
   Header
   ========================================================================== */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-birch);
  transition: color 0.25s ease;
}
.icon-btn:hover {
  color: var(--color-amber);
}

/* ==========================================================================
   Organic curved card frames
   ========================================================================== */
.organic-frame {
  border-radius: 44% 56% 52% 48% / 48% 44% 56% 52%;
}

.ambient-card {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.ambient-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.4);
}

/* Fluid organic section borders are inline SVG waves in the markup */
section[class*="overflow-hidden"] {
  position: relative;
}

/* ==========================================================================
   Products & cards
   ========================================================================== */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -24px rgba(35, 52, 42, 0.28);
}

/* ==========================================================================
   Ritual steps & journal workshops entrance
   ========================================================================== */
.ritual-step, .workshop-item, .journal-mini, .origin-card, .trust-item {
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.ritual-step:hover {
  border-color: rgba(200, 130, 66, 0.5);
  transform: translateX(6px);
}
.workshop-item:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 130, 66, 0.5);
}
.origin-card:hover {
  transform: translateY(-6px);
  background: #31493c;
}

/* Cart badge bump & add-confirmed states (driven by app.js) */
.cart-bump {
  animation: cartBump 0.35s ease;
}
.add-confirmed {
  color: var(--color-amber) !important;
}
@keyframes cartBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Flowing Curved Line Path Animation */
@keyframes flowLinePath {
  0% {
    stroke-dashoffset: 40;
  }
  100% {
    stroke-dashoffset: 0;
  }
}
.animate-flow-path {
  stroke-dasharray: 8 6;
  animation: flowLinePath 1.8s linear infinite;
}

/* Glowing Step Pulse Node */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 12px 0 rgba(200, 130, 66, 0.5);
  }
  50% {
    box-shadow: 0 0 24px 6px rgba(200, 130, 66, 0.2);
  }
}
.node-pulse {
  animation: pulseGlow 2.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Hero v2 — Handcrafted Apothecary Edition
   Hand-set labels · inked boxes · paper grain · hand-torn transitions
   ========================================================================== */

/* Handwriting annotation face */
.font-hand {
  font-family: 'Caveat', 'Segoe Script', 'Comic Sans MS', cursive;
}

/* Fine paper grain layered over the hero photograph */
.paper-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* Wobbly hand-traced sticker & badge boxes */
.hand-badge {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
.hand-note {
  border-radius: 8px 210px 12px 200px / 200px 12px 210px 8px;
}
.hand-card {
  border-radius: 1.4rem 3.6rem 1.4rem 3.6rem / 3.6rem 1.4rem 3.6rem 1.4rem;
}
.ink-fill {
  border-radius: 12px 220px 16px 250px / 250px 16px 220px 12px;
}
.ink-outline {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* Gentle hand-drawn tilts on stamps & labels */
.tilt-n { transform: rotate(-1.6deg); }
.tilt-p { transform: rotate(1.3deg); }

/* Stitched rule, as though hand-sewn onto the page */
.stitch-line {
  height: 2px;
  background-image: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px);
  opacity: 0.45;
}

/* Botanical sway for the hand-inked sprig */
@keyframes sprigSway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(4deg); }
}
.sway {
  transform-origin: 50% 88%;
  animation: sprigSway 6s ease-in-out infinite;
}

/* Masking-tape strips on the polaroid specimen card */
.tape {
  background: rgba(200, 130, 66, 0.35);
  box-shadow: 0 1px 3px rgba(20, 30, 24, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .sway { animation: none; }
}

/* ==========================================================================
   Section 4.3 — Handcrafted Collection Cards & Apothecary Panels
   ========================================================================== */

/* Gentler grain for light sections */
.paper-grain.grain-light::before {
  opacity: 0.22;
}

/* Filter pills — hand-cut sticker chips instead of cloned buttons */
.filter-pill {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: inset 0 0 0 1.5px rgba(35, 52, 42, 0.16);
}

/* Pasted-print photo frame inside product cards */
.photo-frame {
  position: relative;
  border-radius: 1.1rem 2.6rem 1.1rem 2.6rem / 2.6rem 1.1rem 2.6rem 1.1rem;
  border: 1px solid rgba(35, 52, 42, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  background: #eee7d8;
}

/* Product cards — mounted apothecary specimens */
.product-card {
  background: #fdfaf2;
  border: 1px solid rgba(35, 52, 42, 0.09);
  border-radius: 1.4rem 3.6rem 1.4rem 3.6rem / 3.6rem 1.4rem 3.6rem 1.4rem;
  box-shadow: 0 18px 40px -26px rgba(35, 52, 42, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 52px -26px rgba(35, 52, 42, 0.5), 0 0 0 1px rgba(200, 130, 66, 0.25);
}

/* Small hand-inked chip (Add buttons & price chips) */
.hand-chip {
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: inset 0 0 0 1.5px rgba(200, 130, 66, 0.6);
}

/* Organic asymmetric radius for the large dark panels */
.org-panel {
  border-radius: 30px 82px 32px 84px / 84px 30px 82px 34px;
  box-shadow: 0 30px 60px -30px rgba(35, 52, 42, 0.55);
}

/* ==========================================================================
   Section 4.4 — Hand-written Ritual Journal Cards
   ========================================================================== */

/* Ritual step cards — torn journal notes instead of glass panels */
.note-card {
  border-radius: 1rem 2.5rem 1rem 2.5rem / 2.5rem 1rem 2.5rem 1rem;
}

/* ==========================================================================
   Section 4.5 — Field-Journal Sourcing Cards
   ========================================================================== */
.origin-card {
  background: #fdfaf2;
  border-radius: 1.1rem 2.6rem 1.1rem 2.6rem / 2.6rem 1.1rem 2.6rem 1.1rem;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(200, 130, 66, 0.12);
  background-image: linear-gradient(160deg, transparent 42%, rgba(210, 155, 92, 0.04) 42%, rgba(210, 155, 92, 0.04) 45%, transparent 45%),
    linear-gradient(195deg, transparent 53%, rgba(210, 155, 92, 0.035) 53%, rgba(210, 155, 92, 0.035) 56%, transparent 56%),
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(35, 52, 42, 0.025) 5px, rgba(35, 52, 42, 0.025) 7px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.origin-card:hover {
  transform: translateY(-6px) rotate(0.3deg);
  background: #fbf3e1;
  border-color: rgba(200, 130, 66, 0.5);
  box-shadow: 0 30px 54px -28px rgba(0, 0, 0, 0.75);
}

/* Rough hand-traced frame around each field note */
.sketch-border {
  border-radius: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1.5px rgba(200, 130, 66, 0.18);
}
.sketch-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 1.1rem 2.6rem 1.1rem 2.6rem / 2.6rem 1.1rem 2.6rem 1.1rem;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(35, 52, 42, 0.06);
}

/* Asymmetrical coffee-ring thumbprint — a handmade mark */
.coffee-ring {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 22px;
  height: 7px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 20%, rgba(120, 85, 48, 0.18), rgba(120, 85, 48, 0.08) 60%, transparent 64%);
  box-shadow: 0 1px 2px rgba(20, 30, 24, 0.18);
  transform: rotate(-12deg) scaleX(1.2);
}
.coffee-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 35% 30%, rgba(210, 155, 92, 0.05), transparent 70%);
}

/* ==========================================================================
   Section 4.6 — Hand-drafted Bath Sanctuary field-form
   ========================================================================== */
.field-form {
  background: #fdfaf2;
  border-radius: 1.1rem 2.7rem 1.1rem 2.7rem / 2.7rem 1.1rem 2.7rem 1.1rem;
  box-shadow: 0 16px 38px -22px rgba(35, 52, 42, 0.28);
}
.field-form select.field-line {
  width: 100%;
  padding: 0.45rem 0.25rem;
  font-size: 0.875rem;
  color: #3b2f24;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px dashed rgba(139, 120, 88, 0.45);
  border-radius: 0;
  outline: none;
}
.field-form select.field-line:focus {
  border-bottom-color: #d4b483;
  border-bottom-style: solid;
}

/* ==========================================================================
   Section 4.6 — Journal & Masterclass field-note cards
   ========================================================================== */
.master-badge {
  border-radius: 16px 50px 20px 50px / 50px 18px 42px 20px;
}
.wax-price {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}
.sketch-brackets {
  stroke-dasharray: 2 2;
}
