/* Gantry Apps page and privacy policy.
   Reuses the apps-* layout classes from apps.css; this file re-themes them
   under .gantry-body with the app's own palette (ui/theme/Color.kt) and
   adds the screenshot preview frame. Sorbet and Parallax styles are untouched. */

.gantry-body {
  --apps-ink: #eaf2ff;
  --apps-muted: #a9bede;
  --apps-panel: #10233f;
  --apps-panel-raised: #16305a;
  --apps-line: #2c4a7c;
  --apps-pink: #ff6600;
  --apps-accent: #4d9fff;
  --apps-mint-accent: #7cc24a;
  --apps-peach: #ff8a3d;
  --apps-lemon: #7cc24a;
  --apps-mint: #7cc24a;
  --apps-blue: #4d9fff;
  --apps-lavender: #8cb8ff;
  --apps-dark: #0d1b33;
  --apps-shadow: 0 24px 70px rgba(0, 0, 0, .3);
  --gt-sky: #58a6ff;
  --gt-deep: #1f6feb;
  background:
    radial-gradient(circle at 8% 4%, rgba(31, 111, 235, .12), transparent 27rem),
    radial-gradient(circle at 95% 20%, rgba(88, 166, 255, .08), transparent 30rem),
    #0d1b33;
}

[data-theme="light"] .gantry-body {
  --apps-ink: #10233f;
  --apps-muted: #4a6285;
  --apps-panel: #ffffff;
  --apps-panel-raised: #eaf2ff;
  --apps-line: #c9d8f0;
  /* Text accents darken for paper. Fills stay the bright brand colours so
     buttons and icon plates keep dark glyphs. */
  --apps-accent: #1857c0;
  --apps-mint-accent: #3f7a1e;
  --apps-dark: #0d1b33;
  --apps-shadow: 0 24px 70px rgba(24, 60, 120, .14);
  background:
    radial-gradient(circle at 8% 4%, rgba(31, 111, 235, .10), transparent 28rem),
    radial-gradient(circle at 95% 20%, rgba(63, 122, 30, .07), transparent 30rem),
    #f4f8ff;
}

