/* Jotholm — standalone site styles. Self-contained, no external dependencies.
 * Dark mode follows prefers-color-scheme.
 */

:root {
  /* surfaces */
  --canvas: #faf6ef;
  --canvas-dot: #e5ddcf;
  --surface: #ffffff;
  --ink: #3d3a34;
  --ink-soft: #736d61;
  --ink-faint: #c2bbac;
  /* --edge: boundary color for outlined controls (ghost button). Meets WCAG 1.4.11
     non-text contrast (>=3:1) against BOTH --surface and --canvas — which --ink-faint
     (1.9:1) did not, leaving the ghost button's only visible boundary sub-threshold.
     Keep --ink-faint for purely decorative hairlines that aren't control boundaries. */
  --edge: #8f8676;

  /* sticker palette */
  --c-sun: #ffe28a;
  --c-peach: #ffd0b0;
  --c-rose: #ffc2cc;
  --c-lavender: #d8ccf4;
  --c-sky: #bfdcf8;
  --c-mint: #c2eedd;

  /* brand accent (mirrors the app --accent / legal pages): the default for any
     --accent consumer that isn't given a per-element sticker tint inline. */
  --accent: #6b5bd2;
  --accent-ink: #5a4bc0;
  /* text on the --accent-filled pill badge; per-theme so contrast holds when
     --accent flips to a light lavender in dark mode (WCAG 2.1 AA 4.5:1). */
  --badge-ink: #ffffff;

  /* ink on colored cards */
  --card-ink: rgb(0 0 0 / 0.78);
  --card-ink-faint: rgb(0 0 0 / 0.3);

  --radius-card: 16px;
  --radius-ui: 12px;
  --shadow-card: 0 1px 2px rgb(61 58 52 / 0.08), 0 6px 16px rgb(61 58 52 / 0.1);
  --shadow-pop: 0 2px 6px rgb(61 58 52 / 0.12), 0 12px 32px rgb(61 58 52 / 0.18);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #2a2723;
    --canvas-dot: #3b372f;
    --surface: #38342d;
    --ink: #ece7dc;
    --ink-soft: #a89f8f;
    --ink-faint: #5c564b;
    /* dark --edge: 3.6:1 on --surface, 4.3:1 on --canvas (see light note). */
    --edge: #928a77;

    --c-sun: #8a7a3e;
    --c-peach: #8a6248;
    --c-rose: #8a5560;
    --c-lavender: #665b85;
    --c-sky: #4c6a88;
    --c-mint: #467663;

    --accent: #b9aef0;
    --accent-ink: #cfc6f6;
    /* dark plum ink on the light-lavender badge → ~7.3:1 (white would be ~2:1). */
    --badge-ink: #2a2340;

    --card-ink: rgb(255 252 245 / 0.92);
    --card-ink-faint: rgb(255 252 245 / 0.35);

    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 16px rgb(0 0 0 / 0.35);
    --shadow-pop: 0 2px 6px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.5);

    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Skip-to-content link (WCAG 2.4.1): visually hidden until keyboard-focused. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-ui);
  background: var(--surface);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-pop);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
}

