/* Public site styles. Brand per ADR-008: the mobile template (ivory, plum, coral; Fraunces headings,
   Inter text). Colour, radius, spacing and shadow values equal packages/contract/src/tokens.ts. */
/* Fraunces 72pt SemiBold and Inter Regular/SemiBold (OFL-1.1, fonts/OFL.txt), copied from the old
   app's mobile-apps/assets/fonts. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/fraunces-72pt-semibold.ttf) format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-regular.otf) format('opentype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/inter-semibold.otf) format('opentype');
}

:root {
  color-scheme: light;
  /* tokens.color.light */
  --bg: #fffef9;
  --surface: #ffffff;
  --surface-accent: #fdf2f0;
  --border: rgba(74, 55, 40, 0.12);
  --text: #4a3728;
  --muted: #5c4636;
  --primary: #4a3728;
  --on-primary: #fffef9;
  --accent: #e8998d;
  --on-accent: #4a3728;
  --accent-strong: #803828;
  --focus: #803828;
  --warning: #92400e;
  --warning-soft: #fffbeb;
  /* tokens.radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;
  /* tokens.spacing */
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --space-5xl: 48px;
  /* tokens.shadow, as box-shadow */
  --shadow-sm: 0 1px 3px rgb(74 55 40 / 5%);
  --shadow-md: 0 2px 8px rgb(74 55 40 / 8%);
  --shadow-lg: 0 4px 16px rgb(74 55 40 / 12%);
  /* tokens.minTarget */
  --min-target: 48px;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:
    'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --page: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
}
button {
  font: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skipLink {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 14px;
  font-weight: 600;
}
.skipLink:focus {
  transform: translateY(0);
}

/* Header */
.siteHeader {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgb(255 254 249 / 92%);
  backdrop-filter: blur(14px);
}
.siteHeaderInner {
  width: var(--page);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}
.siteLogo {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-target);
}
.siteLogo img {
  display: block;
  width: auto;
  height: 36px;
}
.siteNav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  font-size: 15px;
  font-weight: 600;
}
.siteNav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-target);
  text-decoration: none;
}
.siteNav a:not(.button):hover {
  color: var(--accent-strong);
}
.siteNav .langSwitch {
  min-width: var(--min-target);
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-md);
}

/* Buttons */
.button,
.buttonSecondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--min-target);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-2xl);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.button {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-md);
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.buttonSecondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.buttonSecondary:hover {
  border-color: var(--accent);
}
.storeButtons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.storeButton {
  min-width: 190px;
  min-height: 56px;
  justify-content: flex-start;
  padding: 0 var(--space-xl);
}
.storeButton svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.storeButton span {
  display: grid;
  line-height: 1.2;
  text-align: left;
}
.storeButton small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.storeButton strong {
  font-size: 17px;
}

/* Shared section rhythm */
.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) 0 0;
  scroll-margin-top: 72px;
}
.sectionHeading {
  max-width: 720px;
  margin-bottom: var(--space-4xl);
}
.sectionHeading h2 {
  margin: var(--space-md) 0 var(--space-lg);
  font-size: clamp(32px, 4.4vw, 48px);
}
.sectionHeading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

/* Hero */
.hero {
  width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(48px, 8vw, 96px) 0 0;
}
.hero h1 {
  margin: var(--space-lg) 0 var(--space-2xl);
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.05;
  text-wrap: balance;
}
.hero h1 em {
  display: block;
  color: var(--accent-strong);
  font-style: normal;
}
.heroLead {
  max-width: 580px;
  margin: 0 0 var(--space-3xl);
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 20px);
}
.heroNote {
  margin: var(--space-lg) 0 0;
  color: var(--muted);
  font-size: 14px;
}
/* Brand mark with the four instruments the surveys use; illustrative, not an app screen. */
.heroVisual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}
.heroVisual::before {
  content: '';
  position: absolute;
  width: min(400px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-accent);
  box-shadow: inset 0 0 0 2px rgb(232 153 141 / 45%);
}
.heroMark {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-3xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.heroChips {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.heroChips li {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm) var(--space-lg);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.heroChips li:nth-child(1) {
  top: 8%;
  left: 6%;
}
.heroChips li:nth-child(2) {
  top: 18%;
  right: 2%;
}
.heroChips li:nth-child(3) {
  bottom: 18%;
  left: 0;
}
.heroChips li:nth-child(4) {
  bottom: 6%;
  right: 8%;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--accent);
  padding-top: var(--space-2xl);
}
.steps li::before {
  content: '0' counter(step);
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 28px;
}
.steps h3 {
  margin: var(--space-md) 0 var(--space-sm);
  font-size: 24px;
}
.steps p {
  margin: 0;
  color: var(--muted);
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3xl);
}
.card h3 {
  margin: 0 0 var(--space-md);
  font-size: 22px;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.cardAccent {
  background: var(--surface-accent);
}

/* Manifesto band */
.band {
  width: var(--page);
  margin: clamp(56px, 9vw, 112px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4xl);
  border-radius: var(--radius-3xl);
  background: var(--primary);
  color: var(--on-primary);
  padding: clamp(32px, 6vw, 72px);
}
.band .eyebrow {
  color: var(--accent);
}
.band h2 {
  margin: var(--space-md) 0 0;
  font-size: clamp(30px, 4vw, 44px);
}
.band p:not(.eyebrow) {
  margin: 0 0 var(--space-lg);
  font-size: 18px;
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3xl);
}
.planFeatured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}
.plan h3 {
  margin: 0;
  font-size: 26px;
}
.planPrice {
  margin: var(--space-md) 0 var(--space-xl);
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.1;
}
.planPrice small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 16px;
}
.plan ul {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}
.plan li {
  position: relative;
  padding-left: 28px;
}
.plan li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid var(--accent-strong);
  border-left: 2px solid var(--accent-strong);
  transform: rotate(-45deg);
}
.finePrint {
  max-width: 820px;
  margin: var(--space-2xl) 0 0;
  color: var(--muted);
  font-size: 14px;
}
.finePrint a,
.prose a:not(.button):not(.buttonSecondary),
.inlineLink {
  color: var(--accent-strong);
  font-weight: 600;
}

