/* =========================================================
   app.html — app showcase / landing page styles.
   Loaded alongside css/style.css; reuses its tokens, buttons,
   .notice, .kicker, .facet, .cta-band, .form-field, etc.
   ========================================================= */

/* ---------- "Coming soon" store badges (hero) ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 20px 10px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--teal-700);
}

.store-badge-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.store-badge-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.store-badge-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}

.store-badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral-400);
}

.store-badge-soon::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral-500);
  flex-shrink: 0;
}

/* ---------- Hero phone mockup ---------- */
.hero-phone-wrap {
  position: relative;
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.hero-phone-wrap .phone-frame {
  width: 240px;
  transform: rotate(-4deg);
  filter: drop-shadow(0 22px 34px rgba(30, 93, 116, 0.22));
}

/* ---------- Feature grid ---------- */
.app-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.app-feature-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  overflow: hidden;
}

.app-feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--teal-600);
}

.app-feature-card:nth-child(3n + 2)::before {
  background: var(--coral-500);
}

.app-feature-card:nth-child(3n)::before {
  background: var(--blue-600);
}

.app-feature-card .facet {
  margin-bottom: 16px;
  width: 13px;
  height: 13px;
}

.app-feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-feature-card p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin: 0;
}

.pro-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--blue-900);
  background: var(--teal-100);
  border: 1px solid var(--teal-300);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---------- Screenshot showcase ---------- */
.showcase-head {
  margin-bottom: 44px;
}

.showcase-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.showcase-head-top .kicker {
  margin-bottom: 0;
}

.showcase-status-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal-700);
  background: var(--teal-100);
  border: 1px solid var(--teal-300);
  border-radius: 999px;
  padding: 5px 14px;
}

/* ---------- Orbit: stage + arc of screens, replacing a plain scroll strip.
   One large "stage" screenshot in the center, flanked by arrow buttons; below
   it, all 10 screens sit as small nodes along a shallow arc connected by the
   same thin constellation lines used in the hero/CTA, with a small bird-glyph
   marker (the site's own logo mark) tracking the active node. ---------- */
.orbit {
  margin-top: 56px;
}

.orbit-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.orbit-arrow {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}

.orbit-arrow:hover {
  background: var(--teal-700);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.orbit-arrow svg {
  width: 20px;
  height: 20px;
}

.orbit-stage-inner {
  position: relative;
  width: 250px;
  flex-shrink: 0;
}

.orbit-stage-glow {
  position: absolute;
  inset: -30px -60px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(47, 167, 158, 0.22), rgba(47, 167, 158, 0) 70%),
    radial-gradient(closest-side, rgba(255, 122, 89, 0.14), rgba(255, 122, 89, 0) 70%);
  background-position: 30% 20%, 80% 85%;
  background-repeat: no-repeat;
  background-size: 75% 75%, 60% 60%;
  filter: blur(6px);
}

.orbit-frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* `display: flex` above beats the UA's [hidden] rule, so restate it —
   app-page.js hides inactive frames via the `hidden` attribute. */
.orbit-frame[hidden] {
  display: none;
}

.orbit-frame .phone-frame {
  width: 250px;
}

.orbit-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 22px 0 0;
}

/* Per-screen light/dark switch, shown only under screens that have both. */
.orbit-toggle {
  display: inline-flex;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  background: var(--paper);
}

.orbit-toggle button {
  border: 0;
  background: transparent;
  padding: 6px 15px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.orbit-toggle button.is-active {
  background: var(--ink);
  color: #fff;
}

.orbit-counter {
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.orbit-counter strong {
  color: var(--teal-700);
}

/* ---------- Orbit ring (the arc of small nodes) ---------- */
.orbit-ring {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 240px;
  margin: 60px auto 0;
}

.orbit-ring-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.orbit-node {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 2px solid var(--paper);
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.2s ease, border-color 0.2s ease;
}

.orbit-node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.orbit-node:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: var(--shadow-md);
}

.orbit-node.is-active {
  transform: translate(-50%, -50%) scale(1.28);
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(47, 167, 158, 0.18), var(--shadow-md);
}

.orbit-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -145%);
  filter: drop-shadow(0 4px 8px rgba(22, 50, 58, 0.28));
  pointer-events: none;
  transition: left 0.45s var(--ease), top 0.45s var(--ease);
}

