/* Tendril / Applewood Instruments — promo site
   Minimal, single page. No build step. */

:root {
  --green-deep: #123c22;
  --green: #1c6636;
  --green-bright: #2c8b4b;
  --cream: #f4ecd8;
  --cream-dim: #e4d9bd;
  --ink: #101410;
  --ink-soft: #3a4038;
  --wood-a: #caa06a;
  --wood-b: #b8895a;
  --wood-c: #dcb87f;
  --chrome-a: #f4f4f2;
  --chrome-b: #9aa0a3;
  --oled-bg: #061014;
  --oled-fg: #7dffd8;
  --oled-fg-dim: #2f6f63;
  --radius-lg: 22px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", var(--serif);
  --mono-oled: "VT323", "Courier New", monospace;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }

.mark-ring { fill: none; stroke: var(--cream); stroke-width: 2.5; }
.mark-a { fill: var(--cream); font-family: var(--hand); font-size: 34px; text-anchor: middle; }

.brand-name { font-size: 0.98rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.92rem;
}

.site-nav a { text-decoration: none; opacity: 0.85; }
.site-nav a:hover { opacity: 1; }

.nav-cta {
  background: var(--green-bright);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 1 !important;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: clamp(24px, 6vw, 64px) 20px clamp(8px, 3vw, 24px);
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--green-bright);
  margin: 0 0 8px;
}

.wordmark {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(3.6rem, 12vw, 7rem);
  margin: 0;
  color: var(--cream);
  line-height: 1;
}

.tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--cream-dim);
  max-width: 560px;
  margin: 18px auto 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--green-bright);
  color: var(--ink);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(44,139,75,0.35); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244,236,216,0.35);
}
.btn-ghost:hover { border-color: var(--cream); }

