:root {
  --bg: #f3f1eb;
  --bg-warm: #e8e4d8;
  --ink: #121212;
  --ink-soft: #555550;
  --line: #cdc8bb;
  --line-soft: #ddd8cc;
  --magenta: #ff00aa;
  --yellow: #f0d000;
  --cyan: #00cfe8;
  --red: #c41218;
  --header-h: 76px;
  --pipe-w: 56px;
  --pad: clamp(1.5rem, 4vw, 5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --content: 1480px;
}

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

::selection {
  background: color-mix(in srgb, var(--cyan) 35%, white);
  color: var(--ink);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  position: relative;
  min-width: 320px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, color-mix(in srgb, var(--cyan) 7%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 30%, color-mix(in srgb, var(--magenta) 5%, transparent), transparent 50%),
    radial-gradient(ellipse 50% 35% at 80% 90%, color-mix(in srgb, var(--yellow) 8%, transparent), transparent 45%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(18, 18, 18, 0.03) 39px,
      rgba(18, 18, 18, 0.03) 40px
    ),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 1.5px solid var(--cyan);
  outline-offset: 3px;
}

/* —— Rainbow pipes —— */
.pipes {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pipe-w);
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.pipes-svg {
  display: block;
  width: var(--pipe-w);
  overflow: visible;
}

.pipe {
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: square;
  stroke-linejoin: miter;
  opacity: 0.88;
}

.pipe-magenta { stroke: var(--magenta); }
.pipe-cyan { stroke: var(--cyan); }
.pipe-yellow { stroke: var(--yellow); }

.pipe-node {
  stroke: var(--ink);
  stroke-width: 1;
}

.pipe-node.magenta { fill: var(--magenta); }
.pipe-node.cyan { fill: var(--cyan); }
.pipe-node.yellow { fill: var(--yellow); }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0 var(--pad) 0 calc(var(--pipe-w) + 0.85rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
  transition: opacity 0.25s var(--ease);
}

.logo-link:hover {
  opacity: 0.75;
}

.logo {
  height: 46px;
  width: auto;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 1.85rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.nav a.is-active {
  color: var(--magenta);
}

.nav a.is-active::after {
  background: var(--magenta);
}

.social {
  display: flex;
  gap: 1rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink-soft);
  transition: color 0.25s, transform 0.25s var(--ease);
}

.social-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon-fill {
  fill: currentColor;
  stroke: none;
}

.social a:hover {
  transform: translateY(-1px);
}

.social a:nth-child(1):hover { color: var(--magenta); }
.social a:nth-child(2):hover { color: var(--cyan); }
.social a:nth-child(3):hover { color: var(--yellow); }

/* —— Banner —— */
.banner {
  position: relative;
  margin-left: var(--pipe-w);
  height: clamp(240px, 38vw, 380px);
  overflow: hidden;
  background: #080808;
}

.banner-frame {
  width: 100%;
  height: 100%;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.banner-rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--magenta) 0%,
    var(--magenta) 33.33%,
    var(--yellow) 33.33%,
    var(--yellow) 66.66%,
    var(--cyan) 66.66%,
    var(--cyan) 100%
  );
  z-index: 2;
}

/* —— Intro —— */
.intro {
  margin-left: var(--pipe-w);
  padding: 4.5rem var(--pad) 3rem;
  max-width: none;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.52rem, 1.7vw, 0.68rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  white-space: nowrap;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 0.65rem;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--magenta), var(--yellow), var(--cyan));
}

.intro-text {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--ink);
  max-width: 34ch;
}

/* —— Sections —— */
.section {
  margin-left: var(--pipe-w);
  padding: 4.5rem var(--pad) 5rem;
  border-top: 1px solid var(--line);
  max-width: none;
}

.section-head {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.75rem;
  max-width: 42rem;
}

.section-index {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding-top: 0.45rem;
  flex-shrink: 0;
}

.section-mark {
  display: block;
  width: 32px;
  height: 3px;
  margin-bottom: 0.9rem;
}

.section-mark.magenta { background: var(--magenta); }
.section-mark.cyan { background: var(--cyan); }
.section-mark.yellow { background: var(--yellow); }

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 0.45rem;
  line-height: 1.15;
}

.section-head p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

/* —— Guitar interactive —— */
.guitar-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 4.5rem;
}

.guitar-wrap {
  position: relative;
  width: min(100%, 1100px);
  user-select: none;
  padding: 10px;
}

.guitar-img {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
}

.crop {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 1;
}

.crop::before,
.crop::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.crop::before { width: 14px; height: 1px; }
.crop::after { width: 1px; height: 14px; }

.crop.tl { top: 0; left: 0; }
.crop.tr { top: 0; right: 0; }
.crop.tr::before { right: 0; }
.crop.tr::after { right: 0; }
.crop.bl { bottom: 0; left: 0; }
.crop.bl::before { bottom: 0; }
.crop.bl::after { bottom: 0; }
.crop.br { bottom: 0; right: 0; }
.crop.br::before { right: 0; bottom: 0; }
.crop.br::after { right: 0; bottom: 0; }

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--c);
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: pulse 2.8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--c);
  opacity: 0.4;
}

