:root {
  --paper: #f5f0e6;
  --paper-alt: #fae3ea;
  --roast: #3e2723;
  --honey: #f4c9d6;
  --fern: #d68fa3;
  --ink: #3e2723;
  --text-muted: #6b5049;
  --label: #8a6b67;
  --border: #fe019a;
  --radius: 16px;
  --sidebar-w: 240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #201a17;
    --paper-alt: #2a211d;
    --ink: #f5ede6;
    --text-muted: #c9b5ad;
    --label: #b39a92;
  }
}

:root[data-theme="dark"] {
  --paper: #201a17;
  --paper-alt: #2a211d;
  --ink: #f5ede6;
  --text-muted: #c9b5ad;
  --label: #b39a92;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.4em;
}

.dot { color: var(--honey); font-style: normal; }

.shapes-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  pointer-events: none;
}

/* ---------- intro gate (cassette claim ticket) ---------- */

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(62, 39, 35, 0.86);
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.intro-gate.is-claimed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-gate.is-claiming { background: rgba(62, 39, 35, 0.98); }

@media (prefers-reduced-motion: reduce) {
  .intro-gate { transition-duration: 0ms; }
  .ticket { transition-duration: 0ms !important; }
}

.ticket {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 22px;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.intro-gate.is-claiming .ticket {
  transform: scale(1.08);
  opacity: 0;
}

.ticket-top { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.ticket-photo-wrap { position: relative; width: 104px; height: 104px; flex: none; }

.ticket-photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--border);
}

.tape {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #4a332e, var(--roast));
  border-radius: 14px;
  padding: 12px 16px 14px;
  margin: 4px 0 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tape-screw {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #201a17;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tape-screw-tl { top: 8px; left: 8px; }
.tape-screw-tr { top: 8px; right: 8px; }
.tape-screw-bl { bottom: 14px; left: 8px; }
.tape-screw-br { bottom: 14px; right: 8px; }

.tape-label {
  position: relative;
  width: 100%;
  height: 82px;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tape-stripe {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, var(--roast), var(--fern), var(--honey), var(--fern), var(--roast));
}

.tape-window {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: rgba(62, 39, 35, 0.08);
}

.tape-reel {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--roast);
  position: relative;
  opacity: 0.85;
}

.tape-reel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--roast);
  transform: translate(-50%, -50%);
  box-shadow:
    0 -10px 0 -3px var(--roast),
    0 10px 0 -3px var(--roast),
    -10px 0 0 -3px var(--roast),
    10px 0 0 -3px var(--roast);
}

.tape-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.tape-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(245, 240, 230, 0.18);
  background: rgba(245, 240, 230, 0.08);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
}

.tape-btn-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--roast);
  font-size: 1.05rem;
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.tape-btn-play:hover { transform: translateY(-1px) scale(1.05); opacity: 0.92; }

.ticket-play-caption {
  margin: 16px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label);
  text-align: center;
}

.ticket-mark {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ticket-tagline {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--fern);
  max-width: 300px;
}

.ticket-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  margin: 22px -28px;
  padding: 0 28px;
}

.wave-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 2px;
  background: var(--border);
}

.wave-bar:nth-child(8n + 1) { height: 10px; }
.wave-bar:nth-child(8n + 2) { height: 22px; }
.wave-bar:nth-child(8n + 3) { height: 6px; }
.wave-bar:nth-child(8n + 4) { height: 28px; }
.wave-bar:nth-child(8n + 5) { height: 14px; }
.wave-bar:nth-child(8n + 6) { height: 20px; }
.wave-bar:nth-child(8n + 7) { height: 8px; }
.wave-bar:nth-child(8n) { height: 16px; }

.ticket-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  text-align: left;
  margin-bottom: 24px;
}

.ticket-field { display: flex; flex-direction: column; gap: 2px; }

.ticket-field span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label);
}

.ticket-field strong {
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- app shell ---------- */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.side-mark { text-decoration: none; display: inline-flex; }

.side-top-actions { display: flex; align-items: center; gap: 8px; }

.side-mark .tile,
.wordmark .tile,
.tile {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--roast);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.theme-toggle,
.reopen-gate {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper-alt);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover,
.reopen-gate:hover { background: var(--honey); }

.side-id { margin-bottom: 12px; }

.side-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fern);
  color: var(--paper);
  font-size: 0.6rem;
  vertical-align: middle;
}

.side-handle {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--label);
}

.side-socials {
  display: flex;
  gap: 8px;
  margin: 18px 0 22px;
}

.side-socials a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-socials a:hover { background: var(--paper-alt); }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex: 1;
}

.nav-item {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.nav-item:hover { background: var(--paper-alt); color: var(--ink); }

.nav-item.is-active {
  background: var(--roast);
  color: var(--paper);
}

.side-copy {
  margin: 16px 0 0;
  font-size: 0.72rem;
  color: var(--label);
}

/* ---------- stage / panels ---------- */

.stage {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 40px 48px;
}

.panel-head { margin-bottom: 28px; }
.panel-head-center { text-align: center; }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--label);
  margin-bottom: 8px;
}

.panel-head h2,
.panel h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0; }

/* home hero */

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.stage-head-text h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
  max-width: 620px;
}