.btn-large { padding: 16px 32px; font-size: 1.05rem; }

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
  background: var(--cream);
  color: var(--ink);
}
.btn-small:hover { background: #fff; }

/* ---------- wood stage / pedal ---------- */

.stage-section { padding: 8px 20px clamp(40px, 6vw, 72px); }

.wood-stage {
  --wood: repeating-linear-gradient(93deg,
      #c99a5b 0px, #c99a5b 3px,
      #bd8c4c 4px, #bd8c4c 6px,
      #d1a666 7px, #d1a666 11px,
      #c2905090 12px, transparent 13px,
      #c99a5b 15px, #c99a5b 19px,
      #b5824a 20px, #b5824a 22px,
      #d4ac6d 23px, #d4ac6d 29px,
      #c69756 30px, #c69756 34px);
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 48px);
  background-color: #c99a5b;
  background-image:
    radial-gradient(120% 90% at 22% 12%, rgba(255,255,255,0.22), transparent 55%),
    radial-gradient(120% 90% at 85% 95%, rgba(0,0,0,0.18), transparent 60%),
    var(--wood);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-hint {
  margin: 22px 0 0;
  font-size: 0.86rem;
  color: rgba(16,20,16,0.72);
  text-align: center;
  max-width: 520px;
}

/* the pedal itself */

.pedal {
  --pw: min(82vw, 300px);
  width: var(--pw);
  aspect-ratio: 140.6895 / 345.1615;   /* portrait — matches the labeling mockup SVG body exactly */
  position: relative;
  container-type: inline-size;
  border-radius: 26px;
  background:
    radial-gradient(140% 160% at 18% -10%, rgba(255,255,255,0.30), transparent 45%),
    radial-gradient(120% 140% at 90% 120%, rgba(0,0,0,0.35), transparent 55%),
    repeating-radial-gradient(circle at 10% 20%, rgba(255,255,255,0.05) 0 1px, transparent 1px 6px),
    linear-gradient(155deg, #1e7a41 0%, #175e33 45%, #0f4324 100%);
  box-shadow:
    0 22px 40px rgba(0,0,0,0.45),
    0 4px 0 rgba(0,0,0,0.25),
    inset 0 0 0 2px rgba(0,0,0,0.25),
    inset 0 2px 6px rgba(255,255,255,0.18);
  user-select: none;
}

.pedal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 24% 68%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 15%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 55% 80%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 40%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.5px 1.5px at 80% 65%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 25%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 33% 45%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 72% 85%, rgba(255,255,255,0.75), transparent 60%);
  pointer-events: none;
  opacity: 0.55;
}

/* Applewood apple mark, reused on the pedal, header and footer */
.apple-mark { width: 100%; height: 100%; color: #eae5ab; }

/* logo badge, bottom-left corner (foot end) */
.p-logo {
  position: absolute;
  left: 9%;
  top: 89%;
  width: 13%;
  aspect-ratio: 25 / 24;
  color: rgba(234,229,171,0.9);
}

/* footswitch, bottom-centre (foot end) */
.p-switch {
  position: absolute;
  left: 50%;
  top: 84.72%;
  transform: translate(-50%, -50%);
  width: 34.94%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 35% 30%, #fdfdfd, #c9cfd2 45%, #7d8488 78%, #565b5e 100%);
  box-shadow: 0 3px 0 #4b4f52, 0 6px 10px rgba(0,0,0,0.4), inset 0 0 0 2px rgba(0,0,0,0.15);
}
.p-switch-cap {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffffff, #d7dadb 40%, #9aa0a3 100%);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.25);
  transition: transform 0.08s ease;
}
.p-switch.is-down .p-switch-cap { transform: scale(0.92) translateY(2px); }
.p-switch.is-muted { box-shadow: 0 1px 0 #4b4f52, 0 2px 6px rgba(0,0,0,0.4), inset 0 0 0 2px rgba(255,80,80,0.5); }

.p-label {
  position: absolute;
  font-family: var(--hand);
  font-weight: 600;
  color: rgba(244,236,216,0.8);
  font-size: clamp(9px, 1.5cqw, 13px);
  white-space: nowrap;
  pointer-events: none;
}
/* TAP / MUTE — to the right of the footswitch */
.p-label-switch { left: 66%; top: 82%; text-align: left; line-height: 1.05; }
.p-label-switch span { display: block; }
.p-label-preset {
  left: 0;
  top: 76%;
  width: 100%;
  text-align: center;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* knobs (Lo/Hi) — side by side below the screen */
.p-knob-wrap { position: absolute; width: 24%; aspect-ratio: 1; }
.p-knob-a-wrap { left: 17.85%; top: 60.79%; }
.p-knob-b-wrap { left: 58.15%; top: 60.79%; }

.p-knob {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: grab;
  background: radial-gradient(circle at 35% 28%, #ffffff, #f1ede2 40%, #d9d2bd 75%, #b7ae95 100%);
  box-shadow: 0 3px 0 #a49c85, 0 6px 10px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.1);
}
.p-knob:active { cursor: grabbing; }
.p-knob-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: rotate(-135deg);
  transition: transform 0.05s linear;
}
.p-knob-tick {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 10%;
  height: 32%;
  background: var(--ink-soft);
  border-radius: 2px;
  transform: translateX(-50%);
}
/* dual knob labels — primary above, secondary to the outer side (as silkscreened).
   Both stay printed; the active mode brightens its pair (see .morph-active). */
.p-klabel-top { left: -20%; top: -30%; width: 140%; text-align: center; opacity: 0.5; }
.p-klabel-side { top: 34%; opacity: 0.95; }
.p-klabel-lo { right: 106%; }
.p-klabel-hi { left: 106%; }
.p-knob-wrap.morph-active .p-klabel-top { opacity: 0.95; }
.p-knob-wrap.morph-active .p-klabel-side { opacity: 0.5; }

/* screen — 128×64 OLED, kept at a true 2:1 landscape aspect */
.p-screen {
  position: absolute;
  left: 50%;
  top: 34.35%;
  transform: translateX(-50%);
  width: 61.8%;
  height: 13.14%;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 0 0 3px #0a0a0a, inset 0 0 6px rgba(0,0,0,0.9), 0 2px 4px rgba(0,0,0,0.5);
  overflow: hidden;
}
.p-screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* wordmark engraving — between wave knob and screen */
.p-wordmark {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 100%;
  text-align: center;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(16px, 9cqw, 30px);
  color: rgba(234,229,171,0.9);
  transform: translateX(-50%) rotate(-2deg);
}

/* wave selector — 270° pot at the top of the pedal */
.p-label-wave { left: 0; top: 3%; width: 100%; text-align: center; letter-spacing: 0.12em; }
.p-wave-wrap {
  position: absolute;
  left: 50%;
  top: 2.94%;
  transform: translateX(-50%);
  width: 52%;
  aspect-ratio: 1;
}
.p-wave-knob {
  width: 62%;
  height: 62%;
  margin: 19%;
  background: radial-gradient(circle at 35% 28%, #4a4a4a, #1c1c1c 55%, #050505 100%);
  box-shadow: 0 3px 0 #000, 0 6px 12px rgba(0,0,0,0.5), inset 0 0 0 2px #3a3a3a;
}
.p-wave-face .p-knob-tick { background: #e9e2cf; top: 6%; height: 34%; }
.p-wave-labels {
  position: absolute;
  inset: 0;
}
.wave-tag {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(244,236,216,0.55);
  transition: color 0.15s ease, transform 0.15s ease;
}
.wave-tag svg { width: 15px; height: 15px; }
.wave-tag.active { color: var(--cream); transform: scale(1.18); }
.wave-tag-mode { color: rgba(234,229,171,0.5); }
.wave-tag-mode.active { color: #eae5ab; }

/* ---------- control strip ---------- */

.control-strip {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  padding: 16px 20px;
  background: rgba(244,236,216,0.04);
  border: 1px solid rgba(244,236,216,0.1);
  border-radius: 14px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.86rem;
}

.control-group { display: flex; align-items: center; gap: 8px; }
.control-group-wide { flex: 1 1 220px; min-width: 200px; }
.control-label { color: var(--cream-dim); white-space: nowrap; }

select {
  background: var(--ink);
  color: var(--cream);
  border: 1px solid rgba(244,236,216,0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 0.86rem;
  max-width: 100%;
}

.midi-status {
  font-size: 0.8rem;
  color: var(--green-bright);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(44,139,75,0.12);
}
.midi-status.is-live { color: #ffdf7e; background: rgba(255,223,126,0.14); }

/* ---------- features ---------- */

.features {
  padding: clamp(50px, 8vw, 96px) 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.features h2, .story h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: clamp(28px, 5vw, 48px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
}

.feature {
  padding: 24px;
  border: 1px solid rgba(244,236,216,0.1);
  border-radius: 16px;
  background: rgba(244,236,216,0.03);
}
.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { color: var(--cream-dim); font-size: 0.92rem; margin: 0; }

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(44,139,75,0.15);
  position: relative;
}
.feature-icon::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--green-bright);
}
.feature-icon[data-wave="sine"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0 10c2 0 2-7 5-7s3 14 6 14 3-7 5-7 2-7 4-7' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0 10c2 0 2-7 5-7s3 14 6 14 3-7 5-7 2-7 4-7' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.feature-icon[data-icon="presets"]::before { -webkit-mask: radial-gradient(circle, #000 40%, transparent 41%) 0 0/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 100% 0/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 0 100%/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 100% 100%/50% 50%; mask: radial-gradient(circle, #000 40%, transparent 41%) 0 0/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 100% 0/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 0 100%/50% 50%, radial-gradient(circle, #000 40%, transparent 41%) 100% 100%/50% 50%; }
.feature-icon[data-icon="clock"]::before { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--green-bright); inset: 8px; }
.feature-icon[data-icon="cc"]::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 15V5l16 5-16 5z' fill='%23000'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 15V5l16 5-16 5z' fill='%23000'/%3E%3C/svg%3E") center/contain no-repeat; }
.feature-icon[data-icon="usb"]::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='8' width='14' height='4' rx='2' fill='%23000'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='3' y='8' width='14' height='4' rx='2' fill='%23000'/%3E%3C/svg%3E") center/contain no-repeat; }
.feature-icon[data-icon="custom"]::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 17l3-9 3 6 2-11 3 12 2-7 3 9' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 17l3-9 3 6 2-11 3 12 2-7 3 9' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- story ---------- */

.story { padding: clamp(40px, 8vw, 88px) 20px; background: rgba(244,236,216,0.02); }
.story-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.story p { color: var(--cream-dim); font-size: 1.02rem; }
.story strong { color: var(--cream); }

.story-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.story-badge {
  flex: 1 1 180px;
  max-width: 220px;
  padding: 20px 16px;
  border: 1px solid rgba(244,236,216,0.12);
  border-radius: 14px;
  font-size: 0.9rem;
}
.story-badge-num {
  display: block;
  font-family: var(--hand);
  font-size: 1.8rem;
  color: var(--green-bright);
  margin-bottom: 6px;
}

/* ---------- buy ---------- */

.buy { padding: clamp(40px, 8vw, 96px) 20px; }
.buy-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(28,102,54,0.25), rgba(15,20,15,0.4));
  border: 1px solid rgba(44,139,75,0.35);
}
.buy-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--green-bright);
  margin: 0 0 10px;
}
.buy-price { font-size: 2.4rem; font-weight: 700; margin: 12px 0 20px; }
.buy-price span { font-size: 1rem; font-weight: 400; color: var(--cream-dim); }
.buy-list {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--cream-dim);
}
.buy-list li { padding-left: 22px; position: relative; }
.buy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
}
.buy-note { font-size: 0.8rem; color: var(--cream-dim); margin: 16px 0 0; }

/* ---------- footer ---------- */

.site-footer {
  padding: 36px 20px 48px;
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.82rem;
}
.footer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--cream);
}
.footer-mark svg { width: 22px; height: 22px; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .site-nav { display: none; }
  .control-strip { justify-content: flex-start; }
}
