/* ============================================================
   SOPHISTIPLANTS — DESIGN SYSTEM & GLOBAL STYLES
   ============================================================ */

/* ── Display / accent fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&display=swap');

/* --- TOKENS --- */
:root {
  /* Color Palette — Midnight Botanical */
  --cream:          #EDEAE1;   /* stone linen — editorial, architectural */
  --white:          #F7F5F0;   /* clean off-white */
  --forest:         #0C1C08;   /* midnight botanical — near-black green */
  --forest-dark:    #060E04;   /* true dark */
  --forest-light:   #1C4512;
  --sage:           #22A058;   /* vivid jewel emerald — distinctive */
  --sage-light:     #48C87C;
  --earth:          #8B5E3C;
  --terracotta:     #C05040;
  --warm-brown:     #5A3A2C;
  --gold:           #A86C2A;   /* aged brass — premium, not candy-yellow */
  --gold-light:     #C48840;
  --parchment:      #D0C8A4;
  --moss:           #1C6838;
  --rose-divine:    #C07890;
  --mythic-violet:  #6040A0;
  --ink:            #0E0F0C;   /* near-black — authoritative */
  --ink-soft:       #222620;
  --muted:          #5A5E56;
  --caption:        #8A9082;
  --light-gray:     #DDDBD4;
  --border:         rgba(12, 14, 10, 0.10);
  --border-strong:  rgba(12, 14, 10, 0.20);

  /* Rarity Colors */
  --rarity-seedling:   #7A9E6B;
  --rarity-cultivar:   #4A90A4;
  --rarity-rare:       #7B5EA7;
  --rarity-ultra:      #C9A84C;
  --rarity-divine:     #D4A0B0;
  --rarity-mythic:     #1A1A1A;
  --rarity-relic:      #C17F24;

  /* Shadows — clean, precise */
  --shadow-xs:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.11);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.16);
  --shadow-xl:  0 32px 80px rgba(0,0,0,0.22);
  --shadow-glow: 0 0 0 3px rgba(34,160,88,0.22), 0 8px 32px rgba(0,0,0,0.14);

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Typography */
  --font-sans: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  /* Transitions */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);

  /* Nav */
  --nav-height: 72px;
  --nav-height-scrolled: 56px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; }

