/* Tritave — marketing site
   Flat, sharp-cornered, strictly gridded: Ableton's restraint, Tritave's palette.
   No shadows, no gradients in the chrome, no rounded chrome. Colour does the work. */

:root {
  --ink: #1E1430;
  --ink-deep: #120C1E;
  --ink-soft: #4A4060;
  --paper: #F6F4EF;
  --paper-warm: #F0ECE3;
  --white: #FFFFFF;
  --line: #DED8CC;
  --line-strong: #1E1430;

  --amber: #FFC45C;
  --amber-deep: #F08A24;
  --violet: #6C5CE7;

  /* Straight from the app's Theme.swift, one per exercise. */
  --intervals: #FF7A6A;
  --chords: #7C84FF;
  --scales: #2BBFA8;
  --degrees: #FFB35E;
  --progressions: #D97CDA;
  --melody: #41BCF4;
  --pitch: #F7728F;
  --rhythm: #6FDB66;

  --success: #0A7F52;
  --danger: #C4353A;

  --gutter: 24px;
  --maxw: 1240px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }

.display {
  font-size: clamp(44px, 8.2vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.h2 {
  font-size: clamp(32px, 4.8vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.h3 { font-size: clamp(21px, 2.2vw, 27px); font-weight: 650; letter-spacing: -0.03em; }

.lede {
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.48;
  font-weight: 420;
  letter-spacing: -0.014em;
  max-width: 58ch;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.62;
  margin: 0 0 20px;
}

.muted { color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 100%; display: flex; align-items: center; gap: 32px;
}
.wordmark {
  font-weight: 800; font-size: 20px; letter-spacing: -0.05em;
  text-decoration: none; display: flex; align-items: center; gap: 9px;
}
.wordmark .mark { width: 20px; height: 20px; flex: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 15px; font-weight: 500;
  letter-spacing: -0.01em; opacity: 0.78;
}
.nav-links a:hover { opacity: 1; }
@media (max-width: 800px) { .nav-links .hide-sm { display: none; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper);
  font-size: 16px; font-weight: 600; letter-spacing: -0.015em;
  text-decoration: none; cursor: pointer;
  transition: background .13s ease, color .13s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.on-dark { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn.on-dark:hover { background: transparent; color: var(--paper); }
.btn.on-dark.ghost { background: transparent; border-color: var(--paper); color: var(--paper); }
.btn.on-dark.ghost:hover { background: var(--paper); color: var(--ink); }
.btn.sm { padding: 10px 17px; font-size: 14.5px; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 9vw, 132px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lede { margin: 20px 0 0; }

/* ---------- Hero ---------- */

.hero { background: var(--amber); color: var(--ink); border-bottom: 1px solid var(--ink); }
.hero-in {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: end;
}
.hero-copy { padding-bottom: clamp(56px, 8vw, 104px); }
.hero .lede { margin: 26px 0 0; max-width: 46ch; color: #3A2A10; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; align-items: center; }
.hero-note { font-size: 14px; margin-top: 16px; color: #4A3512; }
.hero-art { align-self: end; }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-bottom: 0; }
  .hero-copy { padding-bottom: 40px; }
}

/* ---------- Trainer ---------- */

.trainer { border: 1.5px solid var(--ink); background: var(--white); }
.trainer-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
}
.trainer-bar .title { font-weight: 700; letter-spacing: -0.025em; font-size: 15px; }
.trainer-stats { margin-left: auto; display: flex; gap: 22px; font-size: 13.5px; letter-spacing: -0.01em; }
.trainer-stats b { font-weight: 700; }
.trainer-body { padding: clamp(24px, 4vw, 44px) clamp(20px, 3.5vw, 40px); }

.trainer-prompt { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.play-btn {
  width: 66px; height: 66px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--amber);
  display: grid; place-items: center; cursor: pointer; transition: transform .1s ease;
}
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(0.97); }
.play-btn svg { width: 22px; height: 22px; }
.prompt-text { font-size: clamp(17px, 2vw, 21px); font-weight: 600; letter-spacing: -0.025em; }
.prompt-sub { font-size: 14px; color: var(--ink-soft); margin-top: 3px; font-weight: 450; letter-spacing: -0.01em; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
.choice {
  padding: 15px 14px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--white); color: var(--ink); cursor: pointer;
  font-size: 15px; font-weight: 550; letter-spacing: -0.02em; text-align: left;
  font-family: inherit; transition: background .1s ease, color .1s ease;
}
.choice:hover:not(:disabled) { background: var(--paper-warm); }
.choice:disabled { cursor: default; }
.choice.correct { background: var(--success); border-color: var(--success); color: #fff; }
.choice.wrong { background: var(--danger); border-color: var(--danger); color: #fff; }
.choice.dim { opacity: .38; }

.verdict {
  margin-top: 24px; padding: 16px 18px; border-left: 4px solid var(--ink);
  background: var(--paper-warm); font-size: 15px; letter-spacing: -0.015em;
  display: none;
}
.verdict.show { display: block; }
.verdict.good { border-left-color: var(--success); }
.verdict.bad { border-left-color: var(--danger); }
.verdict b { font-weight: 700; }

.trainer-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft);
}
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 2px; overflow: hidden; }
.seg button {
  padding: 8px 14px; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 550; letter-spacing: -0.015em; color: var(--ink);
}
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Exercise grid ---------- */

.ex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1.5px solid var(--ink); border-right: 0; border-bottom: 0; }
.ex {
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  padding: 26px 22px 30px; min-height: 212px; display: flex; flex-direction: column;
  background: var(--c);
}
.ex .n { font-size: 12px; font-weight: 750; letter-spacing: 0.1em; opacity: .55; }
.ex h3 { margin: 14px 0 10px; font-size: 21px; letter-spacing: -0.032em; }
.ex p { margin: 0; font-size: 14.5px; line-height: 1.45; letter-spacing: -0.008em; opacity: .82; }
.ex .lv { margin-top: auto; padding-top: 16px; font-size: 12.5px; font-weight: 650; letter-spacing: 0.02em; opacity: .62; }
@media (max-width: 1000px) { .ex-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ex-grid { grid-template-columns: 1fr; } }

.ex--intervals    { --c: var(--intervals); }
.ex--chords       { --c: var(--chords); }
.ex--scales       { --c: var(--scales); }
.ex--degrees      { --c: var(--degrees); }
.ex--progressions { --c: var(--progressions); }
.ex--melody       { --c: var(--melody); }
.ex--pitch        { --c: var(--pitch); }
.ex--rhythm       { --c: var(--rhythm); }

/* ---------- Split / facts ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.fact { padding: 26px 20px 28px; border-bottom: 1.5px solid var(--ink); border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .v { font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.fact .k { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); letter-spacing: -0.01em; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } .fact:nth-child(2) { border-right: 0; } }

.rows { border-top: 1.5px solid var(--ink); }
.row { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row dt { font-weight: 650; letter-spacing: -0.025em; font-size: 16px; }
.row dd { margin: 0; color: var(--ink-soft); font-size: 15.5px; letter-spacing: -0.01em; }
@media (max-width: 680px) { .row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Dark band ---------- */

.band { background: var(--ink); color: var(--paper); border-top: 1px solid var(--ink); }
.band .muted { color: #A49BBE; }
.band .section-head { margin-bottom: clamp(36px, 4.5vw, 56px); }
.band .rows { border-top-color: var(--paper); }
.band .row { border-bottom-color: #3A3052; }
.band .row dd { color: #A49BBE; }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--ink); }
.plan { padding: 30px 26px 34px; border-right: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.plan:last-child { border-right: 0; }
.plan.feature { background: var(--amber); }
.plan .tag { font-size: 12px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; opacity: .6; }
.plan .price { margin: 18px 0 4px; font-size: clamp(32px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.plan .per { font-size: 14px; color: var(--ink-soft); }
.plan .feature-note { font-size: 13.5px; font-weight: 600; margin-top: 12px; }
.plan ul { list-style: none; margin: 22px 0 26px; padding: 0; font-size: 14.5px; }
.plan li { padding: 7px 0 7px 22px; position: relative; letter-spacing: -0.012em; }
.plan li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 1.5px; background: currentColor; opacity: .5; }
.plan .btn { margin-top: auto; width: 100%; }
@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
  .plan { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .plan:last-child { border-bottom: 0; }
}

.free-note { margin-top: 26px; font-size: 15px; color: var(--ink-soft); max-width: 70ch; }

/* ---------- FAQ ---------- */

.faq { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 22px 40px 22px 0; cursor: pointer; list-style: none; position: relative;
  font-size: clamp(17px, 1.9vw, 20px); font-weight: 600; letter-spacing: -0.028em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 60px 24px 0; color: var(--ink-soft); font-size: 16px; letter-spacing: -0.01em; }
.faq .a p { margin: 0 0 12px; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------- Closing ---------- */

.closing { background: var(--ink); color: var(--paper); padding: clamp(80px, 10vw, 150px) 0; text-align: center; }
.closing .display { max-width: 16ch; margin: 0 auto; }
.closing .lede { margin: 26px auto 0; color: #A49BBE; }
.closing .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */

.footer { background: var(--ink-deep); color: #8C82A6; padding: 64px 0 40px; font-size: 14.5px; }
.footer a { text-decoration: none; opacity: .85; }
.footer a:hover { opacity: 1; color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-grid h4 { color: var(--paper); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { padding: 5px 0; }
.foot-brand .wordmark { color: var(--paper); font-size: 22px; margin-bottom: 14px; }
.foot-brand p { margin: 0; max-width: 34ch; line-height: 1.5; }
.foot-base {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid #2A2240;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 13.5px;
}
.foot-base .right { margin-left: auto; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Long-form (support / privacy) ---------- */

.page-head { background: var(--ink); color: var(--paper); padding: clamp(56px, 7vw, 100px) 0 clamp(40px, 5vw, 64px); }
.page-head .lede { color: #A49BBE; margin-top: 20px; }

.prose { max-width: 74ch; padding: clamp(48px, 6vw, 80px) 0; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin: 52px 0 16px; letter-spacing: -0.035em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 30px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--paper-warm); padding: 2px 6px; border-radius: 2px;
}
.callout { border-left: 4px solid var(--amber-deep); background: var(--paper-warm); padding: 18px 20px; margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }
.updated { font-size: 14px; color: var(--ink-soft); }

.contact-card { border: 1.5px solid var(--ink); padding: 28px; margin: 32px 0; }
.contact-card h3 { margin: 0 0 8px; }
.contact-card p { margin: 0 0 16px; color: var(--ink-soft); }

/* ---------- Utility ---------- */

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 0; }

.push-right { margin-left: auto; }
.unit { font-size: .5em; }
.note-wide { margin-top: 22px; max-width: 56ch; }
.btn.next { margin-left: 10px; vertical-align: middle; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* Real app screens */
.app-preview { position: relative; height: 640px; overflow: hidden; }
.hero-phone { position: absolute; width: 245px; border: 7px solid var(--ink); border-radius: 42px; overflow: hidden; background: var(--ink); }
.hero-phone img { width: 100%; height: auto; }
.hero-phone-front { right: 30px; top: 30px; transform: rotate(7deg); }
.hero-phone-back { left: 25px; top: 110px; transform: rotate(-9deg); }
.preview-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-weight: 650; font-size: 13px; letter-spacing: .04em; }
.feature-strip { background: var(--ink); color: var(--paper); }
.feature-strip .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; font-weight: 600; }
.app-tour { background: var(--paper-warm); }
.gallery-filters, .help-topics { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-filters button { padding: 12px 18px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); background: transparent; cursor: pointer; }
.gallery-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery-hint, .gallery-note { font-size: 14px; color: var(--ink-soft); }
.gallery-note { margin: 32px 0 0; max-width: 80ch; }
.screenshot-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 32px 24px; margin-top: 32px; }
.screenshot-card { margin: 0; min-width: 0; }
.screenshot-card[hidden] { display: none; }
.screenshot-card a { display: block; border: 1px solid var(--line); padding: 12px; background: var(--paper); transition: border-color .15s; }
.screenshot-card a:hover { border-color: var(--ink); }
.screenshot-card img { width: 100%; height: auto; border-radius: 22px; }
.screenshot-card h3 { font-size: 18px; line-height: 1.25; margin-top: 16px; }
.screenshot-card p { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; }
.screenshot-dialog { padding: 16px; width: min(94vw, 580px); max-height: 94dvh; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.screenshot-dialog::backdrop { background: rgb(18 12 30 / .85); }
.screenshot-dialog img { max-height: calc(94dvh - 125px); width: auto; max-width: 100%; margin: 0 auto; }
.viewer-toolbar, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer-toolbar { margin-bottom: 12px; }
.viewer-toolbar h2 { font-size: 18px; }
.screenshot-dialog button { min-height: 44px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.viewer-controls { margin-top: 12px; font-size: 13px; }
.viewer-open { overflow: hidden; }
.availability { display: block; font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 16px; }
.help-topics { margin: 24px 0; }
.help-topics a { padding: 10px 14px; border: 1px solid var(--line); font-size: 14px; text-decoration: none; }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }
@media (max-width: 1100px) and (min-width: 901px) { .hero-phone { width: 220px; } .app-preview { height: 570px; } }
@media (max-width: 900px) { .app-preview { width: min(100%, 520px); height: 610px; justify-self: center; } .hero-in { gap: 0; } }
@media (max-width: 760px) { .screenshot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 14px; } }
@media (max-width: 480px) { .hero-phone { width: 200px; border-width: 5px; border-radius: 32px; } .hero-phone-back { top: 70px; } .hero-phone-front { top: 10px; } .app-preview { height: 500px; } .feature-strip .wrap { justify-content: flex-start; gap: 12px 24px; } .gallery-filters button { padding: 10px 12px; } .screenshot-card a { padding: 6px; } .screenshot-card img { border-radius: 15px; } .screenshot-card h3 { font-size: 16px; } .nav-in { gap: 12px; } .nav-links { gap: 16px; } }
.preview-caption { display: none; }
@media (max-width: 1100px) and (min-width: 901px) { .hero-phone { width: 215px; } }
@media (max-width: 480px) { .hero-phone { width: 190px; } .hero-phone-front { right: 25px; } }
