:root {
  --ink: #152019;
  --ink-soft: #647068;
  --green: #2fc35a;
  --green-dark: #147c37;
  --cream: #fffdf9;
  --line: rgba(30, 48, 37, 0.10);
  --card: rgba(255, 255, 255, 0.82);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream); }

body {
  margin: 0;
  width: 100%;
  height: 100svh;
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.45)),
    url("/assets/onboarding-pattern.jpeg");
  background-size: auto, 370px 800px;
  overflow: hidden;
}

.legal-body { height: auto; min-height: 100svh; overflow: auto; }

a { color: inherit; }

.site-header {
  position: relative;
  z-index: 20;
  height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  grid-column: 2;
  display: block;
  width: clamp(126px, 12vw, 168px);
  height: 66px;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 26px;
  font-size: 14px;
  font-weight: 750;
  color: var(--ink-soft);
}

.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--green-dark); }

.hero {
  width: min(1220px, 100%);
  height: calc(100svh - 92px);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 62px);
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(380px, .92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
}

.mascot-stage {
  position: relative;
  align-self: end;
  height: min(730px, calc(100svh - 112px));
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.mascot-lockup {
  position: absolute;
  width: min(520px, 94%);
  aspect-ratio: 1057 / 1488;
  max-height: 96%;
  left: 50%;
  bottom: -6%;
  transform: translate(-50%, 32%);
  opacity: 0;
  animation: raffi-rise 1.25s cubic-bezier(.18,.88,.2,1.08) .18s forwards;
}

.mascot-video,
.mascot-fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 28px 34px rgba(124, 85, 13, .15));
}

.mascot-video { display: none; }
.mascot-stage.animation-ready .mascot-animation { display: block; }
.mascot-stage.animation-ready .mascot-fallback { display: none; }

.soft-orbit {
  position: absolute;
  z-index: 1;
  left: 48.5%;
  top: 35%;
  border-radius: 50%;
  border: 2px dashed rgba(42, 155, 73, .15);
  animation: slow-spin 34s linear infinite;
}

.orbit-one { width: 94%; aspect-ratio: 1; }
.orbit-two { width: 66%; aspect-ratio: 1; animation-direction: reverse; }

.hero-copy {
  position: relative;
  z-index: 5;
  max-width: 560px;
  text-align: center;
  justify-self: center;
  padding: 32px 0 28px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .17em;
}

h1 {
  margin: 0;
  font-size: clamp(50px, 5.1vw, 76px);
  line-height: .96;
  letter-spacing: -.055em;
  font-weight: 900;
}

h1 span { color: var(--green); }

.press-card {
  position: relative;
  min-height: 178px;
  margin: 28px auto 22px;
  padding: 25px 28px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

.press-quote {
  position: relative;
  margin: 0 auto;
  max-width: 470px;
  min-height: 68px;
  font-size: 20px;
  line-height: 1.36;
  font-weight: 760;
  transition: opacity .24s ease, transform .24s ease;
}

.press-card.changing .press-quote { opacity: 0; transform: translateY(5px); }

.press-dots { display: flex; justify-content: center; gap: 7px; margin-top: 15px; }

.press-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(21, 32, 25, .18);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

.press-dot.active { width: 22px; background: var(--green); }

.app-store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 226px;
  padding: 11px 22px 10px;
  border-radius: 16px;
  color: #fff;
  background: #101311;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(15, 19, 16, .16);
  transition: transform .2s ease, box-shadow .2s ease;
}

.app-store-button:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(15,19,16,.22); }
.app-store-button svg { width: 31px; height: 31px; fill: currentColor; flex: 0 0 auto; }
.app-store-button span { display: grid; }
.app-store-button small { font-size: 11px; line-height: 1; }
.app-store-button strong { margin-top: 2px; font-size: 22px; line-height: 1; letter-spacing: -.02em; }

@keyframes raffi-rise {
  from { transform: translate(-50%, 32%); opacity: 0; }
  to { transform: translate(-50%, 5%); opacity: 1; }
}

