/* ============================================================================
   tinybee — 2026 premium cream-cute redesign (Evolution pass).
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:ital,wght@0,500;0,600;0,700;0,800;1,500&display=swap');

@font-face{
  font-family:'Geist Mono';
  src:url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Regular.woff2') format('woff2');
  font-weight:400; font-display:swap;
}
@font-face{
  font-family:'Geist Mono';
  src:url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Medium.woff2') format('woff2');
  font-weight:500; font-display:swap;
}

:root {
  /* 60% Base: Cream Neutral */
  --bg-cream: #FFFDF9; /* Lighter, cleaner base */
  --bg-cream-alt: #FFF5E1;
  --card-bg: #FFFFFF;
  --card-border: #F5E3BD;
  
  /* Text (Cocoa Brown) */
  --ink-heading: #42332A;
  --ink-body: #66554D;
  --ink-muted: #9E8C82;
  
  /* 30% Primary Accent: Honey (Compress tool) */
  --honey-primary: #FFC635;
  --honey-shadow: #D6970F;
  --honey-hover: #FFD25F;

  /* 10% Secondary Accent: Coral Peach (Remove BG tool) */
  --peach-accent: #FF9E8E;
  --peach-shadow: #D96E5C;
  --peach-hover: #FFB3A6;

  /* 10% Tertiary Accent: Sage Green (Outline tool) */
  --sage-accent: #95C6A1;
  --sage-shadow: #669E74;
  --sage-hover: #AEE0BA;
  
  /* Default Focus Accent (Fallback to primary) */
  --accent-primary: var(--honey-primary);
  --accent-shadow: var(--honey-shadow);
  
  /* UI Elements */
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 40px;
  --radius-pill: 999px;
  
  /* Shadows - Layered, Soft, Deep */
  --shadow-sm: 0 4px 12px rgba(214, 151, 15, 0.06);
  --shadow-md: 0 12px 24px rgba(214, 151, 15, 0.1);
  --shadow-lg: 0 24px 48px rgba(66, 51, 42, 0.08);
  --shadow-card: 0 20px 50px rgba(66, 51, 42, 0.05), 0 8px 20px rgba(66, 51, 42, 0.03);
  
  /* Fonts */
  --font-disp: 'Fredoka', 'Nunito', system-ui, 'PingFang TC', sans-serif;
  --font-body: 'Nunito', system-ui, 'PingFang TC', sans-serif;
  --font-mono: 'Geist Mono', monospace;
  
  /* Layout */
  --max-w: 1200px;
  --section-pad: clamp(6rem, 12vw, 10rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Noise Texture for Paper Grain */
.noise-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 9999; opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body {
  margin: 0;
  background-color: var(--bg-cream);
  font-family: var(--font-body);
  color: var(--ink-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Gradient mesh for depth */
  background-image: 
    radial-gradient(circle at 10% 0%, rgba(255,198,53,0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(255,158,142,0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(149,198,161,0.06) 0%, transparent 50%);
  background-attachment: fixed;
}
::selection { background: var(--accent-primary); color: var(--ink-heading); }

h1, h2, h3, h4 {
  font-family: var(--font-disp); color: var(--ink-heading);
  margin: 0; line-height: 1.1; letter-spacing: -0.02em;
}

/* Base Utility */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.section-h { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; margin-bottom: 1rem; }
.section-sub { font-size: clamp(1.15rem, 2vw, 1.3rem); color: var(--ink-body); max-width: 60ch; margin: 0 auto; font-weight: 500; }
.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--card-bg); color: var(--honey-shadow);
  font-family: var(--font-disp); font-weight: 700; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-pill);
  box-shadow: 0 6px 0 var(--bg-cream-alt);
  border: 2px solid var(--card-border); margin-bottom: 1.5rem;
}

/* Divider Waves */
.wave-divider {
  position: absolute; width: 100%; left: 0; line-height: 0; z-index: 1; pointer-events: none;
}
.wave-divider svg { display: block; width: calc(100% + 1.3px); height: 60px; }
.wave-top { top: -59px; transform: rotate(180deg); }
.wave-bottom { bottom: -59px; }

/* Background pattern (subtle honeycomb) */
.honeycomb-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='44' height='76' viewBox='0 0 44 76' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22 0l22 12.7v25.4L22 50.8 0 38.1V12.7L22 0zm0 76l22-12.7V38.1L22 25.4 0 38.1v25.4L22 76z' fill='%2342332A' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: 0;
}

