/* Halftint — halftint.com
   Brand tokens from marketing/brand.md. A painter's site: quiet, warm,
   generous whitespace, one cadmium note per view. Mobile-first, no JS. */

/* ---------- tokens ---------- */

:root {
  /* pigment-named palette, light (toned-canvas) mode */
  --ground: #f6f3ec;      /* titanium white, lean umber wash */
  --ground-raised: #fbf9f4;
  --ink: #37302a;         /* raw umber masstone */
  --ink-soft: #6e6257;    /* raw umber tint */
  --accent: #d9472b;      /* cadmium red light */
  --accent-fill: #c93d22; /* filled buttons — AA with --on-accent */
  --on-accent: #ffffff;
  --accent-ink: #b93a22;  /* accent darkened for text-size use */
  --cool: #3d4e9e;        /* french ultramarine, one step tinted */
  --earth: #c08a3e;       /* yellow ochre */
  --leaf: #46705f;        /* viridian tint, darkened for text-size use (matches the app) */
  --line: #ddd6c9;        /* umber wash hairline */
  --shot-bg: #211d18;     /* app chrome behind screenshots — the app's own dark ground */
  --earth-ink: #8f621e;   /* ochre darkened for AA text-size use (matches the app) */
  --scroll-shadow: rgba(55, 48, 42, 0.28);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --measure: 66ch;
  --container: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* easel-lamp mode: umber-black ground */
    --ground: #211d18;
    --ground-raised: #292420;
    --ink: #efeae0;
    --ink-soft: #a79b8d;
    --accent: #e25a3e;
    --accent-fill: #e25a3e;
    --on-accent: #231511; /* dark ink on bright cadmium — AA */
    --accent-ink: #e8785f;
    --cool: #7c8cd6;
    --earth: #d6a45e;
    --earth-ink: #d6a45e;
    --leaf: #7fae9c;
    --line: #3a342c;
    --scroll-shadow: rgba(0, 0, 0, 0.55);
  }
}

/* ---------- reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.17rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }

p, li { max-width: var(--measure); }

a { color: var(--cool); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-ink); }

strong { font-weight: 600; }
em { font-style: italic; }

::selection { background: color-mix(in srgb, var(--earth) 30%, transparent); }

/* ---------- layout primitives ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { padding-block: clamp(3.25rem, 9vw, 6.5rem); }

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.9rem;
}

.lede { font-size: 1.125rem; color: var(--ink-soft); }

.rule { border: 0; border-top: 1px solid var(--line); }

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

.btn {
  display: inline-block;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8em 1.5em;
  border-radius: 0.45rem;
  transition: background 120ms ease;
}
.btn:hover { background: var(--accent-ink); color: var(--on-accent); }

.btn-small { padding: 0.5em 1em; font-size: 0.9rem; }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-quiet:hover { background: var(--ground-raised); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-soft); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}

.site-nav {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand img { height: 1.75rem; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3vw, 1.75rem);
}

.nav-links > a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links > a:not(.btn):hover { color: var(--accent-ink); }
.nav-links > a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

@media (max-width: 26rem) {
  .brand img { height: 1.5rem; }
  .btn-small { padding: 0.45em 0.75em; font-size: 0.85rem; }
}

/* Messy-handed taps: every nav/footer link a real target, no double-tap zoom. */
a, button, summary { touch-action: manipulation; }
@media (pointer: coarse) {
  .nav-links > a:not(.btn),
  .footer-links a { padding-block: 0.6em; }
  .brand { padding-block: 0.35rem; }
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem); }

.hero h1 { max-width: 21ch; }

.hero .lede {
  margin-top: 1.4rem;
  max-width: 58ch;
  font-size: clamp(1.08rem, 1.7vw, 1.2rem);
}

