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

:root {
  --bg: #eee8de;
  --bg-dark: #ddd4c2;
  --ink: #2a2318;
  --ink-muted: #7a6e60;
  --green: #5a6b3a;
  --green-light: #8a9a6a;
  --green-pale: #e8ecdf;
  --sand: #c8b89a;
  --warm-white: #f7f3ec;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, backdrop-filter 0.4s;
}
nav.scrolled {
  background: rgba(238,232,222,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(90,107,58,0.12);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo img { width: 70px; height: 70px; flex-shrink: 0; }
.nav-logo-text {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-style: italic;
  letter-spacing: 0.01em;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.lang-btn {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.25rem 0.4rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border: none;
  background: none;
}
.lang-btn.active {
  color: var(--green);
  background: var(--green-pale);
}
.lang-divider { color: var(--sand); font-size: 0.75rem; }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-cta {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.6; }

/* HERO */
.hero {
  min-height: 100vh;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-circle {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-pale) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.hero-text {
  padding-top: 5rem;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--green);
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  text-wrap: pretty;
  white-space: pre-line;
}
.hero-title em {
  font-style: italic;
  color: var(--green);
}
.hero-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-muted);
  max-width: 38ch;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--warm-white);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.8rem;
  border-radius: 3px;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #4a5930; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.8rem;
  border-radius: 3px;
  border: 1px solid var(--sand);
  transition: border-color 0.2s, transform 0.2s;
}
.btn-secondary:hover { border-color: var(--ink-muted); transform: translateY(-1px); }

.hero-phones {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: -2rem;
  padding-top: 6rem;
  padding-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.phone-frame {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}
.phone-frame:nth-child(2) {
  margin-left: -30px;
  margin-top: -40px;
  z-index: 2;
  width: 240px;
}
.phone-frame:nth-child(3) {
  margin-left: -30px;
  z-index: 1;
}
.phone-shell {
  background: #1a1a1a;
  border-radius: 36px;
  padding: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.22), 0 8px 20px rgba(0,0,0,0.1);
}
.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 393/852;
  background: var(--bg);
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* DIVIDER */
.divider {
  text-align: center;
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  opacity: 0.3;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink);
}
.divider-glyph {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}

/* INTRO STRIP */
.intro-strip {
  background: var(--green);
  color: var(--warm-white);
  padding: 3.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}
.intro-strip-quote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  max-width: 60ch;
  opacity: 0.95;
}
.intro-strip-meta {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  white-space: nowrap;
  flex-shrink: 0;
}

/* FEATURES */
.features {
  padding: 7rem 4rem;
}
.section-header {
  margin-bottom: 4rem;
}
.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 1px;
  background: var(--green);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  max-width: 20ch;
  text-wrap: pretty;
}
.section-title em { font-style: italic; color: var(--green); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
}
.feature-card {
  background: var(--bg);
  padding: 2.5rem;
  transition: background 0.3s;
}
.feature-card:hover { background: var(--warm-white); }
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--green-pale);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--green);
}
.feature-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.feature-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.75;
}

/* SHOWCASE */
.showcase {
  padding: 5rem 4rem 7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.showcase.reverse { direction: rtl; }
.showcase.reverse > * { direction: ltr; }

.showcase-text .section-title { max-width: 28ch; }
.showcase-body {
  font-size: 0.95rem;
  color: var(--ink-muted);
  max-width: 40ch;
  margin-top: 1.25rem;
  line-height: 1.8;
  text-wrap: pretty;
}
.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.tag {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--green);
  background: var(--green-pale);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}

.showcase-phone {
  display: flex;
  justify-content: center;
  align-items: center;
}
.showcase-phone .phone-shell {
  max-width: 280px;
  width: 100%;
}

/* SCREENS STRIP */
.screens-strip {
  background: var(--bg-dark);
  padding: 5rem 0;
  overflow: hidden;
}
.screens-strip-inner {
  padding: 0 4rem;
  margin-bottom: 2.5rem;
}
.screens-row {
  display: flex;
  gap: 1.5rem;
  padding: 0 4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.screens-row::-webkit-scrollbar { display: none; }
.screens-row:active { cursor: grabbing; }
.screen-item {
  flex-shrink: 0;
  width: 200px;
}
.screen-item .phone-shell {
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.screen-caption {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-top: 0.75rem;
  text-transform: uppercase;
}

/* PHILOSOPHY */
.philosophy {
  padding: 7rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.philosophy-text .section-title { max-width: 20ch; }
.philosophy-body {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-top: 1.5rem;
  line-height: 1.9;
  max-width: 42ch;
  text-wrap: pretty;
}
.philosophy-pull {
  padding-top: 3rem;
}
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--green);
  text-wrap: pretty;
}
.pull-source {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 1.25rem;
  padding-left: 2rem;
}

/* CTA */
.cta-section {
  background: var(--ink);
  color: var(--warm-white);
  padding: 7rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: 'Bonsaist';
  position: absolute;
  font-family: var(--serif);
  font-size: 18vw;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.025);
  right: -2vw;
  bottom: -4vw;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: -0.03em;
}
.cta-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  text-wrap: pretty;
}
.cta-title em { font-style: italic; color: var(--green-light); }
.cta-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cta-sub {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(247,243,236,0.6);
  max-width: 38ch;
  text-wrap: pretty;
  line-height: 1.8;
}
.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--warm-white);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  transition: background 0.2s, transform 0.2s;
}
.store-btn:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.store-btn-label { display: flex; flex-direction: column; }
.store-btn-sub { font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.store-btn-name { font-size: 0.9rem; font-weight: 400; }
.store-btn svg { width: 20px; height: 20px; fill: currentColor; opacity: 0.8; }

/* FOOTER */
footer {
  background: var(--ink);
  color: rgba(247,243,236,0.4);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
footer .footer-logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(247,243,236,0.5);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
}
.footer-links a {
  color: rgba(247,243,236,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(247,243,236,0.8); }
.footer-sep { color: rgba(247,243,236,0.2); }
footer p { font-size: 0.78rem; }

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* TWEAKS PANEL */
#tweaks-panel {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 1.25rem;
  width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  font-family: var(--sans);
  font-size: 0.82rem;
}
#tweaks-panel.open { display: block; }
#tweaks-panel h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.tweak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.tweak-label {
  color: var(--ink-muted);
  flex-shrink: 0;
}
.tweak-row input[type=color] {
  width: 2rem;
  height: 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}
.tweak-row select {
  font-family: var(--sans);
  font-size: 0.78rem;
  border: 1px solid var(--sand);
  background: var(--bg);
  color: var(--ink);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
  max-width: 110px;
}
.tweak-row input[type=checkbox] { cursor: pointer; }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .hero { grid-template-columns: 1fr; padding: 6rem 1.5rem 3rem; gap: 2rem; }
  .hero-phones { padding-top: 2rem; }
  .phone-frame { width: 160px; }
  .phone-frame:nth-child(2) { width: 180px; }
  .intro-strip { padding: 2.5rem 1.5rem; flex-direction: column; gap: 1rem; }
  .features { padding: 4rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .showcase, .philosophy { grid-template-columns: 1fr; padding: 4rem 1.5rem; gap: 3rem; }
  .showcase.reverse { direction: ltr; }
  .showcase-phone { order: -1; }
  .screens-row { padding: 0 1.5rem; }
  .screens-strip-inner { padding: 0 1.5rem; }
  .cta-section { grid-template-columns: 1fr; padding: 5rem 1.5rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; padding: 1.5rem; }
}
