/* Tines Studio marketing site. Colours match the app's Theme.swift: white accents on a dark background, tine colours by scale degree. */

:root {
  --bg: #1A1626;
  --surface: #26223A;
  --surface-2: #322E44;
  --line: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --text-2: #B4AFC6;
  --text-3: #8A84A0;
  --accent: #FFFFFF;
  --accent-hover: #E4E0EE;
  --on-accent: #1A1626;

  --d1: #D9415B;
  --d2: #E8964B;
  --d3: #E5D74F;
  --d4: #A4C54A;
  --d5: #3E8570;
  --d6: #5A3FCB;
  --d7: #D45DB1;

  --font: ui-rounded, "SF Pro Rounded", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 22px;
  --radius-sm: 12px;
  --gutter: 20px;
  --max: 1120px;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-color: rgba(255, 255, 255, 0.45); text-underline-offset: 3px; }
a:hover { color: var(--text); text-decoration-color: var(--text); }
:focus-visible { outline: 3px solid var(--d3); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 10px; background: var(--surface); padding: 8px 14px; z-index: 10; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(26, 22, 38, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand { white-space: nowrap; }
@media (max-width: 370px) {
  .brand { font-size: 1.08rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .nav a:not(:last-child) { display: none; }
}
.brand:hover { color: var(--text); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 10px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav .nav-hide { display: none; }
@media (min-width: 640px) { .nav .nav-hide { display: inline-block; } }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 0; cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* "Coming soon" App Store button. Swap for Apple's official badge once the app is live. */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 22px 8px 16px; border-radius: 16px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.appstore:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore small { font-size: 0.72rem; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.appstore strong { font-size: 1.15rem; font-weight: 700; }
.appstore[aria-disabled="true"] { cursor: default; }

/* Tine strip: the seven scale-degree colours, used as a decorative motif */

.tines { display: flex; align-items: flex-end; gap: 6px; height: 44px; }
.tines i { width: 14px; border-radius: 7px; display: block; }
.tines i:nth-child(1) { background: var(--d1); height: 100%; }
.tines i:nth-child(2) { background: var(--d2); height: 86%; }
.tines i:nth-child(3) { background: var(--d3); height: 74%; }
.tines i:nth-child(4) { background: var(--d4); height: 62%; }
.tines i:nth-child(5) { background: var(--d5); height: 74%; }
.tines i:nth-child(6) { background: var(--d6); height: 86%; }
.tines i:nth-child(7) { background: var(--d7); height: 100%; }

/* Hero */

.hero { position: relative; overflow: hidden; padding: 48px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 80% 30%, rgba(90, 63, 203, 0.35), transparent 70%),
    radial-gradient(35% 40% at 15% 10%, rgba(212, 93, 177, 0.18), transparent 70%);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero .eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; color: var(--text-2); font-weight: 700; }
.hero .eyebrow .tines { height: 26px; gap: 4px; }
.hero .eyebrow .tines i { width: 8px; }
.hero h1 span { color: var(--text); }
.hero .lede { font-size: 1.2rem; color: var(--text-2); max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 0.9rem; color: var(--text-3); }

@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* Phone frame around simulator screenshots */

.phone {
  position: relative; width: min(300px, 78vw); margin: 0 auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #3a3550, #15121f);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.phone-sm { width: min(240px, 66vw); border-radius: 38px; padding: 8px; }
.phone-sm img { border-radius: 31px; }

.hero-phones { position: relative; display: flex; justify-content: center; }
.hero-phones .phone-back { display: none; }
@media (min-width: 560px) {
  .hero-phones .phone-back {
    display: block; position: absolute; width: min(250px, 60vw);
    transform: translate(-58%, 8%) rotate(-7deg); opacity: 0.55; filter: saturate(0.8);
  }
  .hero-phones .phone-front { transform: translateX(14%); }
}

/* Sections */

section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }
.alt { background: linear-gradient(180deg, transparent, rgba(38, 34, 58, 0.55) 15%, rgba(38, 34, 58, 0.55) 85%, transparent); }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.card h3 { margin-bottom: 0.35em; }
.card p { color: var(--text-2); margin: 0; }
.icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 16px; color: #fff;
}
.icon svg { width: 24px; height: 24px; }

/* Showcase rows: screenshot beside copy */

.showcase { display: grid; gap: 36px; align-items: center; }
.showcase + .showcase { margin-top: 72px; }
.showcase > * { min-width: 0; }
.showcase ul { padding: 0; margin: 0; list-style: none; }
.showcase li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text-2); }
.showcase li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 12px; height: 12px; border-radius: 4px; background: var(--bullet, var(--accent)); }
.showcase li strong { color: var(--text); }
@media (min-width: 860px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 64px; }
  .showcase.flip .showcase-media { order: 2; }
}

