:root {
  --bg: #0f172a;
  --bg-alt: #111c33;
  --card: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #fbbf24;
  --primary-dark: #d97706;
  --on-primary: #1c1400;
  --accent: #38bdf8;
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary);
}

.lang-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.btn small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
}

.btn strong {
  font-size: 1.05rem;
}

.btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

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

.btn-primary:hover {
  background: #fcd34d;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-ghost {
  color: var(--primary);
  border-color: rgba(251, 191, 36, 0.4);
}

.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

/* HERO */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(ellipse at 75% 20%, rgba(251, 191, 36, 0.12), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34rem;
  margin-bottom: 2rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* TUNER MOCK */
.hero-visual {
  display: flex;
  justify-content: center;
}

.tuner-card {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.gauge {
  width: 100%;
  height: auto;
}

.needle {
  transform-origin: 100px 110px;
  animation: settle 4s ease-in-out infinite;
}

@keyframes settle {
  0% { transform: rotate(-38deg); }
  30% { transform: rotate(14deg); }
  50% { transform: rotate(-6deg); }
  65%, 100% { transform: rotate(0deg); }
}

.tuner-note {
  font-size: 3.5rem;
  font-weight: 800;
  color: #22c55e;
  line-height: 1;
  margin-top: 0.5rem;
}

.tuner-note sub {
  font-size: 1.25rem;
  color: var(--muted);
}

.tuner-cents {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.4rem 0 1.25rem;
}

.strings {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.strings span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--muted);
}

.strings .active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* SECTIONS */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 1.25rem;
}

.section p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* STEPS */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.steps li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.steps h3,
.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.steps p,
.feature p {
  font-size: 0.95rem;
}

/* TUNINGS */
.tunings {
  list-style: none;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tunings li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--card);
}

.tunings li + li {
  border-top: 1px solid var(--border);
}

.tunings span {
  color: var(--muted);
  font-size: 0.95rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

/* SCREENS: centered carousel (gallery.js) */
.carousel {
  /* Screen width: fits the viewport width and height, between 160 and 280px. */
  --slide-w: clamp(160px, min(62vw, calc((100svh - 12rem) * 0.45)), 280px);
  --slide-gap: 1rem;
  position: relative;
  margin-top: 2.5rem;
}

.screens {
  display: flex;
  gap: var(--slide-gap);
  /* Side padding lets the first and last screens reach the center. */
  padding: 0.5rem calc(50% - var(--slide-w) / 2) 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.screens::-webkit-scrollbar {
  display: none;
}

.screen {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
  text-align: center;
  opacity: 0.45;
  transform: scale(0.86);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.screen.active {
  opacity: 1;
  transform: none;
}

.screen-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 22px;
  cursor: pointer;
}

.screen.active .screen-open {
  cursor: zoom-in;
}

.screen-open:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.screen img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 20;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.screen figcaption {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.carousel-btn,
.lightbox-nav,
.lightbox-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.carousel-btn svg,
.lightbox-nav svg,
.lightbox-close svg {
  width: 22px;
  height: 22px;
}

.carousel-btn:hover,
.lightbox-nav:hover,
.lightbox-close:hover {
  border-color: var(--primary);
}

/* Next to the centered screen, at half its height. */
.carousel-btn {
  position: absolute;
  top: calc(0.5rem + var(--slide-w) * 10 / 9);
  z-index: 1;
  transform: translateY(-50%);
}

/* On narrow screens they stay inside the edge, over the side screens. */
.carousel-prev {
  right: min(calc(50% + var(--slide-w) / 2 + 0.5rem), calc(100% - 44px));
}

.carousel-next {
  left: min(calc(50% + var(--slide-w) / 2 + 0.5rem), calc(100% - 44px));
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dot.active {
  width: 22px;
  background: var(--primary);
}

/* GALLERY */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.lightbox::backdrop {
  background: rgba(2, 6, 23, 0.92);
}

.lightbox-figure {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  max-height: calc(100dvh - 6rem);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.lightbox-caption {
  margin-top: 0.75rem;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

/* CHOOSE */
.choose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.choose-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.teaser-btn {
  margin-top: 1.5rem;
}

.card-note {
  font-size: 0.9rem;
  margin-top: auto;
}

.small-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.small-note a {
  color: var(--primary);
  margin-left: 0.25rem;
}

.choose-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.choose-card ul {
  list-style: none;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.choose-card li {
  color: var(--muted);
  padding: 0.35rem 0 0.35rem 1.6rem;
  position: relative;
}

.choose-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* FAQ */
.faq {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin-top: 0.6rem;
  font-size: 0.98rem;
}

/* FOOTER */
.site-footer {
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps,
  .choose-grid {
    grid-template-columns: 1fr;
  }
}

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

  .cta-row .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .header-actions .btn {
    display: none;
  }

  .lightbox {
    padding: 0.5rem;
  }

  /* Over the image edges: the enlarged screen uses the whole width. */
  .lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .needle {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }

  .screen {
    transition: none;
  }
}
