/* REAOS public pages (/pricing, /terms, /privacy, /support, /refunds and the
   HTML error pages). Server-rendered, no JavaScript. They look like the
   landing page: white page, Hanken Grotesk, very large tightly tracked black
   headlines, pill buttons, hairline dividers, the landing nav and footer.
   Colors, type and radii come from app/css/tokens.css (one light set).
   Rules carried over from the app: white on the accent fill only at 19px and
   weight 600 or more, small accent text uses --accent-ink, tap targets are
   44px. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }

body.pub {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.pub main { flex: 1 0 auto; }
:where(.pub) :where(h1, h2, p, dl, dd, ul) { margin: 0; padding: 0; }
:where(.pub) :where(ul) { list-style: none; }
:where(.pub) :where(h1, h2) { text-wrap: balance; }
:where(.pub) :where(p) { text-wrap: pretty; }
:where(.pub) :where(img) { display: block; max-width: 100%; height: auto; }
:where(.pub) :where(a) { color: var(--accent-ink); }
.pub :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.pub ::selection { background: var(--accent-wash); color: #000; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: var(--space-4); padding-right: var(--space-4); }

.skip { position: absolute; left: 12px; top: -60px; z-index: var(--z-overlay); background: #000; color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- nav (as on the landing page) */

.nav { position: sticky; top: 0; z-index: var(--z-tabbar); background: #fff; border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1440px; height: 72px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 80px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-brand { display: flex; align-items: center; min-height: var(--tap); text-decoration: none; }
.nav-brand img { height: 35px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nl { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; text-decoration: none; font-weight: 500; font-size: 1.02rem; color: #000 !important; }
.nl:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------------------------------------------------------------- pills */

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font: 600 0.95rem/1 var(--font); text-decoration: none; cursor: pointer; transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s; }
.pill:active { transform: scale(0.98); }
.pub a.pill-line { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.pub a.pill-line:hover { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s;
}
.pub a.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-accent-label);
  min-height: 56px;
  padding: 0 34px;
}
.pub a.btn-primary:hover { background: var(--accent-pressed); }
.pub a.btn-secondary { background: transparent; color: var(--accent-ink); border-color: var(--accent); min-height: 56px; }
.pub a.btn-secondary:hover { background: var(--accent); color: #fff; }
.pub a.btn-quiet { color: var(--accent-ink); padding: 0 var(--space-3); }
.btn:active { transform: scale(0.98); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------------------------------------------------------------- type */

.h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.055em; }
.h1-hero { font-size: clamp(2.7rem, 6.2vw, 4.9rem); letter-spacing: -0.06em; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.04em; }
.lede { margin-top: 20px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; color: var(--ink-2); max-width: 36em; }
.body { margin-top: var(--space-3); color: var(--ink-2); max-width: 40em; }
.note { margin-top: var(--space-4); font-size: var(--text-md); color: var(--ink-2); max-width: 40em; }
a.inline { text-underline-offset: 3px; }

/* ---------------------------------------------------------------- sections */

.block { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.block.first { padding-top: clamp(40px, 6vw, 72px); }
.block + .block { border-top: 1px solid var(--line); }

.facts { display: grid; gap: 0; margin-top: var(--space-5); }
.fact { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact dt { font-size: var(--text-accent-label); font-weight: 700; letter-spacing: -0.02em; }
.fact dd { margin-top: var(--space-1); color: var(--ink-2); max-width: 34em; }

.plans { margin-top: var(--space-5); border-top: 1px solid var(--line); }
.plan { display: grid; gap: var(--space-2); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.plan-name { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.04em; }
.plan-price { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.05em; }
.per { font-size: var(--text-md); font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.plan-use { color: var(--ink-2); }

.ticks { display: grid; gap: var(--space-2); margin-top: var(--space-4); max-width: 40em; }
.ticks li { position: relative; padding-left: var(--space-5); color: #000; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) translateY(-50%);
}
.ticks + .body,
.ticks + .note { margin-top: var(--space-5); }

.invite { padding-bottom: clamp(40px, 6vw, 72px); }

/* ---------------------------------------------------------------- legal text */

.prose { max-width: 760px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.prose .h1 { margin-bottom: var(--space-2); }
.prose .h2 { margin-top: var(--space-5); margin-bottom: var(--space-2); }
.prose p { margin-top: var(--space-3); color: var(--ink-2); }
.prose ul { margin-top: var(--space-3); padding-left: var(--space-5); list-style: disc; color: var(--ink-2); }
.prose ul li + li { margin-top: var(--space-2); }
.prose .ticks { padding-left: 0; list-style: none; }
.prose .ticks li { color: var(--ink-2); }
.prose .lede { margin-top: var(--space-3); }
.prose .actions { margin-top: var(--space-5); }
.prose .meta { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--ink-2); }
.contact-line { margin-top: var(--space-6) !important; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.draft {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn-ink) !important;
  font-size: var(--text-md);
}

/* ---------------------------------------------------------------- footer (as on the landing page) */

.foot { margin-top: var(--space-6); border-top: 1px solid var(--line); background: #fff; }
.foot-in { display: grid; gap: var(--space-3); padding-top: 40px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.foot-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.foot-brand img { height: 26px; width: auto; }
.foot-sub { font-size: 0.92rem; font-weight: 400; color: var(--ink-2); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.foot-nav a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: underline; text-underline-offset: 4px; color: var(--ink-2); font-size: 0.95rem; }
.foot-nav a:hover { color: #000; }
.foot-mail { font-size: 0.95rem; color: var(--ink-2); }
.foot-mail a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 720px) {
  .wrap { padding-left: var(--space-5); padding-right: var(--space-5); }
  .facts { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
  .fact:nth-child(2) { border-top: 0; padding-top: 0; }
  .plan { grid-template-columns: minmax(220px, 1fr) 2fr; align-items: baseline; column-gap: var(--space-5); }
  .plan-head { justify-content: flex-start; gap: var(--space-5); }
  .plan-head .plan-name { min-width: 5.5rem; }
  .foot-in { grid-template-columns: 1fr auto; align-items: start; }
  .foot-brand { grid-row: 1; }
  .foot-nav { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .foot-mail { grid-column: 1; grid-row: 2; }
}

@media (max-width: 520px) {
  .nav-brand img { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .pill { transition: none; }
  .btn:active, .pill:active { transform: none; }
}
