/* ══════════════════════════════════════════════
   Chords Master — Landing Page Styles
   ══════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --bg-card:   #161616;
  --bg-card2:  #1e1e1e;
  --border:    #2a2a2a;
  --text:      #e8e8e8;
  --text-muted:#8a8a8a;
  --accent:    #f59e0b;
  --accent-dim:#78490a;
  --accent-glow: rgba(245,158,11,0.25);
  --green:     #22c55e;
  --red:       #ef4444;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,0.6);
  --shadow-xl: 0 16px 64px rgba(0,0,0,0.7);
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.d-flex { display: flex; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Typography ───────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.2rem; }

.accent { color: var(--accent); }
.muted  { color: var(--text-muted); }

/* ── Layout utilities ─────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.section-title {
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 52px;
}

.text-center { text-align: center; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 28px var(--accent-glow);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* ── Navbar ───────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.navbar__logo:hover { text-decoration: none; color: var(--accent); }

.navbar__logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  padding: 80px 0 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.hero__eyebrow {
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero__badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero__badge svg { flex-shrink: 0; }

/* ── CSS Piano ────────────────────────────────── */
.piano-showcase {
  margin: 0 auto;
  max-width: 860px;
  padding: 0 12px;
}

.piano-wrapper {
  background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
  border: 1px solid #2d2d2d;
  border-radius: var(--radius-lg);
  padding: 28px 20px 0;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}

.piano-brand {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #3a3a3a;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.piano-keys {
  display: flex;
  position: relative;
  height: 120px;
  user-select: none;
}

.key-white {
  flex: 1;
  background: linear-gradient(180deg, #e8e8e8 0%, #fff 40%, #f0f0f0 100%);
  border: 1px solid #bbb;
  border-radius: 0 0 6px 6px;
  border-top: none;
  position: relative;
  cursor: pointer;
  transition: background 0.05s;
  min-width: 0;
}
.key-white:hover {
  background: linear-gradient(180deg, #ffeab0 0%, #fff8e1 40%, #fef3c7 100%);
}
.key-white.pressed {
  background: linear-gradient(180deg, var(--accent) 0%, #fde68a 60%, #fff 100%);
}
.key-white + .key-white { border-left: none; }

.key-black {
  width: calc(100% / 7 * 0.62);
  height: 68%;
  background: linear-gradient(180deg, #222 0%, #0a0a0a 60%, #1a1a1a 100%);
  border: 1px solid #000;
  border-top: none;
  border-radius: 0 0 5px 5px;
  position: absolute;
  top: 0;
  z-index: 2;
  cursor: pointer;
  transition: background 0.05s;
}
.key-black:hover {
  background: linear-gradient(180deg, #3a2500 0%, #1a0e00 60%, #2a1800 100%);
}
.key-black.pressed {
  background: linear-gradient(180deg, var(--accent-dim) 0%, #3d1d04 60%, #1a0e00 100%) !important;
}

/* black key positions within an octave group (7 whites = 100%)
   Children of .oct in order: C(1) C#(2) D(3) D#(4) E(5) F(6) F#(7) G(8) G#(9) A(10) A#(11) B(12)
   Black key width = 0.62/7 of octave; centered on the gap = left edge at (N - 0.31)/7 */
.oct { display: flex; position: relative; flex: 7; }

.oct .key-black:nth-child(2)  { left: calc(100% / 7 * 0.69); }  /* C# */
.oct .key-black:nth-child(4)  { left: calc(100% / 7 * 1.69); }  /* D# */
.oct .key-black:nth-child(7)  { left: calc(100% / 7 * 3.69); }  /* F# */
.oct .key-black:nth-child(9)  { left: calc(100% / 7 * 4.69); }  /* G# */
.oct .key-black:nth-child(11) { left: calc(100% / 7 * 5.69); }  /* A# */

.chord-label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,158,11,0.15);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 20px;
  margin: 16px auto 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ── Features grid ────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(245,158,11,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── How it works ─────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border), var(--accent), var(--border), transparent);
}

.step {
  text-align: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 auto 20px;
}

.step h3 { margin-bottom: 8px; }
.step p  { color: var(--text-muted); font-size: 0.9rem; }

/* ── PWA section ──────────────────────────────── */
.pwa-section {
  background: linear-gradient(135deg, #111 0%, #161616 50%, #0f0f0f 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pwa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.pwa-text h2 { margin-bottom: 18px; }
.pwa-text p  { color: var(--text-muted); margin-bottom: 14px; }

.pwa-checklist {
  list-style: none;
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pwa-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
}

.pwa-checklist li::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.pwa-devices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.device-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: border-color 0.2s;
}
.device-card:hover { border-color: var(--accent); }

.device-card__emoji {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.device-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.device-card__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Comparison ───────────────────────────────── */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table.comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.comparison thead {
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
}

.comparison th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.comparison th.col-app {
  color: var(--accent);
  background: rgba(245,158,11,0.05);
}

.comparison td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.comparison tbody tr:last-child td { border-bottom: none; }

.comparison tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

.comparison td.col-app {
  background: rgba(245,158,11,0.04);
}

.comparison td:first-child {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.comparison-section-header td {
  background: rgba(245,158,11,0.06);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
}

.comparison-section-header--alt td {
  background: rgba(239,68,68,0.05);
}

.check   { color: var(--green); font-weight: 700; font-size: 1rem; }
.cross   { color: var(--red);   font-weight: 700; font-size: 1rem; }
.partial { color: var(--accent); font-weight: 700; font-size: 1rem; }

/* ── Quotes / highlights ──────────────────────── */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlight-card__stat {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.highlight-card__label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── CTA section ──────────────────────────────── */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom, rgba(245,158,11,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.cta-section h2 { margin-bottom: 16px; }
.cta-section p  { color: var(--text-muted); margin-bottom: 40px; font-size: 1.05rem; }

.cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__links a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent); text-decoration: none; }

.footer__cookie-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__cookie-btn:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 60px 0; }

  .pwa-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps::before { display: none; }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .navbar__links .btn--outline { display: none; }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }

  .comparison td:nth-child(4),
  .comparison th:nth-child(4) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .cta-group  { flex-direction: column; }
  .pwa-devices { grid-template-columns: 1fr 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}