/* Baseline keyboard focus ring for any interactive element that lacks a more
   specific one (links in prose/footer, the skip link, etc.). */
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--canvas);
  background-image: radial-gradient(var(--canvas-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  font:
    16px/1.55 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ---- wordmark ---- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark .mark {
  width: 1.05em;
  height: 1.05em;
  display: inline-block;
}
.wordmark.sm {
  font-size: 16px;
}

/* ---- buttons / links ---- */
.primary,
.ghost,
.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-ui);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.primary {
  border: none;
  background: var(--ink);
  color: var(--canvas);
  padding: 10px 16px;
  min-height: 44px;
  box-shadow: var(--shadow-card);
}
.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}
.ghost {
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  min-height: 44px;
}
.ghost:hover {
  border-color: var(--ink-soft);
  transform: translateY(-1px);
}
.lg {
  font-size: 16px;
  padding: 13px 22px;
}
.link {
  border: none;
  background: none;
  color: var(--ink);
  padding: 10px 8px;
  min-height: 44px;
}
.link:hover {
  color: var(--ink-soft);
  text-decoration: underline;
}
.primary:focus-visible,
.ghost:focus-visible,
.link:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid var(--ink-soft);
  outline-offset: 2px;
}

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 5vw, 48px);
  padding-top: calc(14px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--canvas-dot);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 48px);
}

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.lede {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 32em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.reassure {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---- hero visual (synthetic sticker board) ---- */
.hero-visual {
  display: flex;
  justify-content: center;
}
.board-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
  background-image: radial-gradient(var(--canvas-dot) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  overflow: hidden;
}
.hero-sticker {
  position: absolute;
  width: 38%;
  aspect-ratio: 1;
  padding: 12px;
  background: var(--tint);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--rot));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--card-ink);
}
.sticker-lines {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--card-ink-faint);
  box-shadow:
    0 9px 0 var(--card-ink-faint),
    0 18px 0 var(--card-ink-faint);
  width: 80%;
}
.sticker-label {
  font-weight: 800;
  font-size: 14px;
}
.s0 {
  top: 8%;
  left: 6%;
}
.s1 {
  top: 14%;
  right: 8%;
}
.s2 {
  bottom: 10%;
  left: 12%;
}
.s3 {
  bottom: 14%;
  right: 10%;
}
.cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 2px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}
.cursor-a {
  top: 38%;
  left: 44%;
  background: var(--c-lavender);
}
.cursor-b {
  top: 60%;
  left: 30%;
  background: var(--c-peach);
}

/* ---- section heading ---- */
.section-h {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  text-align: center;
}

/* ---- value props ---- */
.values {
  padding: clamp(24px, 4vw, 48px) 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card .swatch {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---- how it works ---- */
.how {
  padding: clamp(24px, 4vw, 48px) 0;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-n {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  /* >=19px bold clears the WCAG large-text threshold (18.66px bold), so the
     card-ink numeral on the dark --c-sun chip (3.8:1) meets the 3:1 large-text
     bar rather than the 4.5:1 small-text bar it was missing in dark mode. */
  font-size: 19px;
  background: var(--c-sun);
  color: var(--card-ink);
}
.step h3 {
  margin: 4px 0 6px;
  font-size: 17px;
}
.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---- pricing ---- */
.pricing {
  padding: clamp(24px, 4vw, 48px) 0;
}
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.plan.featured {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
/* "Best for groups" badge on the featured (Pro) plan. */
.plan-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--badge-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
}
.plan-price {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.plan-price span {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.plan-blurb {
  margin: 6px 0 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.plan ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 14.5px;
}
.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plan li .tick {
  flex: none;
  color: #2e7d5b;
  font-weight: 800;
}
@media (prefers-color-scheme: dark) {
  .plan li .tick {
    color: #7ec7a6;
  }
}
.plan .cta-row {
  margin-top: auto;
}

/* ---- closer ---- */
.closer {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.closer h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.closer > p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 16px;
}
.pricing-teaser {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--canvas-dot);
  margin-top: 24px;
  padding: 28px clamp(16px, 5vw, 48px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.copyright {
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---- legal / prose pages ---- */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 5vw, 48px) 64px;
}
.prose .eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.prose h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.prose .updated {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 32px;
}
.prose h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
}
.prose h3 {
  font-size: 16px;
  margin: 24px 0 6px;
}
.prose p,
.prose li {
  color: var(--ink);
  line-height: 1.65;
}
.prose p {
  margin: 0 0 14px;
}
.prose ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.prose li {
  margin: 0 0 6px;
}
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose .note {
  background: var(--surface);
  border: 1px solid var(--canvas-dot);
  border-radius: var(--radius-ui);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.prose .backlink {
  display: inline-block;
  margin-top: 40px;
  font-weight: 700;
  text-decoration: none;
}
.prose .backlink:hover {
  text-decoration: underline;
}

/* ---- centered minimal page (404) ---- */
.center {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
}
.center h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 0.5rem;
}
.center p {
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: clamp(28px, 8vw, 48px);
  }
  .hero-visual {
    order: -1;
  }
  .board-frame {
    max-width: 360px;
  }
  .cards,
  .steps,
  .plans {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .topbar .primary {
    padding: 10px 12px;
    font-size: 14px;
  }
  .hero-cta .primary,
  .hero-cta .ghost {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .primary,
  .ghost,
  .link {
    transition: none;
  }
  .primary:hover,
  .ghost:hover {
    transform: none;
  }
}