/* Plump 3D Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-disp); font-weight: 700; font-size: 1.2rem;
  padding: 1rem 2.4rem; border-radius: var(--radius-pill);
  cursor: pointer; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none; border: none; position: relative; z-index: 5;
}
.btn-primary {
  background: var(--honey-primary); color: var(--ink-heading);
  box-shadow: 0 6px 0 var(--honey-shadow), 0 12px 24px rgba(214, 151, 15, 0.25);
  border: 2px solid #FFE499;
}
.btn-primary:hover {
  background: var(--honey-hover); transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--honey-shadow), 0 16px 32px rgba(214, 151, 15, 0.3);
}
.btn-primary:active {
  transform: translateY(4px); box-shadow: 0 2px 0 var(--honey-shadow), 0 4px 8px rgba(214, 151, 15, 0.2);
}
.btn-ghost {
  background: var(--card-bg); color: var(--ink-heading);
  box-shadow: 0 6px 0 var(--bg-cream-alt), 0 12px 24px rgba(66, 51, 42, 0.05);
  border: 2px solid var(--card-border);
}
.btn-ghost:hover {
  transform: translateY(-2px); box-shadow: 0 8px 0 var(--card-border), 0 16px 32px rgba(66, 51, 42, 0.08);
  background: var(--bg-cream-alt);
}
.btn-ghost:active {
  transform: translateY(4px); box-shadow: 0 2px 0 var(--card-border);
}

/* Floating Nav */
.nav {
  position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(var(--max-w), calc(100% - 2rem));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.8rem 0.6rem 1.4rem;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(20px);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 32px rgba(66, 51, 42, 0.06), 0 4px 0 var(--bg-cream-alt);
  border: 2px solid var(--card-border);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav.scrolled {
  top: 1rem; background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 40px rgba(214, 151, 15, 0.12), 0 4px 0 var(--card-border);
  padding: 0.4rem 0.6rem 0.4rem 1.2rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-disp); font-weight: 700; font-size: 1.6rem; color: var(--ink-heading); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-word { letter-spacing: -0.02em; }
.brand-word b { color: var(--honey-primary); font-weight: 800; -webkit-text-stroke: 1px var(--honey-shadow); }
.nav-links { display: flex; align-items: center; gap: 0.5rem; }
.nav-links > a {
  font-family: var(--font-disp); font-weight: 600; font-size: 1.05rem;
  padding: 0.6rem 1.2rem; border-radius: var(--radius-pill);
  color: var(--ink-body); transition: all 0.2s; text-decoration: none;
}
.nav-links > a:hover { color: var(--ink-heading); background: var(--bg-cream-alt); }
.lang-switch { position: relative; display: inline-flex; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-disp); font-weight: 700; font-size: 1.05rem;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-pill);
  background: var(--card-bg); border: 2px solid var(--card-border);
  color: var(--ink-heading); cursor: pointer;
  box-shadow: 0 4px 0 var(--bg-cream-alt); transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lang-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--card-border); background: var(--bg-cream-alt); }