/* --- TYPOGRAPHY --- */
.display { font-family: var(--font-display); font-size: clamp(56px, 8vw, 96px); font-weight: 300; line-height: 1.0; letter-spacing: -2px; }
h1, .h1   { font-size: clamp(40px, 6vw, 64px);  font-weight: 300; line-height: 1.1; letter-spacing: -1.5px; }
h2, .h2   { font-family: var(--font-display); font-size: clamp(28px, 4vw, 48px); font-weight: 400; line-height: 1.2; letter-spacing: -0.5px; }
h3, .h3   { font-size: clamp(20px, 2.5vw, 32px); font-weight: 500; line-height: 1.3; letter-spacing: -0.3px; }
h4, .h4   { font-size: clamp(18px, 2vw, 24px);  font-weight: 600; line-height: 1.4; }
.body-lg  { font-size: 18px; line-height: 1.75; }
.body     { font-size: 16px; line-height: 1.65; }
.small    { font-size: 14px; line-height: 1.5; color: var(--muted); }
.micro    { font-size: 12px; line-height: 1.4; color: var(--caption); }
.label    { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

/* --- LAYOUT --- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--space-6); }
.container-sm { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 var(--space-6); }
.container-lg { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--space-6); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* --- SECTION --- */
.section { padding: var(--space-24) 0; }
.section-sm { padding: var(--space-16) 0; }
.section-lg { padding: var(--space-32) 0; }
.section-header { text-align: center; margin-bottom: var(--space-16); }
.section-header .label { color: var(--sage); margin-bottom: var(--space-3); }
.section-header p { color: var(--muted); max-width: 560px; margin: var(--space-4) auto 0; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 14px 28px; border-radius: var(--radius-full);
  font-size: 15px; font-weight: 600; letter-spacing: 0.3px;
  transition: all 0.25s var(--ease-standard);
  white-space: nowrap; cursor: pointer;
}
.btn-primary {
  background: var(--forest); color: var(--white);
  box-shadow: 0 2px 12px rgba(45,80,22,0.3);
}
.btn-primary:hover {
  background: var(--forest-dark);
  box-shadow: 0 4px 20px rgba(45,80,22,0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn-ghost:hover { background: var(--forest); color: var(--white); transform: translateY(-1px); }
.btn-cream {
  background: var(--cream); color: var(--forest);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-cream:hover { background: var(--white); transform: translateY(-1px); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }
.btn-icon {
  width: 48px; height: 48px; padding: 0; border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--white); color: var(--forest);
}
.btn-icon:hover { background: var(--forest); color: var(--white); border-color: var(--forest); }

/* --- BADGES / RARITY --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-seedling  { background: rgba(122,158,107,0.15); color: #4a7a3c; border: 1px solid rgba(122,158,107,0.35); }
.badge-cultivar  { background: rgba(74,144,164,0.15);  color: #2c7a8e; border: 1px solid rgba(74,144,164,0.35); }
.badge-rare      { background: rgba(123,94,167,0.15);  color: #5a3d8a; border: 1px solid rgba(123,94,167,0.35); }
.badge-ultra {
  background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(232,201,106,0.2));
  color: #8a6a1a; border: 1px solid rgba(201,168,76,0.5);
  position: relative; overflow: hidden;
}
.badge-ultra::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 3s infinite 1s;
}
.badge-divine {
  background: linear-gradient(135deg, rgba(212,160,176,0.2), rgba(255,200,220,0.2));
  color: #8a4060; border: 1px solid rgba(212,160,176,0.5);
  position: relative; overflow: hidden;
}
.badge-divine::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.7) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 2.5s infinite 0.5s;
}
.badge-mythic {
  background: linear-gradient(135deg, #1a1a1a, #2d1f3d);
  color: transparent; border: none;
  background-clip: text; -webkit-background-clip: text;
  position: relative; padding: 5px 13px;
}
.badge-mythic-wrap {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1a1a1a, #2d1f3d);
  border: 1.5px solid transparent;
  background-clip: padding-box;
  position: relative;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: white;
  box-shadow: 0 0 0 1.5px transparent, 0 0 12px rgba(123,94,167,0.4);
  animation: mythic-glow 3s ease-in-out infinite;
}

/* --- CARD --- */
.card {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: all 0.35s var(--ease-standard);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

/* --- MANDALA DECORATION --- */
.mandala-corner {
  position: absolute; width: 120px; height: 120px;
  opacity: 0.12; pointer-events: none;
  z-index: 0;
}
.mandala-corner.tl { top: 0; left: 0; transform-origin: top left; }
.mandala-corner.tr { top: 0; right: 0; transform-origin: top right; transform: scaleX(-1); }
.mandala-corner.bl { bottom: 0; left: 0; transform-origin: bottom left; transform: scaleY(-1); }
.mandala-corner.br { bottom: 0; right: 0; transform-origin: bottom right; transform: scale(-1); }
.mandala-section {
  position: absolute; width: 200px; height: 200px;
  opacity: 0.06; pointer-events: none; z-index: 0;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
}
.mandala-spin { animation: mandala-rotate 60s linear infinite; }

/* --- INPUT --- */
.input {
  width: 100%; padding: 12px 16px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
}
.input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(45,80,22,0.1); }
.input::placeholder { color: var(--caption); }

/* --- DIVIDER --- */
.divider { width: 100%; height: 1px; background: var(--border); }
.divider-ornament {
  display: flex; align-items: center; gap: var(--space-4);
  color: var(--sage); font-size: 20px;
}
.divider-ornament::before,
.divider-ornament::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* --- TOAST --- */
.toast {
  position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 9999;
  background: var(--forest); color: var(--white);
  padding: 14px 20px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: var(--space-3);
  transform: translateY(120%); opacity: 0;
  transition: all 0.35s var(--ease-spring);
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- FOCUS VISIBLE --- */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- KEYFRAMES --- */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
@keyframes mythic-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(123,94,167,0.4); }
  50%       { box-shadow: 0 0 18px rgba(123,94,167,0.7), 0 0 30px rgba(212,160,176,0.3); }
}
.badge-relic-wrap {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, #2a0e00, #5c2a00);
  border: 1.5px solid rgba(220,140,40,0.35);
  position: relative;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: #f0b050;
  animation: relic-glow 3s ease-in-out infinite;
}
@keyframes relic-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(200,100,20,0.3), 0 0 0 0 transparent; }
  50%       { box-shadow: 0 0 20px rgba(220,130,30,0.6), 0 0 32px rgba(240,176,80,0.2); }
}
@keyframes mandala-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes float-up { 0% { opacity:0; transform:translateY(0); } 50% { opacity:1; } 100% { opacity:0; transform:translateY(-40px); } }
@keyframes pulse-leaf { 0%,100% { transform:translateY(0) scale(1); opacity:0.8; } 50% { transform:translateY(-8px) scale(1.05); opacity:1; } }
@keyframes ticker { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }
@keyframes fade-in-up { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes cart-bounce { 0%,100% { transform:scale(1); } 30% { transform:scale(1.4); } 60% { transform:scale(0.9); } }
@keyframes leaf-pop { 0% { transform:scale(0) rotate(0deg); opacity:1; } 100% { transform:scale(1) rotate(45deg) translate(20px,-30px); opacity:0; } }
@keyframes spin-wheel { from { transform:rotate(0deg); } to { transform:rotate(var(--spin-deg,1800deg)); } }
@keyframes card-flip { 0% { transform:rotateY(0); } 100% { transform:rotateY(180deg); } }
@keyframes scratch-reveal { to { opacity:1; } }
@keyframes progress-fill { from { width:0; } to { width: var(--progress, 0%); } }
@keyframes confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity:1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity:0; }
}
@keyframes hero-text-in { from { opacity:0; transform:translateY(-15px); } to { opacity:1; transform:translateY(0); } }