.stage-sub {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  border: none;
}

.btn:hover { transform: translateY(-1px); opacity: 0.9; }

.btn-primary { background: var(--roast); color: var(--paper); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.contact .btn-secondary { color: var(--paper); border-color: rgba(245, 240, 230, 0.35); }
.contact .btn-primary { background: var(--honey); color: var(--roast); }

/* daily drivers strip */

.drivers-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 28px;
}

.drivers-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label);
  line-height: 1.3;
  flex: none;
}

.drivers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* bento grid + cassette tapes */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.tape-card,
.bento-card {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: default;
  text-decoration: none;
}

.tape-card {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.tape-card:hover { background: var(--honey); }

.cassette {
  flex: none;
  width: 72px;
  height: 46px;
  border-radius: 9px;
  background: var(--roast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.cassette::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 7px;
  height: 10px;
  border-radius: 3px;
  background: rgba(245, 240, 230, 0.1);
  border: 1px solid rgba(245, 240, 230, 0.2);
}

.cassette .reel {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--honey);
  margin-top: 8px;
  position: relative;
}

.cassette.cassette-fern .reel { border-color: var(--fern); }
.cassette.cassette-honey .reel { border-color: var(--paper); }

.tape-body { display: flex; flex-direction: column; gap: 4px; }

.tape-title { font-weight: 600; font-size: 0.98rem; }
.tape-sub { font-size: 0.82rem; color: var(--text-muted); }

.bento-label {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--label);
  margin: 0 0 8px;
}

.bento-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--roast);
  border: 3px solid var(--honey);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.badge-check { color: var(--paper); font-size: 1.3rem; }

.badge-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.bento-card-link {
  cursor: pointer;
  display: block;
  width: 100%;
}

.bento-card-link:hover { background: var(--honey); }

.bento-quote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.bento-cite {
  font-size: 0.82rem;
  color: var(--fern);
  font-weight: 600;
  margin: 0;
}

/* services */

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.service-list li {
  display: grid;
  grid-template-columns: 44px 220px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.service-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--fern);
  font-weight: 600;
}

.service-name { font-weight: 600; }
.service-desc { color: var(--text-muted); font-size: 0.92rem; }

@media (max-width: 720px) {
  .service-list li { grid-template-columns: 32px 1fr; }
  .service-desc { grid-column: 2; }
}

/* timeline (Work panel) */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; padding-bottom: 0; }

.timeline-when {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--fern);
  font-size: 0.85rem;
}

.tl-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
  color: var(--paper);
}

.tl-tag-ghl { background: var(--roast); }
.tl-tag-cs { background: var(--fern); }
.tl-tag-ops { background: var(--honey); color: var(--roast); }

.timeline-body h3 { font-size: 1.1rem; margin-bottom: 2px; }
.timeline-sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 8px; font-style: italic; }
.timeline-body p:not(.timeline-sub) { margin: 0; color: var(--ink); font-size: 0.94rem; }

@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* tools */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.swatch-card {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.swatch-chip { height: 48px; background: var(--roast); }

.swatch-card:nth-child(2) .swatch-chip { background: var(--fern); }
.swatch-card:nth-child(3) .swatch-chip { background: var(--honey); }
.swatch-card:nth-child(4) .swatch-chip { background: var(--roast); }
.swatch-card:nth-child(5) .swatch-chip { background: var(--fern); }
.swatch-card:nth-child(6) .swatch-chip { background: var(--honey); }

.swatch-body { padding: 16px; }

.swatch-name {
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.swatch-usage { color: var(--text-muted); font-size: 0.88rem; }

/* testimonials */

.quote {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--fern);
  border-radius: var(--radius);
  padding: 28px;
  margin: 0;
}

.quote p { font-family: 'Instrument Serif', serif; font-size: 1.2rem; font-style: italic; margin: 0; }

.reviews-carousel { --reviews-dur: 450ms; outline: none; }

.reviews-stack { position: relative; min-height: 220px; margin: 0 0 24px; }

@media (min-width: 640px) {
  .reviews-stack { min-height: 180px; }
}

.review-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(560px, 100%);
  margin: 0;
  transition: transform var(--reviews-dur) cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity var(--reviews-dur) ease,
              filter var(--reviews-dur) ease;
}

.review-card figcaption {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fern);
}

.reviews-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }

.reviews-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.reviews-nav:hover { background: var(--paper-alt); }

.reviews-indicators { display: flex; gap: 8px; }

.reviews-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.reviews-indicator.is-active { background: var(--fern); transform: scale(1.3); }

@media (prefers-reduced-motion: reduce) {
  .review-card { transition-duration: 0ms; }
}

/* contact panel */

.panel.contact {
  background: var(--roast);
  color: var(--paper);
  margin: -40px -48px;
  padding: 80px 48px;
  min-height: calc(100% + 80px);
  text-align: center;
}

.contact h2 { color: var(--paper); }
.contact-sub { color: #e3cbcf; margin: 0 auto 32px; max-width: 480px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row-center { justify-content: center; }

@media (max-width: 640px) {
  .stage { padding: 28px 20px; }
  .panel.contact { margin: -28px -20px; padding: 56px 20px; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .stage { height: auto; overflow: visible; }
  html, body { height: auto; }
}
