/* Freehold Software — one stylesheet, no framework, no web fonts.
   System font stacks keep the privacy promise honest: nothing loads from a
   third party unless the visitor has agreed to it. */

:root {
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --surface-2: #efeadc;
  --ink: #1b2420;
  --ink-soft: #4b5650;
  --ink-faint: #6d766f;
  --line: #ddd6c4;
  --brand: #1f4d3a;
  --brand-strong: #163a2b;
  --brand-ink: #fdfbf4;
  --accent: #b7791f;
  --live: #2f7a4f;
  --focus: #b7791f;
  --shadow: 0 1px 2px rgb(27 36 32 / 6%), 0 4px 16px rgb(27 36 32 / 5%);

  --icon-bg-l: 92%;
  --icon-bg-s: 60%;
  --icon-fg-l: 30%;
  --icon-fg-s: 55%;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --gutter: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613;
    --surface: #18201b;
    --surface-2: #1e2722;
    --ink: #ebe7dc;
    --ink-soft: #b2b9b0;
    --ink-faint: #8e978f;
    --line: #2d3731;
    --brand: #7cc4a0;
    --brand-strong: #9dd6b9;
    --brand-ink: #0e1712;
    --accent: #e3a94f;
    --live: #7cc4a0;
    --focus: #e3a94f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --icon-bg-l: 22%;
    --icon-bg-s: 30%;
    --icon-fg-l: 78%;
    --icon-fg-s: 65%;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111613;
  --surface: #18201b;
  --surface-2: #1e2722;
  --ink: #ebe7dc;
  --ink-soft: #b2b9b0;
  --ink-faint: #8e978f;
  --line: #2d3731;
  --brand: #7cc4a0;
  --brand-strong: #9dd6b9;
  --brand-ink: #0e1712;
  --accent: #e3a94f;
  --live: #7cc4a0;
  --focus: #e3a94f;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%);
  --icon-bg-l: 22%;
  --icon-bg-s: 30%;
  --icon-fg-l: 78%;
  --icon-fg-s: 65%;
  color-scheme: dark;
}