.lang-toggle:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--card-border); }
.lang-menu {
  position: absolute; top: calc(100% + 0.8rem); right: 0; z-index: 200;
  width: 260px; background: var(--card-bg);
  border-radius: var(--radius-md); padding: 0.8rem;
  box-shadow: var(--shadow-lg), 0 8px 0 var(--bg-cream-alt);
  border: 2px solid var(--card-border);
  transform-origin: top right;
}
.lang-search {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--card-border); background: var(--bg-cream);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  margin-bottom: 0.5rem; outline: none; transition: 0.2s;
}
.lang-search:focus { border-color: var(--honey-primary); background: var(--card-bg); }
.lang-list { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.lang-opt {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.6rem 0.8rem; border-radius: 12px; cursor: pointer; transition: 0.2s;
}
.lang-opt:hover, .lang-opt.kbd { background: var(--bg-cream-alt); }
.lang-opt.active { background: var(--honey-primary); color: var(--ink-heading); font-weight: 700; box-shadow: 0 2px 0 var(--honey-shadow); }
.lang-native { font-family: var(--font-disp); font-weight: 700; color: var(--ink-heading); }
.lang-en { font-size: 0.8rem; color: var(--ink-muted); font-weight: 600; }

/* Hero Section */
.hero { padding: calc(12rem + 2vw) 0 calc(6rem + 2vw); position: relative; }
.hero-grid { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); display: grid; grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: center; }
.hero-copy { max-width: 540px; position: relative; z-index: 10; }
.hero h1 { font-size: clamp(3.2rem, 5vw, 4.8rem); margin-bottom: 1.4rem; line-height: 1.05; }
.hero h1 .g { position: relative; display: inline-block; z-index: 1; color: var(--ink-heading); }
.hero h1 .g::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: 10px; height: 18px;
  background: var(--honey-primary); z-index: -1; border-radius: 8px;
  transform: rotate(-1.5deg); opacity: 0.8;
}
.hero h1 .g.peach::after { background: var(--peach-accent); }
.hero h1 .g.sage::after { background: var(--sage-accent); }
.hero-sub { font-size: 1.25rem; margin-bottom: 2.5rem; line-height: 1.6; font-weight: 500; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem; }
.hero-stats { display: flex; gap: 3rem; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat b { font-family: var(--font-disp); font-weight: 800; font-size: 2.4rem; color: var(--honey-shadow); line-height: 1; margin-bottom: 0.2rem; }
.hero-stat span { font-size: 0.95rem; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Bee Mascot (Animated) */
.mascot-container {
  position: absolute; top: -50px; right: -30px; width: 100px; height: 100px;
  z-index: 20; filter: drop-shadow(0 12px 24px rgba(214, 151, 15, 0.4));
  pointer-events: auto; cursor: grab;
}
.mascot-container:active { cursor: grabbing; }
.bee-body {
  animation: float 4s ease-in-out infinite; transform-origin: center;
}
.mascot-container:hover .bee-body { animation: buzz 0.1s linear infinite; }
.bee-wing {
  transform-origin: bottom right;
  animation: flap 0.1s linear infinite alternate;
}
.bee-wing.left { transform-origin: bottom left; animation-delay: 0.05s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(15deg); } 50% { transform: translateY(-15px) rotate(10deg); } }
@keyframes buzz { 0% { transform: translate(1px, 1px) rotate(15deg); } 50% { transform: translate(-1px, -1px) rotate(13deg); } 100% { transform: translate(1px, -1px) rotate(17deg); } }
@keyframes flap { 0% { transform: rotate(0deg) scaleY(1); } 100% { transform: rotate(30deg) scaleY(0.5); } }

/* Hero Slider Frame - Cute & Rounded */
.hero-slider { position: relative; margin: 0; z-index: 10; }
.hero-slider .frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card-bg); border: 8px solid var(--card-bg);
  box-shadow: var(--shadow-card), 0 24px 0 var(--bg-cream-alt);
  transform: rotate(2deg); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-slider:hover .frame { transform: rotate(0deg) translateY(-8px); box-shadow: var(--shadow-card), 0 32px 0 var(--card-border); }
.cmp-cap { text-align: center; margin-top: 3rem; font-weight: 600; font-size: 1rem; color: var(--ink-muted); }
.cmp-cap b { color: var(--honey-shadow); display: block; margin-top: 0.5rem; font-size: 1.15rem; }

