/* Shared website shell: navigation, legal/download page framing, and footer */

body.download-page,
body.legal-page {
  background:
    linear-gradient(180deg, rgba(255,232,229,.92) 0%, rgba(255,244,238,.55) 380px, #fff 100%);
  overflow-x: hidden;
  padding-top: 0;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,244,238,.94);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink, #0E0E10);
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-links,
.nav-actions {
  display: none;
}

.nav-links {
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  overflow: hidden;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink-3, #5C5C63);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink, #0E0E10);
  background: rgba(255,255,255,.78);
}

.nav-links a:active,
.nav-primary:active,
.nav-ghost:active,
.mobile-panel a:active,
.mobile-panel button:active,
.foot-links a:active {
  transform: scale(.97);
}

.nav-links a.is-tapping,
.nav-primary.is-tapping,
.nav-ghost.is-tapping,
.mobile-panel a.is-tapping,
.foot-links a.is-tapping {
  animation: nav-burst .36s cubic-bezier(.2,.7,.2,1);
}

@keyframes nav-burst {
  0% { box-shadow: 0 0 0 0 rgba(255,59,71,.24); transform: scale(.98); }
  62% { box-shadow: 0 0 0 10px rgba(255,59,71,0); transform: scale(1.03); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,71,0); transform: scale(1); }
}

html.page-leaving body {
  opacity: .48;
  transform: translateY(8px) scale(.992);
  filter: saturate(.92) blur(1px);
}

html.page-entering body {
  animation: page-enter .38s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes page-enter {
  from { opacity: .32; transform: translateY(12px) scale(.992); filter: saturate(.92) blur(1px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1) blur(0); }
}

body {
  transition: opacity .26s ease, transform .26s ease, filter .26s ease;
}

.nav-actions {
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-ghost,
.nav-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nav-ghost {
  color: var(--ink-2, #2A2A2D);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(0,0,0,.06);
}

.nav-primary {
  color: #fff;
  background: var(--chili, #FF3B47);
  box-shadow: 0 10px 24px rgba(255,59,71,.22);
}

.mobile-menu {
  position: relative;
  margin-left: auto;
}

.mobile-menu summary {
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.mobile-panel {
  position: absolute;
  right: 0;
  top: 48px;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--line, #ECE7E2);
  box-shadow: 0 24px 60px rgba(14,14,16,.14);
}

.mobile-panel a,
.mobile-panel button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-2, #2A2A2D);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.mobile-panel a:active,
.mobile-panel button:active {
  background: var(--bg-warm, #FFF4EE);
}

body.download-page .topnav {
  margin-inline: -18px;
  padding-inline: 18px;
}

body.download-page footer {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding: 36px 0 24px;
  border-top: 0;
  text-align: left;
}

body.legal-page .page {
  width: 100%;
  max-width: none;
  background: transparent;
  box-shadow: none;
}

body.legal-page .hero.legal-hub {
  position: relative;
  width: min(calc(100% - 32px), 920px);
  margin: 18px auto 0;
  overflow: hidden;
  padding: 22px 20px 28px;
  border: 1px solid rgba(255,59,71,.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255,59,71,.14), transparent 28%),
    linear-gradient(135deg, rgba(255,232,229,.94) 0%, rgba(255,247,243,.92) 66%, #fff 100%);
  box-shadow: 0 18px 54px rgba(255,59,71,.08);
}

body.legal-page .legal-hub h1 {
  margin-top: 12px;
  line-height: 1.12;
}

body.legal-page .legal-hub .meta {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--ink-3, #5C5C63);
  font-size: 12px;
  line-height: 1.4;
}

body.legal-page .legal-hub p {
  margin-top: 10px;
  max-width: 700px;
  color: var(--ink-3, #5C5C63);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  body.legal-page .legal-hub h1 {
    font-size: 21px;
  }

  body.legal-page .legal-hub p {
    font-size: 13.5px;
    line-height: 1.65;
  }
}

body.legal-page article {
  background: #fff;
}

footer {
  padding: 36px 20px 24px;
  font-size: 11px;
  color: var(--ink-3, #5C5C63);
  line-height: 1.8;
}

.footer-grid {
  display: grid;
  gap: 22px;
}

.footer-brand {
  color: var(--ink, #0E0E10);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.footer-intro {
  max-width: 320px;
  font-size: 13px;
  color: var(--ink-3, #5C5C63);
}

.foot-links {
  display: grid;
  gap: 8px;
}

.foot-title {
  color: var(--ink, #0E0E10);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.foot-links a {
  color: var(--ink-2, #2A2A2D);
  font-size: 12px;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .nav-links a,
  .nav-ghost,
  .nav-primary,
  .mobile-panel a,
  .mobile-panel button,
  .foot-links a {
    transition: none;
    animation: none;
  }

  html.page-leaving body {
    opacity: 1;
    transform: none;
    filter: none;
  }

  html.page-entering body {
    animation: none;
  }
}

.foot-meta {
  margin-top: 24px;
  color: var(--ink-4, #9A9AA1);
  text-align: center;
  border-top: 1px solid var(--line, #ECE7E2);
  padding-top: 18px;
}

@media (min-width: 900px) {
  .topnav {
    padding: 14px 0;
    background: rgba(255,244,238,.88);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
  }

  .brand {
    font-size: 18px;
  }

  .nav-links,
  .nav-actions {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }

  body.download-page .topnav {
    grid-column: 1 / -1;
    margin-inline: 0;
    padding-inline: 0;
  }

  body.legal-page .page {
    width: min(100% - 64px, 1200px);
    max-width: 1200px;
    margin: 0 auto;
  }

  body.legal-page .hero.legal-hub {
    width: min(100%, 920px);
    margin: 34px auto 0;
    padding: 38px 52px 52px;
    border-radius: 30px;
  }

  body.legal-page .legal-hub h1 {
    font-size: 42px;
    letter-spacing: 0;
  }

  body.legal-page .legal-hub .meta {
    margin-top: 16px;
    font-size: 14px;
  }

  body.legal-page .legal-hub p {
    max-width: 720px;
    font-size: 16px;
    line-height: 1.75;
  }

  body.legal-page article {
    max-width: 920px;
    margin: -24px auto 0;
    padding: 48px 58px 92px;
    border: 1px solid var(--line, #ECE7E2);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(255,59,71,.08), 0 2px 8px rgba(14,14,16,.04);
    position: relative;
  }

  footer {
    padding: 44px 0 34px;
    font-size: 13px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
    text-align: left;
  }

  .foot-links a:hover {
    color: var(--chili, #FF3B47);
  }
}

/* Shared footer module */
footer[data-site-footer] .footer-grid {
  align-items: start;
}

footer[data-site-footer] .foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer[data-site-footer] .foot-title {
  margin: 0 0 4px;
  line-height: 1.4;
}

footer[data-site-footer] .foot-links a {
  display: block;
  line-height: 1.6;
}
