:root {
  --color-primary: #ff145e;
  --color-primary-soft: #ff5c8c;
  --color-bg: #ffffff;
  --color-surface: #efefef;
  --color-text-main: #1f1f1f;
  --color-text-muted: #707070;

  --radius-lg: 24px;
  --radius-md: 14px;

  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.12);
  --max-width: 1120px;
  --max-width-policy: 1040px; /* slightly wider for Apple-like docs */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", sans-serif;
  background: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.container-policy { width: 100%; max-width: var(--max-width-policy); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(90deg, #ff145e, #ff2f73);
  color: #fff;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  text-transform: uppercase;
}
.logo span { opacity: 0.85; font-weight: 500; }

.header-links { display: flex; gap: 10px; align-items: center; }
.header-link {
  font-size: 0.85rem;
  opacity: 0.92;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}
.header-link:hover {
  transform: translateY(-1px);
  opacity: 1;
  background: rgba(255,255,255,0.12);
}
.header-link--active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  opacity: 1;
}

/* Landing hero */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 48px 0 56px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-copy { text-align: center; max-width: 480px; }

.hero-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 0.98rem;
  margin-bottom: 22px;
  opacity: 0.92;
}

.hero-subtitle strong { font-weight: 600; }

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.hero-tag {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.store-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.store-badge {
  display: inline-flex; align-items: center; padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.store-badge--apple { background: #000; color: #fff; }
.store-badge--google { background: #fff; color: #000; }

.store-badge-icon {
  font-size: 1.3rem;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-small {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
  text-transform: uppercase;
}
.store-badge-big { font-size: 0.9rem; font-weight: 600; }

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.3);
}

.hero-meta { opacity: 0.88; font-size: 0.94rem; }

.hero-visual {
  width: min(360px, 100%);
  border-radius: 40px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  box-shadow: 0 22px 40px rgba(0,0,0,0.18);
}

.hero-visual-inner {
  border-radius: 32px;
  overflow: hidden;
  background: #ff6c93;
}

/* Footer */
.site-footer {
  padding: 26px 0 34px;
  border-top: 1px solid #f0f0f0;
  font-size: 0.84rem;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (min-width: 768px) {
  .hero { padding: 70px 0 76px; }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-copy { text-align: left; }
  .hero-actions { align-items: flex-start; }
  .store-row { justify-content: flex-start; }
}

/* ----------------------------
   Landing: Full viewport layout
---------------------------- */

.page--landing {
  min-height: 100dvh;
  width: 100dvw;
  display: flex;
  flex-direction: column;
}

.page--landing .site-header {
  position: relative;
  top: auto;
}

.page--landing .hero {
  flex: 1 1 auto;
  display: flex;
  padding: 0;
  min-height: 0;
}

.page--landing .hero-inner {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: clamp(18px, 3.2vh, 32px);
  padding: clamp(24px, 4vh, 56px) 0;
}

.page--landing .hero-visual {
  width: min(360px, 42vw, 100%);
}

.page--landing .hero-visual-inner img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-height: 680px) {
  .page--landing .hero { overflow: auto; }
  .page--landing .hero-inner { justify-content: flex-start; padding: 22px 0; }
}

@media (min-width: 768px) {
  .page--landing .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =========================================================
   Apple-like Policy Pages (clean, calm, documentation style)
========================================================= */

.page--policy {
  background: #fff;
}

/* Policy header becomes more Apple: white blur, thin border, subtle */
.site-header--policy {
  background: rgba(255,255,255,0.78);
  color: #111;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(18px);
}

.site-header--policy .logo { color: #111; }
.site-header--policy .header-link {
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  color: #111;
}
.site-header--policy .header-link:hover {
  background: rgba(0,0,0,0.04);
}
.site-header--policy .header-link--active {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.12);
}

/* Top title strip */
.policy-top {
  padding: 34px 0 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0));
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.policy-top-inner {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}

.policy-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 8px;
}

.policy-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  font-weight: 650;
  color: #111;
}

.policy-subtitle {
  margin-top: 10px;
  color: rgba(0,0,0,0.62);
  max-width: 70ch;
}

.policy-meta {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.policy-meta-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
  color: rgba(0,0,0,0.65);
  font-size: 0.9rem;
}

/* Segmented control */
.segmented {
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  overflow: hidden;
  background: rgba(0,0,0,0.02);
}

.segmented-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 0.92rem;
  cursor: pointer;
  color: #111;
  transition: background 0.12s ease;
}
.segmented-btn:hover { background: rgba(0,0,0,0.04); }
.segmented-btn:active { background: rgba(0,0,0,0.06); }
.segmented-btn + .segmented-btn {
  border-left: 1px solid rgba(0,0,0,0.12);
}

.policy-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.policy-hint { font-size: 0.9rem; color: rgba(0,0,0,0.55); }

/* Layout grid */
.policy-shell { padding: 18px 0 52px; }
.policy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Aside */
.policy-aside { display: none; }
.aside-card {
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  padding: 14px;
}
.aside-title {
  font-weight: 600;
  color: rgba(0,0,0,0.70);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.toc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-link {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.68);
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.12s ease, color 0.12s ease;
}
.toc-link:hover {
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.85);
}

/* Cards */
.policy-main { display: flex; flex-direction: column; gap: 12px; }

.p-card {
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.p-card-head {
  width: 100%;
  border: 0;
  background: #fff;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 14px;
}

.p-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: rgba(0,0,0,0.75);
  flex: 0 0 auto;
}

.p-head-text { display: flex; flex-direction: column; gap: 2px; }
.p-title {
  font-weight: 650;
  color: #111;
  font-size: 1.02rem;
}
.p-caption {
  font-size: 0.9rem;
  color: rgba(0,0,0,0.55);
}

.p-chev {
  margin-left: auto;
  color: rgba(0,0,0,0.5);
  transition: transform 0.18s ease;
}

.p-body {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.015);
  padding: 14px;
}

.p-card.is-open .p-body { display: block; }
.p-card.is-open .p-chev { transform: rotate(180deg); }

/* Make body feel like Apple docs: clean text block, selectable */
.p-pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 0.96rem;
  color: rgba(0,0,0,0.78);
  line-height: 1.65;
}

/* bottom back link */
.policy-bottom {
  margin-top: 12px;
  padding: 6px 2px;
}
.policy-back {
  color: rgba(0,0,0,0.70);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Policy footer slightly tighter */
.site-footer--policy {
  background: #fff;
}

/* Desktop: show TOC sidebar */
@media (min-width: 980px) {
  .policy-grid {
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;
  }
  .policy-aside { display: block; position: sticky; top: 92px; height: fit-content; }
}