/* ──────────────────────────────────────────────────────────────
   Bonsaily — editorial / wabi-sabi / zen minimalism
   One stylesheet. Colours, type, rhythm.
   ────────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --bg:          #0f1411;
  --bg-soft:     #141a16;
  --ink:         #e8ede5;
  --ink-dim:     #a6b0a6;
  --ink-fade:    #6a7770;
  --moss:        #2f3d33;
  --sage:        #8a9588;
  --terracotta:  #c9826a;
  --terracotta-soft: #d8957d;
  --line:        #26302a;
  --line-soft:   #1c2320;

  /* Type */
  --serif:  "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:   "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Rhythm */
  --rule-weight: 0.6px;
  --section-pad: clamp(72px, 12vw, 160px);
  --gutter:      clamp(20px, 4vw, 56px);
  --max:         1180px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

.sr { position: absolute; left: -9999px; }

/* Decorative grain overlay — lets the bg breathe like rice paper */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  width: 100vw; height: 100vh;
  opacity: .06;
  mix-blend-mode: overlay;
  z-index: 100;
}

/* ─────────────────── Header ─────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: .02em;
}
.mark svg { color: var(--terracotta); }

.nav {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-dim);
}
.nav a { color: inherit; text-decoration: none; transition: color .25s; }
.nav a:hover { color: var(--terracotta); }

@media (max-width: 600px) {
  .nav { display: none; }
}

/* ─────────────────── Hero (full-bleed video) ─────────────────── */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(120px, 14vh, 180px) var(--gutter) clamp(80px, 10vw, 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: none;
  overflow: hidden;
  isolation: isolate;
  animation: rise 1.2s cubic-bezier(.2,.7,.1,1) both;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: hero-breathe 18s ease-in-out infinite;

  /* Feather the edges so the video blends into the page on every side */
  --fade: 14%;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
    linear-gradient(to right,  transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
    linear-gradient(to right,  transparent 0%, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
          mask-composite: intersect;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* Left-to-right readability gradient */
    linear-gradient(90deg, rgba(15,20,17,.88) 0%, rgba(15,20,17,.66) 38%, rgba(15,20,17,.28) 70%, rgba(15,20,17,.50) 100%),
    /* Stronger vignette top & bottom for full blend */
    linear-gradient(180deg, rgba(15,20,17,1) 0%, rgba(15,20,17,0) 24%, rgba(15,20,17,0) 74%, rgba(15,20,17,1) 100%);
}

.hero-copy {
  position: relative;
  max-width: 680px;
  margin: 0 auto 0 max(0px, calc((100vw - var(--max)) / 2));
  padding: 0;
}

.hero-copy,
.vertical-label {
  /* Slightly extra shadow so text stays crisp on any video frame */
  text-shadow: 0 1px 24px rgba(0,0,0,.35);
}

/* Hide the old SVG bonsai figure */
.bonsai-figure.removed { display: none !important; }

@keyframes hero-breathe {
  0%, 100% { transform: scale(1.02); }
  50%      { transform: scale(1.06); }
}

.vertical-label {
  position: absolute;
  left: calc(var(--gutter) - 6px);
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: .75;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 900px) { .vertical-label { display: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 28px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(201, 130, 106, .14);
  animation: pulse 2.8s ease-in-out infinite;
}

.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 7vw, 94px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--ink);
}
.hero-copy h1 em {
  color: var(--terracotta);
  font-style: italic;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 38ch;
  margin: 0 0 36px;
  font-weight: 400;
}

/* Waitlist form */
.waitlist {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 2px;
  max-width: 460px;
  overflow: hidden;
  transition: border-color .3s;
}
.waitlist:focus-within { border-color: var(--terracotta); }

.waitlist input {
  flex: 1;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}
.waitlist input::placeholder { color: var(--ink-fade); }

.waitlist button {
  border: 0;
  background: var(--terracotta);
  color: var(--bg);
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s;
  white-space: nowrap;
}
.waitlist button:hover { background: var(--terracotta-soft); }
.waitlist button:disabled { opacity: .9; cursor: default; }
.waitlist button.done { background: var(--moss); color: var(--ink); }

.waitlist-note {
  width: 100%;
  order: 3;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin: 14px 0 0;
  padding: 0 2px;
}

/* ─────────── Bonsai figure ─────────── */
.bonsai-figure {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 460px;
  justify-self: end;
  isolation: isolate;
}

.wind-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.wind-lines .wind {
  stroke-dasharray: 180 600;
  stroke-dashoffset: 800;
  animation: wind-drift linear infinite;
}
.wind-lines .w1 { animation-duration: 9s;  animation-delay: 0s; }
.wind-lines .w2 { animation-duration: 12s; animation-delay: -2s; }
.wind-lines .w3 { animation-duration: 10s; animation-delay: -5s; }
.wind-lines .w4 { animation-duration: 14s; animation-delay: -1s; }

.bonsai {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
}

/* Layered sway — each layer has its own pace & phase for natural wind motion.
   Pivots are anchored with transform-origin (set on the SVG groups inline). */
.tree        { animation: sway-root 11s ease-in-out infinite; }
.trunk-mid   { animation: sway-mid  8s  ease-in-out infinite; animation-delay: -1.3s; }
.trunk-top   { animation: sway-top  6s  ease-in-out infinite; animation-delay: -0.6s; }

/* Each branch + cluster gets its own rhythm */
.b-low-left   { animation: sway-branch 7.5s ease-in-out infinite; animation-delay: -2s; }
.b-low-right  { animation: sway-branch 9s   ease-in-out infinite; animation-delay: -1s; }
.b-mid-right  { animation: sway-branch 6.5s ease-in-out infinite; animation-delay: -3s; }
.b-upper-left { animation: sway-branch 8s   ease-in-out infinite; animation-delay: -0.5s; }
.b-crown      { animation: sway-branch 5.5s ease-in-out infinite; animation-delay: -2.2s; }

.cluster-1 { animation: cluster-bob 5.2s ease-in-out infinite; transform-origin: 90px 220px; }
.cluster-2 { animation: cluster-bob 4.8s ease-in-out infinite; transform-origin: 260px 216px; animation-delay: -1.1s; }
.cluster-3 { animation: cluster-bob 6.1s ease-in-out infinite; transform-origin: 290px 130px; animation-delay: -0.7s; }
.cluster-4 { animation: cluster-bob 5.6s ease-in-out infinite; transform-origin: 125px 85px; animation-delay: -2.3s; }
.cluster-5 { animation: cluster-bob 4.5s ease-in-out infinite; transform-origin: 218px 40px; animation-delay: -0.4s; }

/* Seal slowly exhales in/out */
.seal-g {
  animation: seal-breathe 7s ease-in-out infinite;
  transform-origin: 300px 50px;
}

/* Drifting leaves — each with its own curving path */
.drift-leaf { opacity: 0; offset-rotate: auto; }
.drift-1 {
  offset-path: path("M 300 -20 Q 260 80 240 160 Q 180 220 120 280 Q 60 340 -30 400");
  animation: drift 16s linear infinite;
}
.drift-2 {
  offset-path: path("M 360 40 Q 320 120 340 200 Q 260 260 200 320 Q 120 370 20 420");
  animation: drift 22s linear infinite;
  animation-delay: -7s;
}
.drift-3 {
  offset-path: path("M 340 100 Q 280 160 300 240 Q 220 300 180 360 Q 80 400 -10 440");
  animation: drift 19s linear infinite;
  animation-delay: -14s;
}
.drift-4 {
  offset-path: path("M 380 -10 Q 340 60 280 140 Q 240 220 160 300 Q 80 360 0 420");
  animation: drift 25s linear infinite;
  animation-delay: -18s;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 48px; }
  .bonsai-figure { order: -1; max-width: 320px; justify-self: center; }
}