/* Download CTA */
.download {
  width: var(--page);
  margin: clamp(56px, 9vw, 112px) auto 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4xl);
  border-radius: var(--radius-3xl);
  background: var(--surface-accent);
  padding: clamp(32px, 6vw, 64px);
  scroll-margin-top: 72px;
}
.download img {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}
.download h2 {
  margin: var(--space-sm) 0 var(--space-md);
  font-size: clamp(28px, 3.6vw, 40px);
}
.download p:not(.eyebrow) {
  margin: 0 0 var(--space-2xl);
  color: var(--muted);
}

/* Footer */
.siteFooter {
  width: var(--page);
  margin: clamp(56px, 9vw, 112px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3xl);
  border-top: 1px solid var(--border);
  padding: var(--space-4xl) 0;
  color: var(--muted);
  font-size: 14px;
}
.siteFooter img {
  display: block;
  width: auto;
  height: 32px;
  margin-bottom: var(--space-md);
}
.siteFooter p {
  max-width: 420px;
  margin: 0 0 var(--space-sm);
}
.siteFooter nav ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0 var(--space-3xl);
  margin: 0;
  padding: 0;
  list-style: none;
}
.siteFooter nav a,
.siteFooter .footerMail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.siteFooter nav a:hover,
.siteFooter .footerMail:hover {
  color: var(--accent-strong);
}

/* Legal and support pages */
.prose {
  width: min(820px, calc(100% - 40px));
  margin: clamp(32px, 6vw, 72px) auto 0;
}
.prose h1 {
  margin: 0 0 var(--space-md);
  font-size: clamp(34px, 5vw, 52px);
}
.prose h2 {
  margin: var(--space-5xl) 0 var(--space-md);
  font-size: 26px;
}
.prose h3 {
  margin: var(--space-3xl) 0 var(--space-sm);
  font-size: 20px;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose li + li {
  margin-top: var(--space-sm);
}
.prose strong {
  color: var(--text);
}
.lead {
  font-size: 19px;
}
.updated {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.panel {
  margin: var(--space-2xl) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: var(--space-2xl) var(--space-3xl);
}
.panel > :first-child {
  margin-top: 0;
}
.panel > :last-child {
  margin-bottom: 0;
}
.panelAccent {
  background: var(--surface-accent);
}
.panelWarning {
  border-color: rgb(146 64 14 / 30%);
  background: var(--warning-soft);
}
.panelWarning h2,
.panelWarning p,
.panelWarning strong {
  color: var(--warning);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-sm);
  text-align: left;
  vertical-align: top;
}
.prose th {
  color: var(--text);
}
.prose td {
  color: var(--muted);
}
.tableScroll {
  overflow-x: auto;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: list-item;
  padding: var(--space-lg) 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.faq summary::marker {
  color: var(--accent-strong);
}
.faq details p {
  margin: 0 0 var(--space-lg);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

/* Invite landing */
.invite {
  width: min(640px, calc(100% - 40px));
  margin: clamp(32px, 7vw, 80px) auto 0;
  text-align: center;
}
.invite > img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}
.invite h1 {
  margin: var(--space-2xl) 0 var(--space-md);
  font-size: clamp(32px, 6vw, 48px);
}
.invite > p {
  color: var(--muted);
  font-size: 18px;
}
.inviteCode {
  margin: var(--space-3xl) 0;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-xl);
  background: var(--surface-accent);
  padding: var(--space-2xl);
}
.inviteCode p {
  margin: 0;
  color: var(--muted);
}
.inviteCode output {
  display: block;
  margin: var(--space-sm) 0 var(--space-lg);
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}
.invite .storeButtons,
.invite .actions {
  justify-content: center;
}
.inviteSteps {
  margin: var(--space-4xl) 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: step;
}
.inviteSteps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 var(--space-lg) 44px;
  color: var(--muted);
}
.inviteSteps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
}
[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .heroVisual {
    min-height: 360px;
  }
  .cards,
  .plans {
    grid-template-columns: 1fr;
  }
  .plans {
    max-width: 520px;
  }
  .band {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}
@media (max-width: 760px) {
  .siteNav a:not(.langSwitch):not(.button) {
    display: none;
  }
  .siteNav {
    gap: var(--space-sm);
  }
  .siteNav .button {
    padding: 0 var(--space-lg);
  }
  .siteLogo img {
    height: 30px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .download {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .siteFooter {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: var(--space-xl);
  }
}
@media (max-width: 430px) {
  .storeButtons,
  .storeButton {
    width: 100%;
  }
  .heroChips li {
    font-size: 13px;
  }
  .heroVisual {
    min-height: 320px;
  }
  .heroMark {
    width: 150px;
    height: 150px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .buttonSecondary {
    transition: none;
  }
  .button:hover {
    transform: none;
  }
}