/* Before/After Slider Component */
.cmp {
  position: relative; width: 100%; border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden; cursor: ew-resize; user-select: none; touch-action: pan-y;
  background: var(--bg-cream-alt); line-height: 0;
}
.cmp img { width: 100%; height: auto; pointer-events: none; }
.cmp-base { position: relative; z-index: 1; }
.cmp-top { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; z-index: 2; border-right: 4px solid var(--card-bg); box-sizing: content-box; }
.cmp-top img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; }
.checker {
  background-color: #F8F4EC;
  background-image: 
    linear-gradient(45deg, #EFEAE0 25%, transparent 25%), 
    linear-gradient(-45deg, #EFEAE0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #EFEAE0 75%), 
    linear-gradient(-45deg, transparent 75%, #EFEAE0 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.cmp-tag {
  position: absolute; top: 1.2rem; z-index: 4; font-family: var(--font-disp);
  font-weight: 700; font-size: 0.9rem; padding: 0.6rem 1.2rem; border-radius: var(--radius-pill);
  background: var(--card-bg); color: var(--ink-heading);
  box-shadow: 0 4px 12px rgba(66, 51, 42, 0.1), 0 4px 0 var(--bg-cream-alt);
  border: 2px solid var(--card-border);
  pointer-events: none;
}
.cmp-tag.l { left: 1.2rem; }
.cmp-tag.r { right: 1.2rem; color: var(--honey-shadow); }
.cmp-hd {
  position: absolute; top: 0; left: 50%; height: 100%; width: 0; z-index: 5;
  transform: translateX(-50%); cursor: ew-resize;
}
.cmp-hd::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%; background: var(--accent-primary);
  box-shadow: 0 6px 0 var(--accent-shadow), 0 12px 24px rgba(214, 151, 15, 0.4), inset 0 2px 0 rgba(255,255,255,0.5);
  border: 6px solid var(--card-bg); transition: transform 0.1s, background 0.3s, box-shadow 0.3s;
}
.cmp-hd:active::after { transform: translate(-50%, -46%) scale(0.92); box-shadow: 0 2px 0 var(--accent-shadow), 0 6px 12px rgba(214, 151, 15, 0.3); }
.cmp-hd svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 6; stroke: var(--ink-heading) !important; width: 26px; height: 26px; stroke-width: 3px; pointer-events: none; }
/* Live % Indicator in handle */
.cmp-hd::before {
  content: attr(data-pct); position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -120px) scale(0); opacity: 0;
  background: var(--ink-heading); color: #fff; font-family: var(--font-disp); font-weight: 700;
  padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); font-size: 1.1rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s; z-index: 10;
  pointer-events: none;
}
.cmp-hd:active::before { transform: translate(-50%, -80px) scale(1); opacity: 1; }

