/* ==========================================================================
   Core Music — shared foundations
   Common to every page ported from the Claude Design project: resets, the
   reveal keyframes, the smart app banner, the sticky header, the App Store
   button and the scroll-driven reveal system.

   NOTE: the DC runtime injects only `html,body{height:100%;margin:0}` and does
   not apply a `box-sizing` reset, so these sheets deliberately render in the
   default content-box model. Adding a border-box reset would shift every
   container that pairs `max-width` with horizontal padding.
   ========================================================================== */

html, body { height: 100%; margin: 0; }

body {
  margin: 0;
  background: #0a0a0b;
  -webkit-font-smoothing: antialiased;
}

a { color: #a1a1aa; text-decoration: none; }
a:hover { color: #fafafa; }

img { max-width: 100%; }

/* --------------------------------------------------------------------------
   Keyframes shared by every page. Per-page glow drifts live in the page sheet,
   since the design uses different travel distances on each.
   -------------------------------------------------------------------------- */

@keyframes om-rise    { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes om-in      { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: translateY(0); } }
@keyframes om-in-soft { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes om-fade-out { 0%, 42% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes om-fade-in  { 0%, 42% { opacity: 0; } 58%, 100% { opacity: 1; } }

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  min-height: 100vh;
  background: #0a0a0b;
  color: #fafafa;
  font-family: 'Sora', Helvetica, Arial, sans-serif;
  overflow-x: clip;
}

/* Pages that pin their footer to the bottom of short viewports. */
.page--stack { display: flex; flex-direction: column; }

/* Shared equaliser bar primitive (wordmark, app icon, feature glyphs) */
.eq-bar {
  display: block;
  flex: none;
  width: var(--bar-w);
  height: var(--bar-h);
  border-radius: var(--bar-r, 1px);
  background: var(--bar-c);
}

/* --------------------------------------------------------------------------
   Smart app banner  (mobile only unless `previewAppBanner` forces it)
   -------------------------------------------------------------------------- */

.smart-banner {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #141416;
  border-bottom: 1px solid #232326;
}

@media (min-width: 768px) { #smart-banner { display: none !important; } }
#smart-banner[data-force="1"] { display: flex !important; }

.smart-banner__close {
  width: 22px;
  height: 22px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  cursor: pointer;
  /* button reset */
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.smart-banner__close:hover { color: #e4e4e7; }

/* Drawn icon variant (home) */
.smart-banner__icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(160deg, #26262a, #131315);
  border: 1px solid #2e2e33;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 14px;
}

/* App-icon variant (apps) */
.smart-banner__logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 11px;
}

.smart-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.smart-banner__title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.smart-banner__sub   { font-size: 11px; color: #71717a; }
.smart-banner__meta  { font-size: 11px; color: #52525b; }

.smart-banner__cta {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fafafa;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #0a0a0b;
  cursor: pointer;
  transition: opacity .18s ease;
}
.smart-banner__cta:hover { opacity: .86; color: #0a0a0b; }

/* --------------------------------------------------------------------------
   Ambient scroll-driven glows — shared plumbing. Each page sets position,
   size, gradient, animation-name and the --drift-from / --drift-to pair that
   the JS fallback reads.
   -------------------------------------------------------------------------- */

.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation-timeline: scroll(root);
  animation-duration: auto;
  animation-timing-function: linear;
  animation-fill-mode: both;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 11, 0.66);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.wordmark { display: flex; align-items: center; gap: 10px; }
a.wordmark, a.wordmark:hover { color: #fafafa; }
.wordmark__mark { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.wordmark__name { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }

.site-nav { display: flex; align-items: center; gap: 34px; }

.site-nav__link {
  padding: 2px 0;
  font-size: 13.5px;
  color: #71717a;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-nav__link:hover { color: #fafafa; border-color: #3f3f46; }
.site-nav__link--soft:hover { color: #fafafa; border-color: rgba(255, 255, 255, 0.35); }

.site-nav__link.is-current {
  color: #fafafa;
  border-bottom-color: #fafafa;
  transition: opacity .18s ease;
}
.site-nav__link.is-current:hover { opacity: .8; border-bottom-color: #fafafa; }

/* The source design gives the header no responsive treatment, so below ~680px
   the wordmark and four nav links overflow and get cut off by `overflow-x:
   clip`. Let the nav drop to its own row instead; both rows keep the 40px
   gutter, so the header still reads as left-aligned. */
@media (max-width: 680px) {
  .site-header__inner {
    height: auto;
    min-height: 64px;
    padding: 12px 40px;
    flex-wrap: wrap;
    gap: 8px 24px;
  }
  .site-nav { gap: 24px; flex-wrap: wrap; }
  .wordmark__name { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   App Store button
   -------------------------------------------------------------------------- */

.appstore {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px 13px 18px;
  border-radius: 13px;
  background: #fafafa;
  color: #0a0a0b;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s ease;
}
.appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -14px rgba(255, 255, 255, 0.28);
  color: #0a0a0b;
}

.appstore__glyph {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  background: #0a0a0b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appstore__text { display: flex; flex-direction: column; line-height: 1.15; }
.appstore__eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #52525b;
}
.appstore__name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.02em; color: #0a0a0b; }

/* --------------------------------------------------------------------------
   Footer — identical markup on every page (see index.html / apps.html).
   Four columns (brand, Product, Pages, Legal) over a bar carrying the
   copyright.
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 72px 40px 40px;
}

.site-footer__grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 56px 40px;
}

.site-footer__brand { display: flex; flex-direction: column; gap: 18px; max-width: 300px; }
.site-footer__blurb {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 300;
  color: #71717a;
  text-wrap: pretty;
}

.site-footer__col { display: flex; flex-direction: column; gap: 14px; }
.site-footer__heading { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; color: #fafafa; }

.site-footer__link {
  font-size: 13.5px;
  font-weight: 300;
  color: #71717a;
  transition: color .18s ease;
}
.site-footer__link:hover { color: #fafafa; }

.site-footer__bar {
  max-width: 1240px;
  margin: 56px auto 0;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer__copy { font-size: 12.5px; font-weight: 300; color: #52525b; }

/* --------------------------------------------------------------------------
   Scroll-driven reveals
   -------------------------------------------------------------------------- */

[data-reveal] {
  animation-timeline: view();
  animation-range: entry var(--range-entry) cover var(--range-cover);
  animation-duration: auto;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
}
[data-reveal="in"]      { animation-name: om-in;      --reveal-y: 44px; }
[data-reveal="in-soft"] { animation-name: om-in-soft; --reveal-y: 22px; }

/* Fallback for engines without scroll-driven animations (Safari, Firefox).
   `dc-runtime.js` sets this class only when `animation-timeline` is
   unsupported, so Chromium rendering is untouched. */
.no-scroll-timeline [data-reveal] {
  animation: none;
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1),
              transform .9s cubic-bezier(.16, 1, .3, 1);
}
.no-scroll-timeline [data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
.no-scroll-timeline .glow { animation: none; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .no-scroll-timeline [data-reveal] { opacity: 1; transform: none; }
}
