:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.85);
  --text: #0b0b0f;
  --muted: #6e6e73;
  --border: rgba(15, 15, 20, 0.08);
  --accent: #0071e3;
  --accent-ghost: rgba(0, 113, 227, 0.1);
  --panel-background: var(--surface);
  --panel-border: 1px solid var(--border);
  --panel-radius: 28px;
  --panel-radius-lg: 32px;
  --panel-shadow: 0 10px 25px rgba(15, 15, 20, 0.08);
  --panel-shadow-lg: 0 15px 30px rgba(15, 15, 20, 0.08);
  --content-max-width: 720px;
  font-size: 16px;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
    'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 8px 0;
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
  pointer-events: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4vw;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

.glyph {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--text);
  color: white;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  text-decoration: none;
  transition: outline 0.2s ease;
}

.glyph:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.75rem;
}

.primary-nav {
  display: flex;
  gap: 1.5rem;
}

.primary-nav a,
.footer-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.primary-nav a:hover,
.footer-nav a:hover {
  color: var(--accent);
}

.primary-nav a:focus-visible,
.footer-nav a:focus-visible,
.button:focus-visible,
.app-store-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

main {
  padding: 4rem 4vw 6rem;
}

.hero {
  max-width: var(--content-max-width);
  margin: 3rem auto 5rem;
  text-align: center;
}

.hero h2 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted);
}

.cta-group {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: white;
}

.button.ghost {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

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

.section {
  margin-bottom: 5rem;
}

.section-intro {
  max-width: var(--content-max-width);
  margin-bottom: 2rem;
}

.section-intro h3 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.app-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--panel-radius-lg);
  background: var(--panel-background);
  border: var(--panel-border);
  box-shadow: var(--panel-shadow-lg);
}

.app-card img {
  width: 100%;
  border-radius: 24px;
}

.app-card h2,
.app-card h3,
.app-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.35rem;
}

.app-card ul,
.feature-card ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem 0;
  color: var(--muted);
}

.card-grid .app-card.is-expanded {
  grid-column: 1 / -1;
}

.text-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.app-details {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.6);
}

.app-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  transition: outline 0.2s ease;
}

.app-details summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.app-details summary::after {
  content: ' ▾';
  font-weight: normal;
  color: var(--muted);
}

.app-details[open] summary::after {
  content: ' ▴';
}

.app-details[open] summary {
  margin-bottom: 1rem;
}

.app-details__content .feature-section,
.perfect-timing-details__content .feature-section {
  margin-bottom: 2.5rem;
}

.app-details__content .section-intro,
.perfect-timing-details__content .section-intro {
  margin-bottom: 1rem;
}

.site-footer {
  padding: 2rem 4vw;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 4vw 5rem;
}

.legal-intro {
  margin-bottom: 2rem;
}

.legal-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.legal-card {
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  border: var(--panel-border);
  box-shadow: var(--panel-shadow);
}

.legal-card h3 {
  margin-top: 0;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.legal-header {
  position: static;
}

/* Contact page */

body.page-contact main {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 3rem;
}

.contact-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.contact-panel {
  background: var(--panel-background);
  border: var(--panel-border);
  border-radius: var(--panel-radius-lg);
  box-shadow: var(--panel-shadow-lg);
  padding: 2.5rem;
}

.contact-panel__intro h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.contact-panel__intro p {
  margin-top: 0;
  color: var(--muted);
}

.contact-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

.form-field label,
.form-field__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, outline 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-submit {
  align-self: flex-start;
}

.status-banner {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 600;
  margin-top: 1rem;
}

.status-banner--success {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.status-banner--error {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

.turnstile-missing {
  margin: 0;
  color: #b91c1c;
  font-weight: 500;
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .app-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .app-card ul {
    text-align: left;
  }
}

/* BandScore page */

body.page-bandscore main {
  padding-top: 3rem;
}

.bandscore-hero {
  max-width: 860px;
  margin: 0 auto 4rem;
  text-align: center;
}

.bandscore-hero h2 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  margin-bottom: 1rem;
}

.bandscore-hero .lead {
  color: var(--muted);
  font-size: 1.125rem;
}

.badge-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
}

.app-store-link {
  display: inline-block;
  margin-top: 1rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-store-link:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.app-store-link:active {
  transform: translateY(0);
}

.app-store-badge {
  width: 120px;
  height: 40px;
  display: block;
  border-radius: 4px;
}

.feature-section {
  margin-bottom: 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-grid.two-column {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feature-grid.three-column {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
  padding: 1.75rem;
  background: var(--panel-background);
  border-radius: var(--panel-radius);
  border: var(--panel-border);
  box-shadow: var(--panel-shadow);
}

.feature-card h4 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
}

.feature-card ul {
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-grid figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
}

.gallery-grid img {
  width: 100%;
  display: block;
}

