:root {
  --cream:       #FDF6E3;
  --cream-dark:  #F5EAC8;
  --gold:        #C9932A;
  --gold-light:  #E8B84B;
  --brown:       #5C3D1E;
  --brown-light: #8B5E3C;
  --crust:       #3A2210;
  --warm-white:  #FEFBF4;
  --soft-shadow: rgba(92,61,30,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--brown);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.032;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(253,246,227,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,147,42,0.18);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-mark {
  margin-right: 0.5rem;
  width: 32px;
  height: 32px;
  background: var(--gold);
  border-radius: 50% 50% 50% 20%;
  transform: rotate(-15deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--warm-white);
  flex-shrink: 0;
}
.logo-mark:hover {
  background: var(--gold-light);
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--brown-light);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--brown);
  color: var(--cream) !important;
  padding: 0.5rem 1.3rem;
  border-radius: 50px;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--crust) !important; transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Warm radial glow */
.hero::after {
  content: '';
  position: absolute;
  width: 900px; height: 900px;
  background: radial-gradient(ellipse, rgba(232,184,75,0.22) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
}

/* Floating dough blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}
.blob-1 { width:400px;height:400px;background:radial-gradient(#E8B84B,#C9932A); top:-80px;right:-100px;animation-delay:0s; }
.blob-2 { width:300px;height:300px;background:radial-gradient(#F5EAC8,#E8B84B); bottom:0;left:-80px;animation-delay:-3s; }
.blob-3 { width:220px;height:220px;background:radial-gradient(#C9932A,#8B5E3C); top:40%;right:5%;animation-delay:-5s; }

@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}

.hero-badge {
  display: inline-block;
  background: var(--cream-dark);
  border: 1.5px solid rgba(201,147,42,0.4);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  position: relative; z-index: 1;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.0;
  color: var(--crust);
  letter-spacing: -0.03em;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--brown-light);
  max-width: 580px;
  margin: 1.5rem auto 2.5rem;
  font-weight: 300;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s 0.3s ease both;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--brown);
  color: var(--cream);
  box-shadow: 0 6px 28px rgba(58,34,16,0.25);
}
.btn-primary:hover { box-shadow: 0 10px 36px rgba(58,34,16,0.35); background: var(--crust); }
.btn-secondary {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid rgba(92,61,30,0.3);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* ── STAT STRIP ── */
.stats-strip {
  background: var(--brown);
  color: var(--cream);
  display: flex; justify-content: center; gap: 0;
  overflow: hidden;
}
.stat-item {
  padding: 2rem 3.5rem;
  text-align: center;
  border-right: 1px solid rgba(253,246,227,0.1);
  flex: 1; max-width: 240px;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253,246,227,0.6);
  margin-top: 0.4rem;
}

/* ── SECTIONS ── */
section { padding: 6rem 2rem; }

.container { max-width: 1100px; margin: 0 auto; }

.section-tag {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--crust);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.section-title em { font-style: italic; color: var(--gold); }

/* ── FEATURES ── */
#features { background: var(--warm-white); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.feature-card {
  background: var(--cream);
  border: 1.5px solid rgba(201,147,42,0.15);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(232,184,75,0.07), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px var(--soft-shadow); border-color: rgba(201,147,42,0.4); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 16px rgba(201,147,42,0.3);
}
.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--crust);
  margin-bottom: 0.6rem;
}
.feature-card p { font-size: 0.9rem; color: var(--brown-light); line-height: 1.65; }

/* ── CODE SECTION ── */
#code { background: var(--crust); color: var(--cream); }
#code .section-title { color: var(--cream-dark); }
#code .section-tag { color: var(--gold-light); }
#code p { color: rgba(253,246,227,0.7); }

.code-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem;
}
@media(max-width:780px){ .code-layout { grid-template-columns: 1fr; } }