/* Tool Section */
.tool { padding: var(--section-pad) 0; position: relative; z-index: 20; text-align: center; background: #FFF; }
.tool-head { max-width: var(--max-w); margin: 0 auto 3.5rem; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.tool-card {
  max-width: 960px; margin: 0 auto; background: var(--bg-cream);
  border-radius: 48px; padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow-card), 0 24px 0 var(--bg-cream-alt);
  border: 4px solid var(--card-border); text-align: left;
  position: relative; transition: border-color 0.4s, box-shadow 0.4s;
}

/* Tool State Colors */
body[data-tool="optimize"] .tool-card { border-color: var(--honey-primary); box-shadow: var(--shadow-card), 0 24px 0 var(--honey-shadow); }
body[data-tool="removebg"] .tool-card { border-color: var(--peach-accent); box-shadow: var(--shadow-card), 0 24px 0 var(--peach-shadow); }
body[data-tool="outline"] .tool-card { border-color: var(--sage-accent); box-shadow: var(--shadow-card), 0 24px 0 var(--sage-shadow); }
body[data-tool="optimize"] { --accent-primary: var(--honey-primary); --accent-shadow: var(--honey-shadow); }
body[data-tool="removebg"] { --accent-primary: var(--peach-accent); --accent-shadow: var(--peach-shadow); }
body[data-tool="outline"] { --accent-primary: var(--sage-accent); --accent-shadow: var(--sage-shadow); }

.tool-tabs {
  display: flex; gap: 0.8rem; justify-content: center; background: var(--card-bg);
  padding: 0.6rem; border-radius: var(--radius-pill); margin-bottom: 3rem;
  box-shadow: inset 0 4px 8px rgba(66,51,42,0.06); border: 2px solid var(--card-border);
}
.tab {
  flex: 1; max-width: 240px; display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  font-family: var(--font-disp); font-weight: 700; font-size: 1.15rem;
  padding: 1.2rem; border-radius: var(--radius-pill); border: 2px solid transparent;
  background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tab.active[data-op="optimize"] { background: var(--honey-primary); color: var(--ink-heading); box-shadow: 0 4px 0 var(--honey-shadow), 0 12px 24px rgba(214, 151, 15, 0.3); border-color: #FFE499; transform: translateY(-4px); }
.tab.active[data-op="removebg"] { background: var(--peach-accent); color: var(--ink-heading); box-shadow: 0 4px 0 var(--peach-shadow), 0 12px 24px rgba(217, 110, 92, 0.3); border-color: #FFC9C0; transform: translateY(-4px); }
.tab.active[data-op="outline"] { background: var(--sage-accent); color: var(--ink-heading); box-shadow: 0 4px 0 var(--sage-shadow), 0 12px 24px rgba(102, 158, 116, 0.3); border-color: #C3EBCF; transform: translateY(-4px); }
.tab:not(.active):hover { color: var(--ink-heading); background: var(--bg-cream-alt); }

/* Animated SVGs in Tabs */
.tab-icon { width: 32px; height: 32px; flex-shrink: 0; }
.tab-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tab.active .icon-compress .box { animation: squish 2s infinite cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: center; }
.tab.active .icon-removebg .wand { animation: waveWand 2s infinite ease-in-out; transform-origin: bottom left; }
.tab.active .icon-removebg .sparkle { animation: popSparkle 2s infinite ease-in-out; }
.tab.active .icon-outline .peel { animation: peelSticker 2s infinite ease-in-out; transform-origin: bottom right; }

@keyframes squish { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1, 0.7); } }
@keyframes waveWand { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(20deg); } }
@keyframes popSparkle { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes peelSticker { 0%, 100% { transform: rotate(0deg) translate(0,0); } 50% { transform: rotate(-15deg) translate(-5px, -5px); } }

/* Options */
.tool-options { margin-bottom: 3rem; }
.opts { display: none; flex-direction: column; gap: 1.5rem; max-width: 680px; margin: 0 auto; }
.opts.active { display: flex; animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.opt-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  background: var(--card-bg); padding: 1.4rem 2rem; border-radius: var(--radius-md);
  border: 3px solid var(--card-border); box-shadow: 0 4px 0 var(--bg-cream-alt);
}
.opt-row > span:first-child { font-family: var(--font-disp); font-weight: 700; color: var(--ink-heading); font-size: 1.15rem; }
.opts select, .opts input[type=range] {
  font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: var(--ink-heading);
  background: var(--bg-cream); border: 3px solid var(--card-border);
  padding: 0.9rem 1.4rem; border-radius: var(--radius-pill); min-width: 240px;
  box-shadow: 0 4px 0 var(--bg-cream-alt); outline: none; cursor: pointer;
  transition: 0.2s;
}
.opts select:hover, .opts select:focus { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: 0 6px 0 var(--card-border); }
.opts input[type=range] { accent-color: var(--accent-primary); height: 10px; padding: 0; }
.opt-note { text-align: center; font-size: 1rem; font-weight: 600; color: var(--ink-muted); margin: 0.5rem 0 0; }
.preset-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.preset {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  font-family: var(--font-disp); font-weight: 700; font-size: 1rem;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-sm); border: 2px solid var(--card-border);
  background: var(--bg-cream); color: var(--ink-muted); cursor: pointer;
  box-shadow: 0 4px 0 var(--bg-cream-alt); transition: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.preset.active {
  background: var(--accent-primary); border-color: transparent; color: var(--ink-heading);
  box-shadow: 0 4px 0 var(--accent-shadow), 0 8px 16px rgba(102, 158, 116, 0.3); transform: translateY(-4px);
}
.preset:not(.active):hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--card-border); color: var(--ink-heading); }
.preset small { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.8; }
.color-row { display: flex; gap: 0.8rem; align-items: center; }
.swatch {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 3px solid var(--card-border); padding: 0; transition: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 0 var(--bg-cream-alt);
}
.swatch.active { transform: translateY(-4px); box-shadow: 0 0 0 4px var(--card-bg), 0 0 0 8px var(--accent-primary), 0 8px 16px rgba(102, 158, 116, 0.3); border-color: transparent; }
.swatch:not(.active):hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--card-border); }
input[type=color] { width: 48px; height: 48px; border-radius: 50%; padding: 0; border: none; cursor: pointer; background: transparent; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 3px solid var(--card-border); border-radius: 50%; }
.toggle-row input[type=checkbox] { width: 28px; height: 28px; accent-color: var(--accent-primary); cursor: pointer; }

