/*
 * Cajón Studio site styles.
 *
 * The palette is the app's "Modern Music Studio" dark theme, verbatim:
 * near-black graphite surfaces, warm off-white type and one amber accent.
 * Amber is reserved for the primary call to action and a few small
 * highlights — the same restraint the app uses, where amber marks what is
 * playing or what to press next. No glows, no gradient washes.
 *
 * The site commits to the app's one dark world rather than shipping a light
 * theme. `color-scheme: dark` is declared so form controls and scrollbars
 * match.
 */

:root {
  /* Surfaces, darkest to lightest */
  --bg: #101214;
  --raised: #171a1d;
  --surface: #1d2125;
  --elevated: #292e33;
  --border: #34393d;

  /* Ink */
  --ink: #f2f0eb;
  --ink-soft: #a5adb2;
  --ink-faint: #8d959a;

  /* Accent */
  --amber: #e6a24b;
  --amber-hover: #efb265;
  --amber-ink: #16120c;
  --amber-tint: rgba(230, 162, 75, 0.12);
  --amber-line: rgba(230, 162, 75, 0.38);
  --record: #e0574c;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --page-max: 1160px;
  --gutter: 24px;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 70px rgba(0, 0, 0, 0.5);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  color-scheme: dark;
}

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

/* `[hidden] { display: none }` is an attribute selector, so any class that
   sets `display` outranks it. Anything toggled with `hidden` needs this. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  background-color: var(--bg);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ type -- */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 60ch;
}

h1 + .lead,
h2 + .lead,
h3 + .lead {
  margin-top: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  vertical-align: middle;
  margin: -2px 10px 0 0;
}

.accent {
  color: var(--amber);
}

/* ------------------------------------------------------------------ nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 18, 20, 0.88);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: none;
  box-shadow: 0 0 0 1px var(--border);
}

.brand-name {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--raised);
  border-radius: var(--r-pill);
  padding: 3px;
  flex: none;
}

.lang-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 4px 9px;
  min-height: 28px;
  border-radius: var(--r-pill);
  cursor: pointer;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.is-active {
  background: var(--elevated);
  color: var(--ink);
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--amber-hover);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--elevated);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.88rem;
  border-radius: var(--r-sm);
  flex: none;
}

/* A store CTA with no URL is not a link, and must not look like one. */
.is-disabled {
  cursor: default;
  pointer-events: none;
}

.btn.is-disabled {
  background: var(--surface);
  color: var(--ink-faint);
  border-color: var(--border);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.store-badge {
  display: inline-block;
  border-radius: 13px;
  transition: transform 0.18s ease;
}

.store-badge:not(.is-disabled):hover {
  transform: translateY(-2px);
}

.store-badge.is-disabled {
  opacity: 0.75;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  padding: 72px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.hero-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}

.hero-stage .phone:nth-child(2) {
  margin-top: 64px;
}

/* ---------------------------------------------------------------- phone --- */

/* Screenshots are real iPhone captures (1206×2622). They sit in a phone frame
   drawn in CSS, so there is no bitmap bezel to maintain and the frame takes
   the site's own surface colours. */
.phone {
  position: relative;
  margin: 0;
  width: var(--phone-w, 280px);
  max-width: 100%;
  flex: none;
  padding: calc(var(--phone-w, 280px) * 0.032);
  border-radius: calc(var(--phone-w, 280px) * 0.16);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    var(--shadow-lift);
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--phone-w, 280px) * 0.13);
  background: var(--raised);
}

.phone-lg {
  --phone-w: 300px;
}

.phone-sm {
  --phone-w: 250px;
}

figure.phone figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -38px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------- section -- */

.section {
  padding: 96px 0;
}

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

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head .lead {
  margin-top: 16px;
}

.section-head.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head.centered .lead {
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------------- grids -- */

.grid-2,
.grid-3 {
  display: grid;
  gap: 18px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
}

.section-alt .card {
  background: var(--surface);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--ink);
  margin-bottom: 18px;
}

.card-icon.amber {
  background: var(--amber-tint);
  border-color: var(--amber-line);
  color: var(--amber);
}

/* ------------------------------------------------------------- showcase -- */

/* Feature row: copy on one side, a real screenshot on the other. */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 72px;
  align-items: center;
}

.showcase > * {
  min-width: 0;
}

.showcase + .showcase {
  margin-top: 104px;
}

.showcase.flip {
  grid-template-columns: auto minmax(0, 1fr);
}

.showcase.flip .showcase-copy {
  order: 2;
}