/* ---------- Phone frame (shared: hero + showcase) ---------- */
/* The screen's aspect-ratio matches the real screenshots (668×1280) exactly, so
   object-fit: cover has nothing to crop — it fills the box precisely. The frame
   itself has no fixed height: it sizes to the screen (via aspect-ratio) plus its
   padding, so it always wraps the screenshot correctly regardless of width. */
.phone-frame {
  position: relative;
  width: 220px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 34px;
  padding: 9px;
  box-shadow: var(--shadow-md);
}

.phone-frame::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: var(--ink);
  border-radius: 0 0 13px 13px;
  z-index: 2;
}

.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 668 / 1280;
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder shown until real screenshots are added to brand/app-screens/ */
.phone-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--teal-200) 0%, var(--teal-500) 55%, var(--blue-900) 100%);
  position: relative;
  overflow: hidden;
}

.phone-placeholder img {
  width: 56%;
  opacity: 0.55;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
}

.phone-placeholder span {
  position: absolute;
  bottom: 20px;
  left: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.phone-frame[data-theme-slot="dark"] .phone-placeholder {
  background: linear-gradient(160deg, #1c3a3e 0%, #12262b 60%, #0b1a1f 100%);
}

/* ---------- Notify / signup panel ---------- */
.signup-band {
  background: var(--paper-alt);
}

.signup-panel {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 40px 44px;
  overflow: hidden;
  text-align: center;
}

.signup-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-300), var(--teal-600) 55%, var(--blue-600));
}

.signup-panel .kicker {
  justify-content: center;
}

.signup-panel p {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto 26px;
}

.signup-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: left;
}

.signup-row .form-field {
  flex: 1 1 260px;
  margin-bottom: 0;
  text-align: left;
}

.signup-row .btn {
  flex-shrink: 0;
  height: 46px;
}

.signup-hint {
  font-size: 0.82rem;
  color: var(--ink-faint);
  max-width: 46ch;
  margin: 16px auto 0;
}

.signup-success {
  padding: 22px 22px 18px;
  background: var(--teal-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
}

.signup-success:focus {
  outline: none;
}

.signup-success p {
  margin: 0;
  color: var(--ink);
}

.signup-form[hidden],
.signup-success[hidden] {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app-feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-phone-wrap .phone-frame {
    width: 210px;
  }

  /* Stacked hero: the column is too narrow for the tags to float beside the
     phone, so they'd cover it — set them in a row above it instead. */
  .hero-phone-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .hero-phone-wrap .status-tag {
    position: static;
    transform: none;
    max-width: none;
    min-width: 0;
  }

  .hero-phone-wrap .phone-frame {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 18px;
  }

  .orbit-ring {
    height: 190px;
  }

  .orbit-node {
    width: 42px;
    height: 42px;
  }

  .orbit-marker {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 640px) {
  .store-badges {
    flex-direction: column;
    align-items: flex-start;
  }

  .orbit-stage {
    gap: 8px;
  }

  .orbit-arrow {
    width: 42px;
    height: 42px;
  }

  .orbit-arrow svg {
    width: 16px;
    height: 16px;
  }

  .orbit-stage-inner {
    width: 190px;
  }

  .orbit-frame .phone-frame {
    width: 190px;
  }

  .orbit-caption {
    font-size: 1.1rem;
  }

  .orbit-ring {
    height: 150px;
    margin-top: 44px;
  }

  .orbit-node {
    width: 32px;
    height: 32px;
  }

  .orbit-marker {
    width: 16px;
    height: 16px;
  }

  .signup-panel {
    padding: 30px 22px;
  }

  .signup-row {
    flex-direction: column;
  }

  .signup-row .btn {
    width: 100%;
    justify-content: center;
  }
}