/* Dropzone */
.dropzone {
  max-width: 680px; margin: 0 auto; padding: 5rem 2rem;
  background: var(--card-bg); border: 4px dashed var(--card-border);
  border-radius: var(--radius-lg); text-align: center; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dropzone:hover, .dropzone.dragover {
  background: var(--bg-cream-alt); border-color: var(--accent-primary); border-style: solid;
  transform: scale(1.02) translateY(-4px); box-shadow: 0 16px 32px rgba(66, 51, 42, 0.08), 0 8px 0 var(--card-border);
}
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; pointer-events: none; }
.dz-inner svg { color: var(--accent-primary); width: 80px; height: 80px; margin-bottom: 0.5rem; filter: drop-shadow(0 8px 12px rgba(214,151,15,0.2)); transition: color 0.4s; }
.dz-title { font-family: var(--font-disp); font-weight: 700; font-size: 1.6rem; color: var(--ink-heading); margin: 0; }
.dz-sub { font-size: 1.1rem; color: var(--ink-muted); margin: 0; font-weight: 600; }

/* Result */
.result { max-width: 800px; margin: 0 auto; text-align: center; }
.result-slider { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg), 0 16px 0 var(--bg-cream-alt); border: 6px solid var(--card-bg); margin: 0 auto 3rem; }
.savings { font-family: var(--font-disp); font-weight: 800; font-size: 2.6rem; color: var(--accent-primary); margin-bottom: 2rem; text-shadow: 0 4px 0 var(--accent-shadow); }
.result-actions { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.processing { padding: 6rem 0; text-align: center; font-family: var(--font-disp); font-weight: 700; color: var(--ink-heading); font-size: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: 2rem; }

/* Animated Honey Drop Loader */
.honey-loader {
  width: 60px; height: 60px; position: relative;
}
.honey-drop {
  width: 20px; height: 20px; background: var(--accent-primary); border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); position: absolute; left: 20px; top: -20px;
  animation: drip 1.5s infinite ease-in-out; box-shadow: 0 4px 8px rgba(214,151,15,0.4);
}
@keyframes drip {
  0% { top: -20px; transform: rotate(-45deg) scale(0.8); opacity: 0; }
  50% { opacity: 1; transform: rotate(-45deg) scale(1.2); }
  100% { top: 60px; transform: rotate(-45deg) scale(0.5); opacity: 0; }
}

.error-box { max-width: 680px; margin: 2rem auto 0; padding: 1.8rem; background: #FFF0F2; border: 4px solid #FFC2C5; color: #D63943; font-family: var(--font-disp); font-weight: 700; font-size: 1.2rem; border-radius: var(--radius-md); box-shadow: 0 8px 0 #FFC2C5; text-align: center; }

/* Marquee */
.marquee { padding: 3.5rem 0; overflow: hidden; background: var(--honey-primary); transform: rotate(-2deg) scale(1.05); margin: 6rem 0; box-shadow: 0 16px 0 var(--honey-shadow); border-top: 4px solid #FFE499; border-bottom: 4px solid #FFE499; position: relative; z-index: 10; }
.marquee-track { display: flex; gap: 5rem; width: max-content; animation: marq 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 1.5rem; font-family: var(--font-disp); font-weight: 800; font-size: 2.2rem; color: var(--ink-heading); text-transform: uppercase; letter-spacing: 0.05em; }
.marquee-item .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--card-bg); box-shadow: 0 4px 0 rgba(0,0,0,0.15); }
@keyframes marq { to { transform: translateX(-50%); } }

/* Demos */
.demos { padding: var(--section-pad) 0; text-align: center; position: relative; }
.demos-head { max-width: var(--max-w); margin: 0 auto 5rem; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.demo-block { text-align: left; margin-bottom: 7rem; max-width: var(--max-w); margin: 0 auto 7rem; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.demo-h { font-size: clamp(2rem, 3.5vw, 2.6rem); display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem; }
.demo-emoji { width: 48px; height: 48px; } /* SVG Icon slot */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 3.5rem; }
.demo-item {
  background: var(--card-bg); border-radius: calc(var(--radius-lg) - 4px); padding: 10px;
  box-shadow: 0 12px 32px rgba(66, 51, 42, 0.06), 0 16px 0 var(--bg-cream-alt);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); border: 4px solid var(--card-border);
}
.demo-item:hover { transform: translateY(-8px); box-shadow: 0 24px 48px rgba(66, 51, 42, 0.1), 0 24px 0 var(--accent-primary); border-color: var(--accent-primary); }
.demo-item .cmp { border-radius: calc(var(--radius-lg) - 14px); border: 2px solid var(--bg-cream-alt); }
.demo-label { font-family: var(--font-disp); font-weight: 700; font-size: 1.3rem; padding: 1.5rem 1.2rem 0.4rem; color: var(--ink-heading); }
.demo-stat { padding: 0 1.2rem 1.2rem; font-family: var(--font-mono); font-size: 1.05rem; color: var(--ink-muted); font-weight: 600; }
.demo-stat b { color: var(--accent-primary); font-size: 1.4rem; font-weight: 700; }
.demo-stat .ssim { opacity: 0.8; }