/* Hero: cool blue glow instead of Sorbet's pastel wash. */
.gantry-body .apps-hero {
  background:
    radial-gradient(circle at 90% 12%, rgba(88, 166, 255, .16), transparent 26%),
    radial-gradient(circle at 10% 95%, rgba(31, 111, 235, .12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 58%),
    var(--apps-panel);
}
[data-theme="light"] .gantry-body .apps-hero {
  background:
    radial-gradient(circle at 90% 12%, rgba(88, 166, 255, .26), transparent 29%),
    radial-gradient(circle at 10% 95%, rgba(31, 111, 235, .12), transparent 36%),
    linear-gradient(145deg, #ffffff, #f4f8ff);
}
.gantry-body .apps-hero::before {
  border-color: rgba(31, 111, 235, .45);
  box-shadow: 0 0 0 32px rgba(31, 111, 235, .05), 0 0 0 66px rgba(88, 166, 255, .04);
}
.gantry-body .apps-hero::after { background: rgba(88, 166, 255, .12); }
.gantry-body .apps-hero-visual { width: min(100%, 370px); }
.gantry-body .apps-hero-visual::before {
  background: linear-gradient(150deg, var(--gt-deep), var(--apps-lemon));
  opacity: .38;
}
.gantry-body .apps-hero-visual img { border-color: rgba(234, 242, 255, .16); }

/* Buttons and controls. */
.gantry-body .apps-button.primary { box-shadow: 0 10px 28px rgba(31, 111, 235, .22); }
.gantry-body .apps-button.secondary { border-color: #33507e; }
[data-theme="light"] .gantry-body .apps-button.secondary { border-color: #a9c2e4; }
.gantry-body .apps-feature-card:hover { border-color: rgba(31, 111, 235, .55); }
[data-theme="light"] .gantry-body .apps-feature-card:hover { border-color: rgba(24, 87, 192, .45); }
.gantry-body .apps-feature-icon { color: var(--card-icon-ink, var(--apps-dark)); }
.gantry-body .apps-playground {
  background:
    radial-gradient(circle at 100% 0, rgba(31, 111, 235, .12), transparent 40%),
    var(--apps-panel);
}
.gantry-body .apps-choice[aria-pressed="true"] { background: rgba(31, 111, 235, .16); }
[data-theme="light"] .gantry-body .apps-choice[aria-pressed="true"] { background: rgba(24, 87, 192, .10); }

/* Privacy band keeps the dark ink panel in both site themes. */
.gantry-body .apps-privacy-band { background: #0d1b33; }
.gantry-body .apps-privacy-point { border-left-color: #4d9fff; }
.gantry-body .apps-privacy-point:nth-child(2) { border-color: #7cc24a; }
.gantry-body .apps-privacy-point:nth-child(3) { border-color: #ff8a3d; }
.gantry-body .apps-privacy-point h3 { color: #eaf2ff; }
.gantry-body .apps-privacy-point p { color: #a9bede; }
.gantry-body .apps-privacy-intro h2 { color: #eaf2ff; }
.gantry-body .apps-privacy-intro > p { color: #a9bede; }
.gantry-body .apps-privacy-band .apps-eyebrow { color: #8cb8ff; }
.gantry-body .apps-privacy-band .apps-text-link { color: #8cb8ff; }

/* Policy accents. */
.gantry-body .apps-policy-note {
  border-left-color: var(--apps-lemon);
  background: rgba(124, 194, 74, .08);
}

/* Differentiator section's self-hosted note. */
.gantry-backend-note {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--apps-line);
  border-left: 4px solid var(--apps-blue);
  border-radius: 18px;
  background: var(--apps-panel);
}
.gantry-backend-note h3 { margin: 0 0 10px; color: var(--apps-ink); }
.gantry-backend-note p { margin: 0 0 14px; color: var(--apps-muted); }
.gantry-backend-note a { color: var(--apps-accent); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Apps switcher: Gantry-tinted active pill. */
.gantry-body .apps-switcher a[aria-current="page"] { background: rgba(31, 111, 235, .14); }
[data-theme="light"] .gantry-body .apps-switcher a[aria-current="page"] { background: rgba(24, 87, 192, .08); }

/* Screenshot preview phone frame (JS-enhanced; static fallback is the default). */
.gt-phone-wrap { position: relative; width: min(100%, 330px); margin-inline: auto; }
.gt-phone {
  position: relative;
  padding: 9px;
  border: 7px solid #1c355c;
  border-radius: 44px;
  background: #0d1b33;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .36);
}
.gt-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
  transition: opacity .18s ease;
}
.gt-phone.is-swapping img { opacity: 0; }

@media (max-width: 800px) {
  .gantry-body .apps-hero-visual { width: min(100%, 360px); }
  .gt-phone-wrap { width: min(100%, 320px); }
}
@media (max-width: 620px) {
  .gantry-body .apps-hero-visual { width: min(100%, 320px); }
  .gt-phone { border-radius: 36px; }
  .gt-phone img { border-radius: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .gantry-body *,
  .gantry-body *::before,
  .gantry-body *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .gantry-body.apps-motion [data-reveal],
  .apps-motion .gantry-body [data-reveal] { opacity: 1; transform: none; }
  .gt-phone.is-swapping img { opacity: 1; }
}

@media (forced-colors: active) {
  .gt-phone { border: 1px solid ButtonText; }
  .gantry-body .apps-switcher a { border: 1px solid ButtonText; }
}

@media print {
  .gantry-body { background: #fff; }
  .gantry-body .apps-privacy-band { background: #fff; color: #000; }
  .gantry-body .apps-privacy-band h2,
  .gantry-body .apps-privacy-band h3,
  .gantry-body .apps-privacy-band p { color: #000; }
}