/* Keyframes — gentle, natural, offset peaks across layers */
@keyframes sway-root {
  0%, 100% { transform: rotate(-0.6deg); }
  50%      { transform: rotate(0.6deg); }
}
@keyframes sway-mid {
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1.2deg); }
}
@keyframes sway-top {
  0%, 100% { transform: rotate(-1.6deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes sway-branch {
  0%, 100% { transform: rotate(-1.2deg) translateX(-0.5px); }
  50%      { transform: rotate(1.8deg) translateX(0.5px); }
}
@keyframes cluster-bob {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%      { transform: rotate(2.4deg) translateY(-1px); }
}
@keyframes seal-breathe {
  0%, 100% { transform: scale(1) rotate(-6deg); opacity: .75; }
  50%      { transform: scale(1.04) rotate(-4deg); opacity: .88; }
}
@keyframes wind-drift {
  0%   { stroke-dashoffset: 800; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { stroke-dashoffset: -400; opacity: 0; }
}
@keyframes drift {
  0%   { offset-distance: 0%;   opacity: 0; transform: rotate(0deg); }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; transform: rotate(360deg); }
}

/* ─────────────────── Section chrome ─────────────────── */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
  border-top: var(--rule-weight) solid var(--line);
}

.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head.centered { justify-content: center; text-align: center; }
.sec-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--terracotta);
  opacity: .85;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ─────────────────── Problem / 4-tab stack ─────────────────── */
.tab-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto 1.05fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 48px;
}
.tab {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 6px;
  padding: 20px 18px 18px;
  border: var(--rule-weight) solid var(--line);
  background: var(--bg-soft);
  position: relative;
  transition: border-color .3s, transform .3s;
}
.tab::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  top: 50%;
  border-top: 1px solid var(--ink-fade);
  opacity: .5;
}
.tab-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-fade);
}
.tab-name {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-dim);
  font-style: italic;
  opacity: .7;
}
.tab-job {
  font-size: 12.5px;
  color: var(--ink-fade);
  line-height: 1.4;
}
.tab-cost {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-fade);
  letter-spacing: .08em;
  margin-top: 4px;
}