.hero-ctas {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.hero-note { font-size: 0.9rem; color: var(--ink-soft); }

.hero .shot { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ---------- screenshots ---------- */

.shot { margin: 0; }

.shot-frame {
  background: var(--shot-bg);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(30 24 18 / 0.06), 0 12px 32px -12px rgb(30 24 18 / 0.18);
}

.shot img { width: 100%; }

.shot figcaption {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- feature blocks ---------- */

.feature { border-top: 1px solid var(--line); }

.feature-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.feature-copy > p + p { margin-top: 1rem; }
.feature-copy h2 { margin-bottom: 1.1rem; max-width: 24ch; }

.feature-fine {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .feature-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .feature-grid.flip .feature-copy { order: 2; }
  .feature-grid.flip .shot { order: 1; }
}

/* ---------- honest-by-design ---------- */

.honest {
  border-top: 1px solid var(--line);
  background: var(--ground-raised);
}

.honest h2 { max-width: 26ch; margin-bottom: 1.1rem; }

.honest-list {
  list-style: none;
  padding: 0;
  margin-top: 1.75rem;
  display: grid;
  gap: 1.25rem;
}

.honest-list li {
  border-left: 3px solid var(--earth);
  padding-left: 1.1rem;
}

.honest-shots {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 56rem) {
  .honest-shots { grid-template-columns: 1fr 1fr; align-items: start; }
}

.honest .more-link { margin-top: 2rem; font-weight: 500; }

/* ---------- steps strip ---------- */

.steps h2 { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.steps-grid {
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}

.step { counter-increment: step; }

.step h3::before {
  content: counter(step);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 0.4rem;
}

.step p { margin-top: 0.5rem; color: var(--ink-soft); }

@media (min-width: 48rem) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* ---------- pricing ---------- */

.pricing-cards {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 52rem) {
  .pricing-cards { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.price-card {
  background: var(--ground-raised);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
}

.price-card.pro { border-color: var(--earth); border-width: 1.5px; }

.price-card .tier {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.price-card h3 { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -0.01em; }

.price {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}
.price small { font-family: var(--sans); font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); }

.pro-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--earth-ink);
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 0.15em 0.7em;
  vertical-align: middle;
}

.price-card .tagline { margin-top: 0.35rem; color: var(--ink-soft); font-size: 0.95rem; }

.tick-list {
  list-style: none;
  padding: 0;
  margin-block: 1.25rem;
  display: grid;
  gap: 0.55rem;
  font-size: 0.97rem;
}

.tick-list li { padding-left: 1.5rem; position: relative; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.52em;
  width: 0.55em;
  height: 0.3em;
  border-left: 2px solid var(--leaf);
  border-bottom: 2px solid var(--leaf);
  transform: rotate(-45deg);
}

.under-card {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* comparison table */

.table-scroll {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  /* scroll cue: edge shadows that fade out when the end is reached */
  background:
    linear-gradient(90deg, var(--ground-raised) 40%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(270deg, var(--ground-raised) 40%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(90deg, var(--scroll-shadow), transparent) left / 18px 100% no-repeat scroll,
    linear-gradient(270deg, var(--scroll-shadow), transparent) right / 18px 100% no-repeat scroll,
    var(--ground-raised);
}

table.compare {
  border-collapse: collapse;
  width: 100%;
  min-width: 38rem;
  font-size: 0.95rem;
}

.compare th, .compare td {
  text-align: left;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th { border-top: 0; font-weight: 600; padding-block: 0.9rem; }
.compare thead th:not(:first-child), .compare td:not(:first-child) { width: 26%; }
.compare td:first-child { color: var(--ink-soft); }
.compare .yes { color: var(--leaf); font-weight: 500; }
.compare .pro-cell { font-weight: 600; }
.compare .dash { color: var(--line); }

/* ---------- FAQ ---------- */

.faq h2 { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.faq details {
  border-top: 1px solid var(--line);
  max-width: 46rem;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1.05rem 2.25rem 1.05rem 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent-ink);
  transition: transform 150ms ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq details > div { padding: 0 0 1.35rem; }
.faq details p + p { margin-top: 0.8rem; }

/* ---------- prose pages (method, pricing) ---------- */

.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(1rem, 3vw, 2rem); }
.page-head h1 { max-width: 24ch; }
.page-head .lede { margin-top: 1.3rem; }
.page-head .lede + .lede { margin-top: 0.9rem; }

.prose { padding-block: clamp(1.5rem, 4vw, 2.75rem); }
.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin-top: clamp(2.5rem, 6vw, 3.75rem);
  margin-bottom: 1rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9rem; margin-bottom: 0.5rem; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.prose .refs { font-size: 0.95rem; color: var(--ink-soft); }

.callout {
  border-left: 3px solid var(--leaf);
  background: var(--ground-raised);
  border-radius: 0 0.6rem 0.6rem 0;
  padding: 1.1rem 1.3rem;
  margin-block: 1.4rem;
  max-width: var(--measure);
}

.cta-band {
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 { margin-inline: auto; max-width: 26ch; }
.cta-band p { margin: 1.1rem auto 0; color: var(--ink-soft); }
.cta-band .btn { margin-top: 1.9rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.75rem 3.25rem;
  margin-top: clamp(2rem, 6vw, 4rem);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  gap: 1.4rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-line { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-soft); }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: 0.92rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent-ink); }

.footer-fine { font-size: 0.82rem; color: var(--ink-soft); max-width: 60ch; }
.footer-fine a { color: inherit; }

/* ---------- 404 ---------- */

.lost { padding-block: clamp(4rem, 12vw, 8rem); }
.lost .kicker { color: var(--ink-soft); }
.lost p { margin-top: 1.1rem; color: var(--ink-soft); }
.lost .btn { margin-top: 2rem; }

/* ---------- misc ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- SEO pages: charts, gamuts, guides ---------- */

.site-nav { flex-wrap: wrap; }
.nav-links { flex-wrap: wrap; row-gap: 0.35rem; }

.crumbs {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span:not(.crumb-sep) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22rem;
}
.crumb-sep { color: var(--line); }

.chip {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 3px;
  vertical-align: -0.07em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.chip-big { width: 1.35em; height: 1.35em; border-radius: 4px; vertical-align: -0.3em; }

.tube-row {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.4rem;
}
.tube-row li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; }

.swatches td, .swatches th { vertical-align: middle; }
.swatch-cell { width: 3rem; }
.codes { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.92rem; }
.compare .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips-cell .chip { margin-right: 0.3rem; }
.fine { color: var(--ink-soft); font-size: 0.9rem; }

.strong-flag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.05em 0.6em;
  white-space: nowrap;
}
.strong-flag:hover { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }

.gamut-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-block: 1rem;
}
.gamut-fig { margin: 0; }
.gamut-fig svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 50%;
  background: var(--shot-bg);
  padding: 4.5%;
}
.gamut-fig figcaption {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}
.feature .gamut-fig { align-self: center; }

.compare-row { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.compare-fig { text-decoration: none; color: inherit; }
.compare-fig:hover figcaption strong { color: var(--accent-ink); text-decoration: underline; }

.delta-badge {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1em 0.65em;
  white-space: nowrap;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.4rem;
}
.recipe-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ground-raised);
  padding: 1.1rem 1.2rem 1rem;
}
.recipe-card header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.recipe-card h3 { font-size: 1.02rem; flex: 1; }
.pair { display: inline-flex; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); flex: none; }
.pair-chip { width: 1.15rem; height: 1.5rem; display: inline-block; }
.parts-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.94rem;
  counter-reset: mixstep;
}
.parts-list li { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.parts-list li::before {
  counter-increment: mixstep;
  content: counter(mixstep);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  min-width: 1.1em;
}
.recipe-fine { margin-top: 0.8rem; font-size: 0.82rem; color: var(--ink-soft); }

.cannot td { vertical-align: middle; }
.compare.cannot thead th:not(:first-child), .compare.cannot td:not(:first-child) { width: auto; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}
.more-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--ground-raised);
  font-size: 0.92rem;
}
.more-card strong { font-family: var(--serif); font-size: 1.08rem; letter-spacing: -0.01em; }
.more-card > span:last-child { color: var(--ink-soft); }
.more-card:hover { border-color: var(--earth); }

.palette-grid, .guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  padding-block: 1rem 2rem;
}
.palette-card {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.4rem;
  align-content: start;
}
.palette-card h2 { font-size: 1.3rem; margin-top: 0.9rem; }
.palette-card p { color: var(--ink-soft); font-size: 0.92rem; }
.palette-card:hover h2 { color: var(--accent-ink); }

.guide-list { grid-template-columns: 1fr; max-width: 46rem; }
.guide-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ground-raised);
  padding: 1.4rem 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.guide-card h2 { font-size: 1.35rem; }
.guide-card p { color: var(--ink-soft); }
.guide-card:hover { border-color: var(--earth); }
.guide-card:hover h2 { color: var(--accent-ink); }

.article-meta { margin-top: 1rem; font-size: 0.88rem; color: var(--ink-soft); }
.article-body h3 { font-family: var(--serif); font-size: 1.15rem; }
.article-body blockquote {
  margin: 1.2rem 0;
  border-left: 3px solid var(--earth);
  background: var(--ground-raised);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.2rem;
}
.article-body .gamut-row { margin-block: 1.6rem; }

@media (prefers-color-scheme: dark) {
  .chip, .pair { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
}
