/* Shared footer additions, loaded on every page with .site-footer (after the
   page's own stylesheet): the newsletter card and a little more contrast in
   the brand block. Colors repeat the site tokens because index.html and the
   guide pages define them in different files. */
.site-footer {
  --fn-ink: #24162f;
  --fn-soft: #5f5068;
  --fn-violet: #8a52f3;
  --fn-violet-deep: #6530bf;
  --fn-rose: #f04f91;
  --fn-line: rgba(66, 37, 80, 0.12);
}

.footer-news {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  max-width: 1180px;
  margin: 0 auto clamp(2.2rem, 4vw, 3.2rem);
  padding: clamp(18px, 2.4vw, 28px) clamp(18px, 3vw, 36px);
  border: 1px solid rgba(138, 82, 243, 0.18);
  border-radius: 28px;
  background: #fff;
}

.footer-news > img { width: clamp(72px, 8vw, 104px); height: auto; border-radius: 24px; }

.footer-news h2 {
  margin: 0;
  color: var(--fn-ink);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.footer-news-copy p { margin: 6px 0 0; color: var(--fn-soft); font-size: 0.95rem; line-height: 1.5; }

.footer-news-form { display: flex; flex-wrap: wrap; gap: 8px; }

.footer-news-form input[type="email"] {
  flex: 1 1 190px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--fn-line);
  border-radius: 14px;
  background: #fbf6fb;
  color: var(--fn-ink);
  font: inherit;
}

.footer-news-form input[type="email"]:focus-visible { outline: 3px solid var(--fn-violet); outline-offset: 1px; }

.footer-news-form button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--fn-violet);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.18s, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.footer-news-form button:hover { background: var(--fn-violet-deep); }
.footer-news-form button:active { transform: scale(0.97); }
.footer-news-form button:disabled { opacity: 0.6; cursor: wait; }

.footer-news-note { flex-basis: 100%; margin: 2px 0 0; color: var(--fn-soft); font-size: 0.8rem; }
.footer-news-note a { color: var(--fn-violet-deep); text-decoration: underline; }
.footer-news-note.is-ok { color: #1f7a4d; font-weight: 700; }
.footer-news-note.is-error { color: #b4234f; font-weight: 700; }

.footer-news .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer-news .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand block: the second tagline line carries the brand color. */
.site-footer .footer-tagline span:first-child { color: var(--fn-ink); }
.site-footer .footer-tagline span:last-child { color: var(--fn-violet-deep); font-weight: 700; }
.site-footer .footer-cols h3 { color: var(--fn-rose); }

@media (max-width: 820px) {
  .footer-news { grid-template-columns: auto minmax(0, 1fr); }
  .footer-news-form { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-news { grid-template-columns: 1fr; text-align: left; }
  .footer-news > img { width: 64px; }
  .footer-news-form button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) { .footer-news-form button { transition: none; } }

/* Off until the privacy policy covers the newsletter: remove the hidden attribute from .footer-news to switch it on. */
.footer-news[hidden] { display: none; }

/* App store badges in the footer brand block (same markup as the homepage
   footer). Self-contained, because legal pages load neither styles.css nor
   guide-styles.css. */
/* Badges sit side by side: the brand column gets a bit more room than the
   base footer gives it, and the badges never wrap on wide screens. */
@media (min-width: 961px) { .site-footer .footer-inner { grid-template-columns: minmax(300px, 1.1fr) minmax(0, 2.9fr); } }
.site-footer .footer-badges { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
.site-footer .footer-badges .store-badge { display: inline-flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 12px; border-radius: 13px; background: #121015; color: #fff; text-decoration: none; transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.site-footer .footer-badges .store-badge:hover { transform: translateY(-2px); }
.site-footer .footer-badges .store-badge svg { width: 22px; height: 22px; flex: 0 0 auto; }
.site-footer .footer-badges .store-badge span { display: grid; line-height: 1.1; text-align: left; }
.site-footer .footer-badges .store-badge small { font-size: .62rem; opacity: .78; }
.site-footer .footer-badges .store-badge strong { font-size: .95rem; letter-spacing: -.01em; color: #fff; }
@media (prefers-reduced-motion: reduce) { .site-footer .footer-badges .store-badge { transition: none; } }