.code-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(232,184,75,0.15);
  border-radius: 16px;
  overflow: hidden;
}
.code-header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(232,184,75,0.1);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #FF5F57; }
.dot-y { background: #FFBD2E; }
.dot-g { background: #27C93F; }
.code-filename {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: rgba(253,246,227,0.4);
  margin-left: 0.4rem;
}
.code-label {
  margin-left: auto;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
}
.label-before { background: rgba(220,80,80,0.2); color: #FF9090; border: 1px solid rgba(220,80,80,0.3); }
.label-after  { background: rgba(39,201,63,0.15); color: #7EE89A; border: 1px solid rgba(39,201,63,0.25); }

pre {
  padding: 1.4rem 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  overflow-x: auto;
  color: rgba(253,246,227,0.85);
}
.kw { color: #E8B84B; }
.fn { color: #88D4AB; }
.str { color: #F0A07A; }
.cm { color: rgba(253,246,227,0.35); font-style: italic; }
.var { color: #A8C8FF; }
.cls { color: #FFD580; }

.code-desc {
  margin-top: 0;
  display: flex; flex-direction: column; gap: 1.5rem;
  justify-content: center;
}
.code-desc-item { display: flex; gap: 1rem; align-items: flex-start; }
.code-desc-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(232,184,75,0.12);
  border: 1px solid rgba(232,184,75,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.code-desc-text h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 0.2rem;
}
.code-desc-text p { font-size: 0.85rem; color: rgba(253,246,227,0.55); line-height: 1.6; }

/* ── HOW IT WORKS ── */
#how { background: var(--cream-dark); }

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 3.5rem;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 28px; top: 28px; bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--brown-light));
  opacity: 0.3;
}

.step {
  display: flex; gap: 2rem; align-items: flex-start;
  padding: 1.5rem 0;
}
.step-num {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--cream);
  border: 2px solid rgba(201,147,42,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  position: relative; z-index: 1;
  box-shadow: 0 4px 16px var(--soft-shadow);
}
.step-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--crust);
  margin-bottom: 0.4rem;
  padding-top: 0.8rem;
}
.step-body p { font-size: 0.9rem; color: var(--brown-light); max-width: 540px; }

/* ── TESTIMONIALS ── */
#testimonials { background: var(--warm-white); }

.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.testi-card {
  background: var(--cream);
  border: 1.5px solid rgba(201,147,42,0.12);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
}
.testi-card::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  line-height: 0.6;
  color: rgba(201,147,42,0.12);
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  pointer-events: none;
}
.testi-text {
  font-size: 0.95rem;
  color: var(--brown);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  position: relative;
  font-style: italic;
}
.testi-author { display: flex; align-items: center; gap: 0.9rem; }
.testi-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--brown-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}
.testi-name { font-weight: 500; font-size: 0.88rem; color: var(--crust); }
.testi-role { font-size: 0.78rem; color: var(--brown-light); }

/* ── INSTALL ── */
#install {
  background: linear-gradient(160deg, var(--brown) 0%, var(--crust) 100%);
  color: var(--cream);
  text-align: center;
}
#install .section-title { color: var(--cream-dark); }
#install .section-tag { color: var(--gold-light); }

.install-box {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,184,75,0.2);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  margin: 2.5rem auto;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: var(--gold-light);
  max-width: 500px;
  width: 100%;
}
.install-box span { color: rgba(253,246,227,0.4); }
.copy-btn {
  margin-left: auto;
  background: rgba(232,184,75,0.15);
  border: 1px solid rgba(232,184,75,0.25);
  color: var(--gold-light);
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { background: rgba(232,184,75,0.25); }

.install-note {
  font-size: 0.85rem;
  color: rgba(253,246,227,0.45);
  margin-top: -1rem;
  margin-bottom: 2.5rem;
}

/* ── FOOTER ── */
footer {
  background: var(--crust);
  color: rgba(253,246,227,0.4);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.82rem;
  border-top: 1px solid rgba(232,184,75,0.08);
}
footer strong { color: rgba(253,246,227,0.7); font-family: 'Playfair Display', serif; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ── BREADCRUMB BRIOCHE SVG DECO ── */
.brioche-deco {
  display: block;
  margin: 0 auto 2rem;
  width: 120px;
  opacity: 0.18;
  animation: float 6s ease-in-out infinite;
}

/* ── EASTER EGG BACKDROP ── */
#egg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 8, 4, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#egg-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── EASTER EGG HUD ── */
.egg-hud {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(201,147,42,0.12);
  border: 1px solid rgba(201,147,42,0.35);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--brown);
  transition: opacity 0.3s, transform 0.3s;
}

.egg-hud--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
}

.egg-hud-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.egg-hud-icon { font-size: 1rem; line-height: 1; }

.egg-hud-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-light);
}

.egg-hud-sep {
  width: 1px;
  height: 16px;
  background: rgba(201,147,42,0.3);
}

#egg-count,
#egg-score {
  font-weight: 700;
  color: var(--gold);
  min-width: 1.4ch;
  text-align: right;
}

@media(max-width:640px){
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .stats-strip { flex-wrap: wrap; }
  .stat-item { max-width: 50%; flex: 0 0 50%; }
  .steps::before { display: none; }
  .egg-hud-label { display: none; }
}