/* Code / notation */

code, pre { font-family: var(--mono); }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.92em; }
pre {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 0 0 10px; overflow-x: auto; font-size: 1rem; line-height: 1.6;
}
pre code { background: none; padding: 0; }

.notation-sample { font-size: 1.05rem; }
.notation-sample .lyr { color: var(--text-2); }

/* Coloured note blocks rendered by notation.js */

.blocks { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; padding: 2px 0 6px; margin-bottom: 6px; scrollbar-width: none; }
.blocks::-webkit-scrollbar { display: none; }
.blk { display: flex; flex-direction: column-reverse; gap: 3px; flex: none; }
.note {
  height: 40px; border-radius: 7px; display: grid; place-items: center; position: relative;
  font-weight: 800; font-size: 0.85rem; color: #fff; line-height: 1;
}
.note.dark { color: #1A1626; }
.note .oct { position: absolute; left: 0; right: 0; text-align: center; font-size: 0.55rem; letter-spacing: 1px; }
.note .oct.up { top: 3px; }
.note .oct.down { bottom: 3px; }
.rest { height: 40px; border-radius: 7px; border: 1.5px dashed var(--text-3); }
.caption { font-size: 0.88rem; color: var(--text-3); margin: 0 0 18px; }

.playground textarea {
  width: 100%; min-height: 150px; resize: vertical;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; font: 1rem/1.6 var(--mono);
}
.playground textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.playground .out { margin-top: 12px; }
.playground .line-lyrics { color: var(--text-2); font-size: 0.95rem; margin: -2px 0 12px; }

/* CTA */

.cta {
  text-align: center; border-radius: 32px; padding: 48px 24px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(255, 255, 255, 0.10), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6); }
.cta p { color: var(--text-2); max-width: 30em; margin: 0 auto 26px; }

/* Long-form pages (privacy, terms, support, guide) */

.page-head { padding: 48px 0 8px; }
.page-head p { color: var(--text-2); font-size: 1.1rem; }
.prose { padding: 16px 0 72px; }
.prose h2 { font-size: 1.55rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 8px 0 24px; }
.prose .summary ul { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--text); }
.prose td { color: var(--text-2); }
.table-scroll { overflow-x: auto; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.toc a:hover { color: var(--text); background: var(--surface-2); }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 700; color: var(--text); list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--text-3); }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 18px 4px; }

.contact-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--text-3); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}

/* Landscape screenshot */

.landscape { margin-top: 88px; }
.landscape .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.phone-land {
  width: 100%; max-width: 860px;
  aspect-ratio: 2622 / 1206;
  border-radius: clamp(24px, 6vw, 46px); padding: clamp(6px, 1.2vw, 10px);
}
.phone-land img { border-radius: clamp(18px, 5vw, 37px); }

/* Two phones side by side */

.phone-pair { display: flex; justify-content: center; gap: 4%; }
.phone-pair .phone { width: 48%; max-width: 260px; margin: 0; border-radius: clamp(26px, 7vw, 42px); padding: clamp(6px, 1.6vw, 9px); }
.phone-pair .phone img { border-radius: clamp(20px, 5.6vw, 34px); }
.phone-pair .phone:nth-child(2) { transform: translateY(8%); }
/* On narrow screens the hero already shows the play-along screen. */
@media (max-width: 859px) {
  .phone-pair .phone.dup { display: none; }
  .phone-pair .phone.dup + .phone { width: min(300px, 78vw); transform: none; }
}