@keyframes slow-spin {
  from { transform: translate(-50%, -50%) rotate(0); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.legal-page {
  width: min(940px, calc(100% - 40px));
  margin: 48px auto;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 60px rgba(30,48,37,.08);
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(54px, 8vw, 84px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.legal-brand { display: block; width: 126px; height: 52px; }
.legal-brand img { width: 100%; height: 100%; object-fit: contain; }

.legal-nav { display: flex; align-items: center; gap: 22px; }
.legal-nav a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.legal-nav a:hover,
.legal-nav a.active { color: var(--green-dark); }

.legal-kicker {
  margin: 0 0 14px !important;
  color: var(--green-dark) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.legal-page h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: .98;
  letter-spacing: -.05em;
}

.legal-meta {
  margin: 18px 0 0 !important;
  color: var(--green-dark) !important;
  font-size: 13px;
  font-weight: 800;
}

.legal-lead {
  max-width: 780px;
  margin: 28px 0 0 !important;
  color: var(--ink) !important;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58 !important;
  font-weight: 640;
}

.legal-page section {
  scroll-margin-top: 24px;
  margin-top: 58px;
  padding-top: 6px;
}

.legal-page h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.legal-page h3 {
  margin: 28px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.72;
}

.legal-page ul,
.legal-page ol { padding-left: 24px; }
.legal-page li + li { margin-top: 8px; }
.legal-page a { color: var(--green-dark); text-underline-offset: 3px; }
.legal-page code { padding: 2px 6px; border-radius: 7px; background: rgba(39,88,53,.08); font-size: .92em; }

.legal-callout {
  margin-top: 34px;
  padding: 24px 26px;
  border: 1px solid rgba(47,195,90,.23);
  border-radius: 22px;
  background: rgba(47,195,90,.07);
}

.legal-callout.warning {
  border-color: rgba(234,157,32,.26);
  background: rgba(255,188,64,.09);
}

.legal-callout strong { display: block; color: var(--ink); font-size: 18px; }
.legal-callout p { margin: 8px 0 0; }

.legal-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin-top: 42px;
  padding: 24px 26px;
  border-radius: 22px;
  background: rgba(21,32,25,.035);
}

.legal-toc strong { grid-column: 1 / -1; margin-bottom: 5px; font-size: 15px; }
.legal-toc a { font-size: 13px; font-weight: 720; text-decoration: none; }

.contact-card,
.support-hero {
  padding: 25px 28px;
  border-radius: 24px;
  background: #152019;
  color: #fff;
}

.contact-card strong,
.support-hero strong { font-size: 19px; }
.contact-card p,
.support-hero p { margin: 8px 0; color: rgba(255,255,255,.72); }
.contact-card a { color: #78e395; }

.support-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
}

.support-button {
  flex: 0 0 auto;
  padding: 13px 20px;
  border-radius: 99px;
  background: #fff;
  color: var(--ink) !important;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.help-grid a {
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  text-decoration: none;
}

.help-grid span { display: block; margin-bottom: 14px; color: var(--green); font-size: 12px; font-weight: 900; }
.help-grid strong { font-size: 15px; line-height: 1.25; }

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 720;
}

.legal-footer a { text-decoration: none; }
.legal-footer span { margin-left: auto; color: var(--ink-soft); }

@media (max-width: 660px) {
  .legal-page { width: calc(100% - 20px); margin: 10px auto; padding: 24px 18px 34px; border-radius: 24px; }
  .legal-topbar { gap: 14px; margin-bottom: 48px; padding-bottom: 14px; }
  .legal-brand { width: 96px; height: 44px; }
  .legal-nav { gap: 12px; }
  .legal-nav a { font-size: 11px; }
  .legal-page h1 { font-size: clamp(38px, 12vw, 54px); }
  .legal-lead { font-size: 16px; }
  .legal-page section { margin-top: 46px; }
  .legal-page p, .legal-page li { font-size: 14px; }
  .legal-callout, .legal-toc, .contact-card, .support-hero { padding: 20px; border-radius: 19px; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-toc strong { grid-column: auto; }
  .support-hero { align-items: flex-start; flex-direction: column; }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-footer { align-items: flex-start; flex-direction: column; }
  .legal-footer span { margin-left: 0; }
}

@media (max-width: 860px) {
  .site-header { height: 80px; padding: 0 20px; }
  .brand { width: 120px; height: 58px; }
  .site-nav { gap: 14px; font-size: 12px; }

  .hero {
    position: relative;
    display: block;
    height: calc(100svh - 80px);
    padding: 0 18px;
    overflow: hidden;
  }

  .hero-copy {
    height: 100%;
    max-width: 600px;
    padding: clamp(30px, 4svh, 38px) 0 0;
  }

  .mascot-stage {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 380px;
    min-height: 0;
    pointer-events: none;
  }

  .mascot-lockup {
    width: min(340px, 82vw);
    max-height: none;
    bottom: -18%;
  }

  .press-card { max-width: 560px; }
}

@media (max-width: 560px) {
  .site-header { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; justify-self: start; width: 108px; }
  .site-nav { grid-column: 2; }
  .hero-copy { padding-top: clamp(30px, 4svh, 36px); }
  .eyebrow { margin-bottom: 9px; font-size: 10px; }
  h1 { font-size: clamp(41px, 12vw, 52px); }
  .press-card { min-height: 156px; margin: 19px auto 14px; padding: 18px 18px 14px; }
  .press-quote { min-height: 62px; margin-bottom: 9px; font-size: 17px; line-height: 1.34; }
  .press-dots { margin-top: 11px; }
  .app-store-button { min-width: 214px; padding: 9px 19px 8px; }
  .app-store-button strong { font-size: 20px; }
  .mascot-stage { height: 360px; }
  .mascot-lockup { width: min(320px, 80vw); }
}

@media (max-width: 860px) and (max-height: 720px) {
  .site-header { height: 58px; padding-inline: 14px; }
  .brand { width: 94px; height: 48px; }
  .site-nav { gap: 11px; font-size: 10px; }
  .hero { height: calc(100svh - 58px); padding-inline: 12px; }
  .hero-copy { padding-top: 14px; }
  .eyebrow { margin-bottom: 5px; font-size: 8.5px; }
  h1 { font-size: clamp(34px, 10.8vw, 42px); line-height: .94; }
  .press-card {
    min-height: 132px;
    margin: 12px auto 8px;
    padding: 10px 14px 9px;
  }
  .press-quote { min-height: 54px; margin-bottom: 5px; font-size: 14.5px; line-height: 1.25; }
  .press-dots { gap: 5px; margin-top: 6px; }
  .press-dot { width: 5px; height: 5px; }
  .press-dot.active { width: 16px; }
  .app-store-button { min-width: 190px; gap: 9px; padding: 6px 16px; border-radius: 13px; }
  .app-store-button svg { width: 25px; height: 25px; }
  .app-store-button small { font-size: 9px; }
  .app-store-button strong { font-size: 18px; }
  .mascot-stage { height: 300px; }
  .mascot-lockup { width: 250px; }
}

@media (min-width: 861px) and (max-height: 680px) {
  .site-header { height: 72px; }
  .brand { height: 54px; }
  .hero { height: calc(100svh - 72px); }
  .hero-copy { padding: 12px 0 10px; }
  h1 { font-size: clamp(44px, 4.5vw, 60px); }
  .press-card { min-height: 148px; margin: 16px auto 10px; padding: 16px 22px 13px; }
  .press-quote { min-height: 58px; margin-bottom: 7px; font-size: 17px; }
  .press-dots { margin-top: 9px; }
  .app-store-button { padding-block: 8px; }
  .mascot-stage { height: calc(100svh - 82px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .mascot-video { display: none !important; }
  .mascot-fallback { display: block !important; }
  .mascot-lockup { opacity: 1; transform: translate(-50%, 5%); }
}