.hotspot:hover,
.hotspot.is-active {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent);
  animation: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 0%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 18%, transparent); }
}

.tooltip {
  position: absolute;
  z-index: 5;
  width: min(250px, 72vw);
  padding: 1rem 1.05rem;
  background: #fff;
  border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--tooltip-c, var(--magenta)) 50%, transparent);
  animation: tip-in 0.22s var(--ease);
}

.tooltip[hidden] {
  display: none;
}

@keyframes tip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tooltip-text {
  font-size: 0.94rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.tooltip-more {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
}

.tooltip-more:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* —— Feature detail blocks —— */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  scroll-margin-top: calc(var(--header-h) + 28px);
  padding: 0.75rem 0 0.75rem 1.15rem;
  border-left: 2px solid transparent;
  transition: border-color 0.35s var(--ease), background 0.35s, padding 0.35s;
  max-width: var(--content);
}

.feature[data-color="magenta"] { border-left-color: var(--magenta); }
.feature[data-color="cyan"] { border-left-color: var(--cyan); }
.feature[data-color="yellow"] { border-left-color: var(--yellow); }

.feature:nth-child(even) {
  direction: rtl;
}

.feature:nth-child(even) > * {
  direction: ltr;
}

.feature-media {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.3s;
}

.feature[data-color="magenta"]:hover .feature-media::after { border-color: color-mix(in srgb, var(--magenta) 40%, transparent); }
.feature[data-color="cyan"]:hover .feature-media::after { border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.feature[data-color="yellow"]:hover .feature-media::after { border-color: color-mix(in srgb, var(--yellow) 45%, transparent); }

.feature-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 1.15rem;
  transition: transform 0.5s var(--ease);
}

.feature:hover .feature-media img {
  transform: scale(1.03);
}

.feature-tag {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.65rem;
}

.feature[data-color="magenta"] .feature-tag { color: var(--magenta); }
.feature[data-color="cyan"] .feature-tag { color: color-mix(in srgb, var(--cyan) 72%, var(--ink)); }
.feature[data-color="yellow"] .feature-tag { color: color-mix(in srgb, var(--yellow) 70%, var(--ink)); }

.feature-copy h3 {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 0.55rem;
}

.feature-copy p {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 28rem;
  line-height: 1.55;
}

/* —— Spec table —— */
.spec-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
  max-width: var(--content);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.spec-table th,
.spec-table td {
  padding: 1.15rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.spec-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  font-weight: 500;
  width: 36%;
  border-right: 1px solid var(--line-soft);
}

.choice {
  display: inline-block;
}

.choice.muted {
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 300;
}

.sep {
  margin: 0 0.55rem;
  color: var(--line);
  font-weight: 300;
}

/* —— About —— */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: end;
  max-width: var(--content);
}

.about-figure {
  position: relative;
  margin: 0;
}

.about-figure::before {
  content: "";
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--line);
  z-index: -1;
}

.about-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 35%;
  border: 1px solid var(--line);
}

.about-copy {
  padding-bottom: 0.25rem;
}

.about-text {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
  max-width: 22ch;
}

/* —— Contact —— */
.contact {
  padding-bottom: 6rem;
}

.contact-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 36rem;
}

.contact-lede {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.contact-link {
  display: inline-block;
  width: fit-content;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--magenta);
  padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s;
}

.contact-link:hover {
  color: var(--magenta);
  border-color: var(--cyan);
}

/* —— Footer —— */
.site-footer {
  margin-left: var(--pipe-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad);
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer-dots {
  display: flex;
  gap: 7px;
}

.dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--ink);
}

.dot.magenta { background: var(--magenta); }
.dot.yellow { background: var(--yellow); }
.dot.cyan { background: var(--cyan); }

/* —— Scroll reveal —— */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  }

  .reveal.is-in {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Responsive —— */
@media (max-width: 860px) {
  :root {
    --pipe-w: 28px;
    --header-h: 64px;
  }

  .site-header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 0.8rem 1rem 0.8rem calc(var(--pipe-w) + 0.5rem);
    gap: 0.7rem 1rem;
  }

  .logo { height: 36px; }

  .social {
    justify-self: end;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 1.1rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .banner {
    height: 200px;
  }

  .intro-text {
    max-width: none;
  }

  .section-head {
    gap: 1rem;
  }

  .feature,
  .feature:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .about-figure::before {
    display: none;
  }

  .about-text {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .nav {
    font-size: 0.62rem;
    gap: 0.85rem;
  }

  .intro {
    padding-top: 3rem;
  }

  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .guitar-wrap {
    padding: 6px;
  }

  .crop {
    width: 10px;
    height: 10px;
  }

  .crop::before { width: 10px; }
  .crop::after { height: 10px; }
}