/* ───────────────────────────────────────────── base ── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-strong); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.fine { font-size: 0.875rem; color: var(--ink-faint); }

/* ───────────────────────────────────────────── header ── */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(1.2) blur(8px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.mark { width: 30px; height: 30px; flex: none; }
.mark-bg { fill: var(--brand); }
.mark-f { fill: none; stroke: var(--brand-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mark-dot { fill: var(--accent); }

.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (max-width: 420px) {
  .brand span { font-size: 1rem; }
  .nav a { padding: 8px 7px; font-size: 0.9rem; }
}
/* Below ~380px the name and three links cannot share a row. The mark still
   links home, and every page's heading names the site straight after. */
@media (max-width: 380px) {
  .site-header .brand span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ───────────────────────────────────────────── buttons ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 999px;
  font: 600 0.98rem/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-block { width: 100%; }

.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--brand);
  text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* ───────────────────────────────────────────── hero ── */

.hero { padding: 56px 0 40px; }
.hero-compact { padding: 44px 0 16px; }
.hero .lede { font-size: clamp(1.08rem, 2.4vw, 1.3rem); color: var(--ink-soft); max-width: 44em; }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.lede-sm { font-size: 1.1rem; color: var(--ink-soft); }

/* ───────────────────────────────────────────── bands ── */

.band { background: var(--surface); border-block: 1px solid var(--line); padding: 48px 0; margin: 32px 0; }
.band-quiet { background: var(--surface-2); }
.section-lede { color: var(--ink-soft); max-width: 44em; }

.promise {
  display: grid; gap: 28px; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.promise h3 { font-size: 1.25rem; }
.promise li { border-top: 3px solid var(--accent); padding-top: 16px; }
.promise p { color: var(--ink-soft); margin: 0; }

/* ───────────────────────────────────────────── directory ── */

.category { padding: 32px 0 8px; }
.category-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 16px; }
.category-head h2 { margin: 0; }
.category-head p { margin: 0; color: var(--ink-faint); }

.app-grid {
  display: grid; gap: 14px; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}

.app-card {
  display: flex; gap: 16px; height: 100%;
  padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.app-card:hover { color: var(--ink); border-color: hsl(var(--hue, 150) 40% 55%); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .app-card:hover { transform: none; } }

.app-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.app-card-name { font-family: var(--serif); font-size: 1.15rem; }
.app-card-platform { font-size: 0.85rem; color: var(--ink-faint); }
.app-card-summary { color: var(--ink-soft); font-size: 0.95rem; }
.app-card-price { margin-top: auto; padding-top: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }

.app-icon {
  flex: none; display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: hsl(var(--hue) var(--icon-bg-s) var(--icon-bg-l));
  color: hsl(var(--hue) var(--icon-fg-s) var(--icon-fg-l));
  font: 700 1.05rem/1 var(--serif); letter-spacing: -0.02em;
  border: 1px solid hsl(var(--hue) 40% 50% / 25%);
}
.app-icon-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 1.4rem; }
.app-icon-sm { width: 30px; height: 30px; border-radius: 8px; font-size: 0.8rem; }

.badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
  color: var(--ink-faint); border: 1px solid var(--line);
}
.badge-live { color: var(--live); border-color: currentColor; }

/* ───────────────────────────────────────────── product ── */

.crumbs { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }

.product-title { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.product-title h1 { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.chips li {
  font-size: 0.85rem; padding: 4px 12px; border-radius: 999px;
  background: hsl(var(--hue) var(--icon-bg-s) var(--icon-bg-l));
  color: hsl(var(--hue) var(--icon-fg-s) var(--icon-fg-l));
}

.status-note { margin-top: 14px; font-size: 0.92rem; color: var(--ink-faint); }

/* Product pages keep the wide container so text lines up with the hero and
   the plans; each block is capped at a readable measure instead. */
.prose > * { max-width: 760px; }
.prose section { padding: 28px 0 4px; }
.prose h2 { margin-top: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1rem/1 var(--serif);
  background: hsl(var(--hue) var(--icon-bg-s) var(--icon-bg-l));
  color: hsl(var(--hue) var(--icon-fg-s) var(--icon-fg-l));
}
.steps h3 { margin: 4px 0 2px; }
.steps p { margin: 0; color: var(--ink-soft); }

.ticks, .limits, .notes, .plain { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.ticks li, .limits li, .notes li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em;
  width: 13px; height: 7px; border: solid var(--live); border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg);
}
.limits li { color: var(--ink-soft); }
.limits li::before {
  content: ""; position: absolute; left: 3px; top: 0.75em; width: 12px; height: 2.5px; background: var(--ink-faint);
}
.notes li::before {
  content: ""; position: absolute; left: 4px; top: 0.55em; width: 9px; height: 9px;
  border-radius: 50%; border: 2.5px solid var(--accent);
}
.plain li { padding-left: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

.product-foot { margin-top: 40px; padding-bottom: 24px; }

/* ───────────────────────────────────────────── plans ── */

.plans { display: grid; gap: 16px; margin-top: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .plans-1 { max-width: 380px; }
  .plans-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
  .plans-3, .plans-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .plans-4 { grid-template-columns: repeat(4, 1fr); }
}

.plan {
  display: flex; flex-direction: column;
  padding: 24px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
}
.plan-featured { border: 2px solid hsl(var(--hue) 45% 45%); }
.plan h3 { font-size: 1.35rem; margin-bottom: 2px; }
.plan-for { color: var(--ink-faint); font-size: 0.92rem; margin-bottom: 12px; }
.plan-price { margin: 0; }
.plan-price .amount { font: 600 2.1rem/1 var(--serif); }
.plan-price .per { color: var(--ink-faint); margin-left: 2px; }
.plan-alt { font-size: 0.88rem; color: var(--ink-faint); margin: 6px 0 16px; }
.plan .ticks, .plan .limits { font-size: 0.95rem; }
.plan > .btn, .plan-buy { margin-top: auto; }
.plan-buy { display: grid; gap: 8px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plan-list span { display: inline-block; min-width: 5.5em; font-weight: 600; color: var(--ink); }
@media (max-width: 680px) {
  .price-table td[data-label="Paid plans"] { display: block; }
  .price-table td[data-label="Paid plans"]::before { display: block; margin-bottom: 4px; }
}
.limits-h { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 4px 0 8px; }

/* ───────────────────────────────────────────── waitlist ── */

.waitlist {
  margin-top: 36px; padding: 28px !important; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.waitlist label { display: block; font-weight: 600; margin-bottom: 6px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input {
  flex: 1 1 220px; min-height: 46px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 999px;
}
.field-row input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.form-status { margin: 10px 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.waitlist.is-highlighted { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow 0.3s; }

/* ───────────────────────────────────────────── pricing ── */

.tier-explainer {
  display: grid; gap: 20px; list-style: none; margin: 8px 0 32px; padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.tier-explainer h2 { font-size: 1.3rem; margin-bottom: 4px; }
.tier-explainer p { color: var(--ink-soft); margin: 0; }

.price-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.price-table th, .price-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.price-table thead th { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.price-table tbody th a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.price-table tbody th a:hover span { text-decoration: underline; }
.price-table td { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

@media (max-width: 680px) {
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: 100%; }
  .price-table tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 12px; background: var(--surface); }
  .price-table th, .price-table td { border: 0; padding: 6px 0; }
  .price-table td { display: flex; justify-content: space-between; gap: 16px; }
  .price-table td::before { content: attr(data-label); color: var(--ink-faint); font-weight: 600; }
}

/* ───────────────────────────────────────────── footer ── */

.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 40px 0 24px; background: var(--surface); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid .fine { margin-top: 10px; max-width: 30ch; }
.footer-h { font: 700 0.8rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a, .footer-links .linklike { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover, .footer-links .linklike:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-bottom .fine { margin: 0 0 4px; }

/* ───────────────────────────────────────────── consent ── */

.consent {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 20;
  max-width: 560px; margin: 0 auto; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgb(0 0 0 / 18%);
}
.consent p { margin: 0 0 12px; font-size: 0.95rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent[hidden] { display: none; }