.tab-arrow {
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--terracotta);
  padding: 0 6px;
}

.tab-replacement {
  border-color: var(--terracotta);
  background: transparent;
}
.tab-replacement::after { display: none; }
.tab-replacement .tab-name {
  color: var(--ink);
  opacity: 1;
  font-size: 26px;
}
.tab-replacement .tab-job { color: var(--ink-dim); }
.tab-replacement .tab-cost { color: var(--terracotta); }

.aside-line {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--ink-dim);
  text-align: center;
  margin: 0;
  padding-top: 28px;
  border-top: var(--rule-weight) solid var(--line-soft);
}
.aside-line em { color: var(--terracotta); font-style: italic; }

@media (max-width: 900px) {
  .tab-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .tab-arrow {
    grid-column: 1 / -1;
    font-size: 24px;
    transform: rotate(90deg);
    padding: 4px 0;
  }
  .tab-replacement { grid-column: 1 / -1; }
}

/* ─────────────────── Pillars ─────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--rule-weight) solid var(--line);
}
.pillar {
  background: var(--bg);
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background .4s;
}
.pillar:hover { background: var(--bg-soft); }
.pillar-icon { width: 32px; height: 32px; color: var(--terracotta); }
.pillar h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.pillar p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ─────────────────── Pricing ─────────────────── */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.plan {
  position: relative;
  padding: 36px 30px 32px;
  border: var(--rule-weight) solid var(--line);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
}
.plan h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 22px;
}
.plan .price {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 68px;
  line-height: 1;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.plan .price .curr {
  font-size: 32px;
  vertical-align: top;
  color: var(--ink-dim);
  margin-right: 2px;
}
.plan .price .per {
  font-size: 18px;
  font-family: var(--sans);
  color: var(--ink-fade);
  font-weight: 300;
  letter-spacing: 0;
  margin-left: 4px;
}
.plan .price-sub {
  font-size: 12.5px;
  color: var(--ink-fade);
  margin: 8px 0 26px;
  line-height: 1.4;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan li {
  font-size: 14px;
  color: var(--ink-dim);
  padding-left: 18px;
  position: relative;
}
.plan li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--terracotta);
  font-size: 18px;
  line-height: 1;
  top: 2px;
}
.plan-cta {
  display: block;
  text-align: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .25s, color .25s;
}
.plan-cta:hover { border-color: var(--terracotta); color: var(--terracotta); }

.plan-featured {
  border-color: var(--terracotta);
  background: linear-gradient(180deg, rgba(201,130,106,.06), var(--bg-soft) 60%);
}
.plan-featured .plan-cta {
  background: var(--terracotta);
  color: var(--bg);
  border-color: var(--terracotta);
}
.plan-featured .plan-cta:hover { background: var(--terracotta-soft); border-color: var(--terracotta-soft); color: var(--bg); }

.plan-badge {
  position: absolute;
  top: -10px;
  left: 30px;
  background: var(--bg);
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 4px 10px;
}

@media (max-width: 850px) { .plans { grid-template-columns: 1fr; } }

/* ─────────────────── Manifesto ─────────────────── */
.manifesto {
  text-align: center;
}
.manifesto .sec-num { display: block; margin-bottom: 20px; }
.manifesto blockquote {
  margin: 0 auto;
  max-width: 720px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.manifesto blockquote p {
  margin: 0 0 22px;
}
.manifesto blockquote em { color: var(--terracotta); font-style: italic; }
.manifesto blockquote p:last-of-type { margin-bottom: 40px; }
.quote-attr {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-fade);
  font-style: normal;
}

/* ─────────────────── Final CTA ─────────────────── */
.final-cta { text-align: center; }
.waitlist-lg { max-width: 520px; margin: 0 auto; }
.waitlist-lg input { padding: 20px 22px; font-size: 16px; }
.waitlist-lg button { padding: 0 28px; font-size: 12px; }
.final-note {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-fade);
}

/* ─────────────────── Footer ─────────────────── */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px var(--gutter) 44px;
  border-top: var(--rule-weight) solid var(--line);
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}
.footer-brand .wordmark-sm {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}
.footer-brand p {
  margin: 0;
  color: var(--ink-fade);
  font-size: 13px;
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.footer-nav a { color: var(--ink-dim); text-decoration: none; transition: color .25s; }
.footer-nav a:hover { color: var(--terracotta); }

.footer-colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.col-rule {
  width: 20px; height: 1px; background: var(--line);
  display: inline-block;
}

@media (max-width: 700px) {
  .footer-row { grid-template-columns: 1fr; }
}

/* ─────────────────── Animations ─────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(201, 130, 106, .14); }
  50%      { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(201, 130, 106, .05); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.006); }
}
@keyframes drift {
  0%   { offset-distance: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