/* --- JUNGLE SECTION BACKGROUNDS --- */
.jungle-section {
  background: var(--cream);
  position: relative;
}
.jungle-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 5% 50%, rgba(110,164,80,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 95% 20%, rgba(40,72,16,0.06) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}
.jungle-section > * { position: relative; z-index: 1; }

.section-alt {
  background: var(--white);
}

/* --- CUSTOM CURSOR DOT (neal.fun touch) --- */
.cursor-dot {
  width: 10px; height: 10px;
  background: var(--forest);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out), background 0.2s, width 0.2s, height 0.2s;
  mix-blend-mode: multiply;
  opacity: 0;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(12,28,8,0.28);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99998;
  transform: translate(-50%, -50%);
  transition: transform 0.22s var(--ease-out), width 0.25s, height 0.25s, border-color 0.2s;
  opacity: 0;
}
body:hover .cursor-dot,
body:hover .cursor-ring { opacity: 1; }
.cursor-dot.hovering { width: 16px; height: 16px; background: var(--sage); }
.cursor-ring.hovering { width: 52px; height: 52px; border-color: rgba(34,160,88,0.45); }

/* ── CURSOR CONTEXT (JS-driven) ────────────────────────────── */
body.cursor-hover .cursor-dot {
  width: 18px; height: 18px;
  background: var(--sage);
  mix-blend-mode: normal;
}
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px;
  border-color: rgba(34,160,88,0.22);
  background: rgba(34,160,88,0.04);
}

/* ── MAGNETIC BUTTONS ──────────────────────────────────────── */
[data-magnetic] {
  will-change: transform;
  position: relative; overflow: hidden;
}
[data-magnetic]::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.16) 50%, transparent 60%);
  transform: translateX(-110%);
}
[data-magnetic]:hover::before {
  transform: translateX(110%);
  transition: transform 0.55s ease;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--light-gray); }
::-webkit-scrollbar-thumb { background: var(--moss); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--forest); }

/* --- UTILITY --- */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 var(--space-5); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-16) 0; }
  .section-lg { padding: var(--space-20) 0; }
  .container { padding: 0 var(--space-4); }
  .mandala-corner { width: 80px; height: 80px; opacity: 0.09; }
  .btn-lg { padding: 16px 28px; font-size: 15px; }
}
@media (max-width: 480px) {
  .mandala-corner { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* --- CART NAV PILL --- */
.nav-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background-color: var(--sage);
  color: var(--white);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(34,160,88,0.22);
  transition: background-color 0.2s, transform 0.18s, box-shadow 0.2s;
}
.nav-cart-link:hover {
  background-color: var(--sage-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34,160,88,0.32);
}
.nav-cart-link .nav-cart-link-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255,255,255,0.28);
  color: var(--white);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.nav.dark:not(.scrolled) .nav-cart-link {
  background-color: rgba(255,255,255,0.14);
  color: var(--white);
  box-shadow: none;
}
.nav.dark:not(.scrolled) .nav-cart-link:hover {
  background-color: rgba(255,255,255,0.25);
}
.nav-drawer-cart { color: var(--sage); font-weight: 600; }
@media (max-width: 768px) { .nav-cart-link { display: none; } }

/* --- NAV: centre the links, hide secondary items on most screens --- */

/* Hide search bar + slim links on all screens up to 1600px */
@media (max-width: 1600px) {
  .nav-search-wrap { display: none !important; }
  .nav-link { padding: 6px 12px !important; font-size: 13.5px !important; }
  .nav-links { gap: var(--space-3) !important; }
}

/* Hide lower-priority nav links on screens up to 1600px — all live in the drawer */
@media (max-width: 1600px) {
  .nav-link[href="accessories.html"],
  .nav-link[href="room-builder.html"],
  .nav-link[href="quiz.html"],
  .nav-link[href="tridosha-guide.html"],
  .nav-link[href="care-guide.html"] { display: none !important; }
}

/* Same at smaller sizes (already covered above, kept explicit for clarity) */
@media (max-width: 980px) {
  .nav-link[href="accessories.html"],
  .nav-link[href="room-builder.html"],
  .nav-link[href="quiz.html"],
  .nav-link[href="tridosha-guide.html"],
  .nav-link[href="care-guide.html"] { display: none !important; }
}
