/* Site chrome and shared components: header, menu, buttons, pills, FAQ, footer. */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  transition: box-shadow 200ms var(--ease-press), background 200ms var(--ease-press);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand__mark { width: auto; height: 22px; fill: currentColor; }

.brand__word {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
  padding-bottom: 1px;
}

.site-nav { margin-left: auto; }

.site-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink-600);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms, background 160ms;
}

.site-nav a:hover { color: var(--ink); background: var(--muted); }

.site-nav a[aria-current="page"],
.site-nav a.is-active { color: var(--ink); background: var(--muted-2); }

.site-header__cta { flex: none; }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: -10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 260ms var(--ease-push), top 260ms var(--ease-push);
}

.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms var(--ease-press), transform 320ms var(--ease-push);
}

.mobile-menu[hidden] { display: none; }

.mobile-menu.is-open { opacity: 1; transform: none; }

.mobile-menu__primary { margin: 0; padding: 0; list-style: none; }

.mobile-menu__primary a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-menu__primary a::after {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2.4px solid var(--ink-300);
  border-right: 2.4px solid var(--ink-300);
  transform: rotate(45deg);
}

.mobile-menu__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.mobile-menu__secondary a { color: var(--ink-500); font-size: 15px; font-weight: 600; text-decoration: none; }

.mobile-menu__store { margin-top: auto; padding-top: 32px; }

@media (max-width: 1023px) {
  .site-nav { display: none; }
  .site-header .site-header__cta { height: 36px; margin-left: auto; padding: 0 14px; font-size: 14px; }
  .menu-toggle { display: block; margin-left: 4px; }
}

@media (max-width: 339px) {
  .site-header .site-header__cta { display: none; }
  .menu-toggle { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--dur-press-out) var(--ease-press),
    opacity var(--dur-press-out) var(--ease-press),
    background 160ms;
}

.btn:hover { background: #222; }

.btn--sm { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; }

.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.btn--outline:hover { background: var(--muted); }

.btn--light { background: var(--paper); color: var(--ink); }

.btn--light:hover { background: #e9e9e9; }

/* PressButton: scale .97, alpha .8, 100 ms in / 180 ms out */
.press:active,
.btn:active,
.store-badge:active {
  transform: scale(0.97);
  opacity: 0.8;
  transition-duration: var(--dur-press-in);
}

.press { transition: transform var(--dur-press-out) var(--ease-press), opacity var(--dur-press-out) var(--ease-press); }

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  transition: transform var(--dur-press-out) var(--ease-press), opacity var(--dur-press-out) var(--ease-press);
}

.store-badge img { width: auto; height: 54px; }

.store-badge--sm img { height: 44px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 200ms var(--ease-push);
}

.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Pills (the app's InfoPill) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.pill svg { width: 13px; height: 13px; flex: none; }

.pill--light { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--online);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--online);
  animation: live-ping 2s var(--ease-out) infinite;
}

@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-xl);
  background: var(--muted);
}

.section--dark .card { background: #161616; }

/* ---------- FAQ (native details/summary) ---------- */
.faq { border-top: 1px solid var(--line); }

.section--dark .faq,
.section--dark .faq details { border-color: var(--line-dark); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

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

.faq__icon {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
  transition: background 200ms, transform 300ms var(--ease-push);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 300ms var(--ease-push);
}

.faq__icon::after { transform: rotate(90deg); }

.faq details[open] .faq__icon { background: var(--ink); }
.faq details[open] .faq__icon::before,
.faq details[open] .faq__icon::after { background: var(--paper); }
.faq details[open] .faq__icon::after { transform: rotate(0deg); }

.faq__answer {
  max-width: 72ch;
  padding: 0 56px 26px 0;
  color: var(--ink-600);
}

.faq__answer p + p { margin-top: 12px; }

.faq details[open] .faq__answer { animation: faq-in 360ms var(--ease-out); }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-900);
  color: var(--on-dark);
  padding: clamp(64px, 8vw, 96px) 0 calc(32px + env(safe-area-inset-bottom));
}

.site-footer a { text-decoration: none; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}

.footer-brand .brand { color: var(--on-dark); }

.footer-brand .brand__mark { height: 26px; }

.footer-brand p {
  max-width: 28ch;
  margin: 18px 0 24px;
  color: var(--on-dark-2);
  font-size: 15px;
  line-height: 1.55;
}

.footer-col h2 {
  margin-bottom: 16px;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--on-dark-3);
}

.footer-col ul { margin: 0; padding: 0; list-style: none; }

.footer-col li + li { margin-top: 10px; }

.footer-col a {
  color: var(--on-dark-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 160ms;
}

.footer-col a:hover,
.footer-col a[aria-current="page"] { color: var(--on-dark); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-3);
  font-size: 13px;
  line-height: 1.6;
}

.footer-bottom p { max-width: 70ch; }

@media (max-width: 1023px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .footer-top { gap: 32px 20px; }
}
