/* ==========================================================================
   Core Music — apps page
   Ported 1:1 from `Core Music Apps.dc.html`. Loads after shared.css.
   ========================================================================== */

/* This page's glow travels a shorter distance than the home page's. */
@keyframes om-drift-a { from { transform: translateY(-70px); } to { transform: translateY(70px); } }

.glow--apps {
  top: -200px;
  left: 44%;
  width: 900px;
  height: 820px;
  background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 62%);
  filter: blur(20px);
  animation-name: om-drift-a;
  --drift-from: -70px;
  --drift-to: 70px;
}

/* --------------------------------------------------------------------------
   Main column
   `box-sizing: border-box` here is the design's own declaration — it is the
   only container in the project that sets it, so the 1240px cap includes the
   40px gutters. See the README for the alignment consequence.
   -------------------------------------------------------------------------- */

.apps-main {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Intro — copy left, device pair right, waveform behind both
   -------------------------------------------------------------------------- */

.apps-intro {
  position: relative;
  padding: 110px 0 70px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 56px;
}

/* Bleeds past the content column so the wave runs off both edges; `.page`
   clips the overflow. */
.apps-intro__wave {
  position: absolute;
  z-index: 0;
  top: 52%;
  left: 50%;
  width: 138%;
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.apps-intro__copy { position: relative; z-index: 1; max-width: 560px; }

/* Keeps the headline legible where the waveform runs behind it. */
.apps-intro__copy::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -48px -90px -48px -140px;
  pointer-events: none;
  background: radial-gradient(58% 58% at 38% 50%,
    rgba(10, 10, 11, 0.94) 0%,
    rgba(10, 10, 11, 0.72) 46%,
    rgba(10, 10, 11, 0) 78%);
}

.apps-intro__eyebrow {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #52525b;
  animation: om-rise .8s cubic-bezier(.16, 1, .3, 1) both;
}

.apps-intro__title {
  margin: 24px 0 0;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.97;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
  animation: om-rise .9s cubic-bezier(.16, 1, .3, 1) .08s both;
}

.apps-intro__lede {
  margin: 30px 0 0;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 300;
  color: #a1a1aa;
  max-width: 480px;
  text-wrap: pretty;
  animation: om-rise .9s cubic-bezier(.16, 1, .3, 1) .18s both;
}

/* --------------------------------------------------------------------------
   Device pair

   Flat frames in the project's own device language (see `Core Music Layout.md`:
   "flat 2D frame, no 3D"). Widths are percentages of the pair, and each screen
   keeps its own aspect via `height: auto`, so swapping in a different capture
   needs no numbers changed here. `box-sizing` is border-box locally so those
   percentages include the bezel.
   -------------------------------------------------------------------------- */

.duo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3%;
  animation: om-rise 1s cubic-bezier(.16, 1, .3, 1) .28s both;
}

.duo__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132%;
  height: 128%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(150, 178, 225, 0.16) 0%,
    rgba(110, 140, 190, 0.07) 45%,
    rgba(10, 10, 11, 0) 72%);
  filter: blur(30px);
}

.device {
  position: relative;
  box-sizing: border-box;
  flex: none;
  background: #17181c;
  border: 1px solid #2a2c31;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.9),
              0 0 0 1px rgba(255, 255, 255, 0.03);
}

.device img {
  display: block;
  width: 100%;
  height: auto;
}

.device--phone { width: 33%; padding: 7px; border-radius: 30px; }
.device--phone img { border-radius: 23px; }

.device--pad { width: 61%; padding: 9px; border-radius: 24px; }
.device--pad img { border-radius: 15px; }

/* With the iPad absent the lone phone would read as undersized; centre it and
   let it stand at a natural size instead. */
.duo:not(:has(.device--pad:not([hidden]))) .device--phone { width: 46%; }

/* --------------------------------------------------------------------------
   App list
   -------------------------------------------------------------------------- */

.apps-list { padding: 0 0 130px; }

.app-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 44px 0;
  border-top: 1px solid #1f1f23;
  border-bottom: 1px solid #1f1f23;
}

.app-row__icon {
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 26px;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.9),
              0 0 0 1px rgba(255, 255, 255, 0.08);
}

.app-row__body {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.app-row__title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }

.app-row__meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6f6f78;
}

.app-row__desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 300;
  color: #8e8e96;
  max-width: 560px;
  text-wrap: pretty;
}

.app-row .appstore { flex: none; }

/* --------------------------------------------------------------------------
   "More apps" row
   -------------------------------------------------------------------------- */

.apps-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid #1f1f23;
}

.apps-more__text {
  font-size: 17px;
  font-weight: 400;
  color: #d4d4d8;
  text-wrap: pretty;
}

/* A pill in the same language as the hero's ghost button, so it reads as a
   control rather than a caption. */
.apps-more__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 12px 22px;
  border-radius: 999px;
  background: #17181c;
  border: 1px solid #2a2c31;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: #fafafa;
  transition: background .18s ease, border-color .18s ease;
}
.apps-more__link:hover { background: #1e1f24; border-color: #3a3c43; color: #fafafa; }
.apps-more__link svg { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.apps-more__link:hover svg { transform: translateX(3px); }