/* API Section */
.api { padding: var(--section-pad) 0; background: #FFF; position: relative; z-index: 5; }
.api-head { max-width: var(--max-w); margin: 0 auto 5rem; padding: 0 clamp(1.2rem, 4vw, 2.5rem); text-align: center; }
.api-why { max-width: var(--max-w); margin: 0 auto 6rem; padding: 0 clamp(1.2rem, 4vw, 2.5rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem; }
.why-card {
  background: var(--bg-cream); padding: 3rem 2.5rem; border-radius: var(--radius-md);
  box-shadow: 0 16px 0 var(--bg-cream-alt); border: 4px solid var(--card-border);
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); text-align: left;
}
.why-card:hover { transform: translateY(-8px); box-shadow: 0 24px 0 var(--honey-shadow); border-color: var(--honey-primary); background: var(--card-bg); }
.why-ic {
  width: 80px; height: 80px; border-radius: 28px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; margin-bottom: 2rem;
  box-shadow: inset 0 -6px 0 var(--bg-cream-alt), 0 12px 24px rgba(214, 151, 15, 0.15); color: var(--honey-shadow);
  border: 3px solid var(--card-border); transition: transform 0.3s, color 0.3s;
}
.why-card:hover .why-ic { transform: scale(1.1) rotate(-5deg); color: var(--honey-primary); }
.why-ic svg { width: 40px; height: 40px; stroke-width: 2.5; }
.why-card h4 { font-size: 1.6rem; margin-bottom: 1rem; }
.why-card p { margin: 0; color: var(--ink-body); font-weight: 600; font-size: 1.1rem; }

/* Cute Terminal */
.api-code { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.code-shell {
  background: #3B2E28; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 12px var(--bg-cream), 0 28px 0 var(--bg-cream-alt);
  max-width: 1000px; margin: 0 auto;
}
.code-chrome { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 2rem; background: #2A1F1A; border-bottom: 3px solid #4A3A31; }
.code-chrome .dots i { width: 16px; height: 16px; border-radius: 50%; display: block; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25); }
.code-chrome .dots i:nth-child(1) { background: #FF5F56; }
.code-chrome .dots i:nth-child(2) { background: #FFBD2E; }
.code-chrome .dots i:nth-child(3) { background: #27C93F; }
.code-chrome .file { font-family: var(--font-mono); font-weight: 700; color: #9C887F; font-size: 1.05rem; margin-left: 0.8rem; }
.code-tabs { display: flex; padding: 1rem 1.4rem 0; background: #2A1F1A; gap: 0.4rem; flex-wrap: wrap; }
.ctab {
  font-family: var(--font-disp); font-weight: 700; font-size: 1.15rem; color: #9C887F;
  padding: 0.9rem 1.8rem; border-radius: 16px 16px 0 0; background: transparent;
  border: none; cursor: pointer; transition: 0.2s;
}
.ctab.active { background: #3B2E28; color: var(--honey-primary); }
.ctab:not(.active):hover { color: #FFF; background: rgba(255,255,255,0.05); }
.code-block { display: none; position: relative; }
.code-block.active { display: block; }
.code-block pre { padding: 3rem; margin: 0; overflow-x: auto; }
.code-block code { font-family: var(--font-mono); font-size: 1.15rem; line-height: 1.7; color: #E8DCCF; white-space: pre; }
.code-block .cm { color: #9C887F; }
.code-block .tok-verb { color: var(--honey-primary); }
.code-block .tok-str { color: var(--peach-accent); }
.code-block .tok-flag { color: var(--sage-accent); }
.copy-btn {
  position: absolute; top: 2rem; right: 2rem; background: #4A3A31;
  color: #FFF; font-family: var(--font-disp); font-weight: 700; padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill); border: 3px solid #5A483E; cursor: pointer;
  box-shadow: 0 6px 0 #2A1F1A; transition: 0.1s; font-size: 1.05rem;
}
.copy-btn:hover { background: #5A483E; transform: translateY(-2px); box-shadow: 0 8px 0 #2A1F1A; }
.copy-btn:active, .copy-btn.copied { transform: translateY(4px); box-shadow: 0 2px 0 #2A1F1A; background: var(--honey-primary); color: var(--ink-heading); border-color: var(--honey-shadow); }

.api-access { text-align: center; margin-top: 6rem; font-weight: 600; font-size: 1.25rem; }
.api-access a { color: var(--honey-shadow); font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* FAQ */
.faq { padding: var(--section-pad) 0; position: relative; }
.faq-inner { max-width: 900px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }
.faq .section-h { text-align: center; margin-bottom: 4rem; }
.faq details {
  background: var(--card-bg); border-radius: var(--radius-md); margin-bottom: 1.4rem;
  border: 4px solid var(--card-border); box-shadow: 0 12px 0 var(--bg-cream-alt);
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); overflow: hidden;
}
.faq details:hover { transform: translateY(-2px); box-shadow: 0 14px 0 var(--card-border); }
.faq details[open] { border-color: var(--honey-primary); box-shadow: 0 12px 0 var(--honey-shadow); transform: translateY(-4px); }
.faq summary {
  padding: 2rem; font-family: var(--font-disp); font-weight: 700; font-size: 1.35rem;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  list-style: none; color: var(--ink-heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 2.6rem; color: var(--honey-primary); font-weight: 800; line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--honey-shadow); }
.faq details p { padding: 0 2rem 2rem; margin: 0; font-weight: 600; color: var(--ink-body); line-height: 1.7; font-size: 1.15rem; }
.faq details p a { color: var(--honey-shadow); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Footer */
.footer { padding: 6rem 0 5rem; background: #FFF0D4; text-align: center; margin-top: 6rem; border-top: 6px solid #F5E3BD; position: relative; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; justify-content: center; font-family: var(--font-disp); font-weight: 700; font-size: 2rem; color: var(--ink-heading); }
.footer-brand b { color: var(--honey-shadow); font-weight: 800; }
.footer-tag { background: var(--card-bg); padding: 0.5rem 1.2rem; border-radius: var(--radius-pill); font-size: 1rem; font-weight: 700; color: var(--ink-muted); margin-left: 1rem; border: 3px solid #F5E3BD; box-shadow: 0 4px 0 #F5E3BD; }
.footer-copy { font-weight: 600; color: var(--ink-muted); font-size: 1.1rem; }
.footer-copy a { color: var(--honey-shadow); font-weight: 800; text-decoration: none; }
.footer-copy a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Motion reveals */
.reveal { opacity: 0; transform: translateY(50px); }
.gsap-ready .reveal { will-change: transform, opacity; }
html:not(.gsap-ready) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Confetti overlay */
.confetti { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }

/* RTL */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .hero-grid, [dir="rtl"] .tool-card, [dir="rtl"] .opts, [dir="rtl"] .demo-block, [dir="rtl"] .code-shell { text-align: right; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .cmp { direction: ltr; }
[dir="rtl"] .cmp-tag { direction: rtl; }
[dir="rtl"] .code-shell, [dir="rtl"] .code-block pre, [dir="rtl"] .code-block code { direction: ltr; text-align: left; }
[dir="rtl"] .copy-btn { right: auto; left: 2rem; }
[dir="rtl"] .marquee-track { direction: ltr; }
[dir="rtl"] .footer-tag { margin-left: 0; margin-right: 1rem; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 4rem; }
  .hero-copy { margin: 0 auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .api-why { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links > a:not(.lang-toggle) { display: none; }
  .hero h1 { font-size: 3.2rem; }
  .tool-tabs { flex-direction: column; align-items: stretch; }
  .tab { max-width: none; }
}