.showcase-media {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.showcase-media .phone + .phone {
  margin-top: 48px;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.ticks li + li {
  margin-top: 11px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}

.ticks strong {
  color: var(--ink);
  font-weight: 600;
}

.note {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 2px solid var(--border);
  color: var(--ink-faint);
  font-size: 0.9rem;
  max-width: 58ch;
}

/* ----------------------------------------------------------------- chips -- */

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.chip-pro {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  border: 1px solid var(--amber-line);
  border-radius: 5px;
  padding: 0 5px;
  line-height: 1.5;
}

.chip-group + .chip-group {
  margin-top: 22px;
}

.chip-group-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

/* ----------------------------------------------------------------- stats -- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-row > div {
  padding: 28px 24px;
}

.stat-row > div + div {
  border-left: 1px solid var(--border);
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 6px;
}

/* --------------------------------------------------------------- pricing -- */

.plan {
  display: flex;
  flex-direction: column;
}

.plan-pro {
  border-color: var(--amber-line);
}

.plan-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.plan-pro .plan-tag {
  color: var(--amber);
}

.plan h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.plan .ticks {
  margin-top: 18px;
}

.plan-foot {
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

/* ----------------------------------------------------------------- quiet -- */

.quiet {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px 48px;
}

.quiet h2 {
  max-width: 20ch;
}

.quiet .lead {
  margin-top: 18px;
  max-width: 66ch;
}

.quiet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.quiet-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
}

.quiet-item strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}

.quiet-item span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------- cta -- */

.cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
}

.cta-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 auto 26px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-soft);
}

.cta .lead {
  margin: 18px auto 0;
  max-width: 54ch;
}

.cta .store-row {
  justify-content: center;
}

/* ---------------------------------------------------------------- footer -- */

.footer {
  background: var(--raised);
  border-top: 1px solid var(--border);
  padding: 44px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 500;
}

.footer-legal {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.footer-credit {
  color: var(--ink-faint);
  font-size: 0.86rem;
  margin-top: 8px;
  max-width: 90ch;
}

.footer-credit a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------ doc pages -- */

.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.doc h1 {
  font-size: clamp(2rem, 4.6vw, 2.8rem);
}

.doc h2 {
  font-size: 1.38rem;
  margin: 48px 0 14px;
  padding-top: 8px;
}

.doc h3 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: var(--ink-soft);
  font-size: 1rem;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc p + p,
.doc p + ul,
.doc p + ol,
.doc ul + p,
.doc ol + p {
  margin-top: 14px;
}

.doc ul,
.doc ol {
  margin: 14px 0;
  padding-left: 24px;
}

.doc li + li {
  margin-top: 8px;
}

.doc a {
  overflow-wrap: anywhere;
}

.updated {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 12px !important;
}

.callout {
  background: var(--raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--r-md);
  padding: 22px 24px;
  margin: 28px 0;
}

.callout p {
  color: var(--ink);
}

.callout.warn {
  border-left-color: var(--record);
}

.doc-toc {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 30px 0 10px;
}

.doc-toc h2 {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
  padding: 0;
  font-weight: 700;
}

.doc-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.doc-toc li {
  margin: 0 0 6px;
  break-inside: avoid;
}

.doc-toc li + li {
  margin-top: 0;
}

.doc-toc a {
  font-size: 0.93rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  background: var(--raised);
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  font-size: 0.93rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink-soft);
}

th {
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.doc-nav a {
  font-weight: 600;
  font-size: 0.94rem;
}

/* --------------------------------------------------------------- support -- */

.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--raised);
  padding: 18px 22px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--amber);
  line-height: 1;
  flex: none;
}

.faq[open] summary::after {
  content: '\2013';
}

.faq[open] summary {
  margin-bottom: 12px;
}

.faq p + p {
  margin-top: 10px;
}

.faq p,
.faq li {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .showcase,
  .showcase.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .showcase.flip .showcase-copy {
    order: 0;
  }

  .showcase + .showcase {
    margin-top: 80px;
  }

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

  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-row > div:nth-child(3) {
    border-left: 0;
  }

  .stat-row > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .quiet-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    padding: 44px 0 56px;
  }

  .section {
    padding: 64px 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Two phones side by side share the row on a phone; one stands alone. */
  .hero-stage,
  .showcase-media {
    gap: 12px;
  }

  .hero-stage .phone,
  .showcase-media .phone {
    --phone-w: min(232px, calc((100vw - 32px - 12px) / 2));
  }

  .hero-stage .phone:only-child,
  .showcase-media .phone:only-child {
    --phone-w: min(260px, calc(100vw - 32px));
  }

  .hero-stage .phone:nth-child(2),
  .showcase-media .phone + .phone {
    margin-top: 36px;
  }

  .stat-row > div {
    padding: 22px 16px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .quiet {
    padding: 36px 20px;
    border-radius: var(--r-lg);
  }

  .cta {
    padding: 44px 20px;
  }

  .doc {
    padding: 44px 16px 72px;
  }

  .doc-toc ol {
    columns: 1;
  }

  .store-row .store-badge img {
    width: 164px;
    height: auto;
  }

  /* Brand + language switch + a download button do not fit across a phone,
     and a flex row that does not fit widens the document. The button goes:
     the hero's store badges are a screen away. */
  .nav .btn {
    display: none;
  }

  .nav-inner {
    gap: 12px;
  }

  .lang-switch button {
    padding: 4px 7px;
  }
}

@media (max-width: 380px) {
  .brand-name {
    font-size: 0.98rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .store-badge:not(.is-disabled):hover {
    transform: none;
  }
}

@media print {
  .nav,
  .footer,
  .doc-nav,
  .store-row,
  .lang-switch {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
