* {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --page-background: #fdfdfd;
  --panel-background: #f7f7f9;
  --text: #1d1d1f;
  --secondary-text: #6e6e73;
  --border: #d2d2d7;
  --link: #0066cc;
  --header-background: rgba(255, 255, 255, 0.82);
}

html {
  background: var(--page-background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  backdrop-filter: saturate(180%) blur(18px);
  background: var(--header-background);
  border-bottom: 1px solid rgba(210, 210, 215, 0.7);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  align-items: center;
  display: flex;
  margin: 0 auto;
  max-width: 760px;
  min-height: 48px;
  padding: 0 24px;
}

.home-link {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.legal-page {
  margin: 0 auto;
  max-width: 760px;
  padding: 72px 24px 88px;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  font-size: 3.25rem;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 28px;
}

h2 {
  border-top: 1px solid var(--border);
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.25;
  margin-bottom: 16px;
  margin-top: 36px;
  padding-top: 32px;
}

h3 {
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.35;
  margin-bottom: 10px;
  margin-top: 24px;
}

p {
  margin-bottom: 18px;
}

ul {
  margin-bottom: 20px;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 10px;
  padding-left: 0.15rem;
}

.updated {
  color: var(--secondary-text);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.contact-line,
.last-updated {
  font-weight: 600;
}

.legal-content > :last-child,
.legal-content section:last-child > :last-child {
  margin-bottom: 0;
}

.home-header__inner {
  justify-content: space-between;
  max-width: 1040px;
}

.home-nav {
  display: flex;
  gap: 22px;
}

.home-nav a {
  color: var(--secondary-text);
  font-size: 0.86rem;
  font-weight: 500;
}

.home-main {
  margin: 0 auto;
  max-width: 1040px;
  padding: 88px 24px 56px;
}

.home-hero {
  min-height: clamp(440px, 64vh, 620px);
  padding: 64px 0 72px;
}

.eyebrow,
.section-label {
  color: var(--secondary-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.home-hero h1 {
  font-size: 5.8rem;
  line-height: 1;
  margin-bottom: 28px;
  max-width: 820px;
}

.hero-copy {
  color: var(--secondary-text);
  font-size: 1.8rem;
  line-height: 1.25;
  margin-bottom: 18px;
  max-width: 640px;
}

.studio-note {
  border-left: 3px solid #ff9f0a;
  color: var(--secondary-text);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 34px;
  max-width: 520px;
  padding-left: 13px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.text-link {
  font-weight: 700;
}

.home-section {
  border-top: 1px solid var(--border);
  padding: 56px 0;
}

.section-heading {
  margin-bottom: 28px;
  max-width: 620px;
}

.section-heading h2,
.link-panel h2 {
  border-top: 0;
  font-size: 2.7rem;
  line-height: 1.08;
  margin: 0;
  padding: 0;
}

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

.app-card,
.link-panel {
  background: var(--panel-background);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.app-card {
  display: grid;
  gap: 20px;
  grid-template-rows: auto 1fr;
  min-height: 260px;
  padding: 28px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.app-card:hover {
  border-color: var(--link);
  transform: translateY(-2px);
}

.app-card h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  margin-top: 0;
}

.app-card p,
.link-panel p,
.home-footer p {
  color: var(--secondary-text);
}

.app-tag {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  margin: 8px 0 0;
  padding: 8px 11px;
}

.app-icon {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 22%;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.55rem;
  font-weight: 800;
  justify-content: center;
  width: 64px;
}

.app-icon--kalimbar {
  background: linear-gradient(135deg, #007aff, #30d158);
}

.app-icon--melodician {
  background: linear-gradient(135deg, #ff375f, #ff9f0a);
}

.app-icon--taikin {
  background: linear-gradient(135deg, #5856d6, #64d2ff);
}

.split-section {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-panel {
  padding: 32px;
}

.clean-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.clean-list li {
  border-top: 1px solid var(--border);
  margin: 0;
  padding: 14px 0;
}

.clean-list li:last-child {
  padding-bottom: 0;
}

.clean-list a {
  font-weight: 650;
}

.home-footer {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px 24px 44px;
}

.home-footer p {
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 640px) {
  .site-header__inner {
    padding: 0 18px;
  }

  .legal-page {
    padding: 48px 18px 64px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.18rem;
  }

  .home-nav {
    gap: 14px;
  }

  .home-main {
    padding: 48px 18px 32px;
  }

  .home-hero {
    min-height: auto;
    padding: 44px 0 56px;
  }

  .home-hero h1 {
    font-size: 3.6rem;
  }

  .hero-copy {
    font-size: 1.28rem;
  }

  .section-heading h2,
  .link-panel h2 {
    font-size: 2rem;
  }

  .hero-actions {
    gap: 14px;
  }

  .app-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 0;
    padding: 24px;
  }

  .link-panel {
    padding: 26px;
  }

  .home-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 24px 18px 36px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-background: #050505;
    --panel-background: #1c1c1e;
    --text: #f5f5f7;
    --secondary-text: #a1a1a6;
    --border: #38383a;
    --link: #2997ff;
    --header-background: rgba(0, 0, 0, 0.72);
  }

  .site-header {
    border-bottom-color: rgba(56, 56, 58, 0.72);
  }
}
