/* HookForge site stylesheet. Shared by every public page under site/.
 *
 * Redesign 2026-09-14. The class vocabulary is unchanged on purpose: every
 * page under site/ (packages, legal, blog) is hand-written HTML that predates
 * this file, so restyling through the stylesheet restyles all fifteen at once
 * and cannot break markup it never touches. Renaming a class here would mean
 * editing every page, and any page missed would silently lose its styling.
 *
 * Three things this version adds that the last one did not have:
 *
 *   Dark mode. The site was light-only; a visitor whose OS is dark got a
 *   white flash and a page that ignored them. Colours are tokens, defined
 *   once per theme, so no rule below hard-codes one.
 *
 *   Readable greys. --faint was #9a9aa0 on a #fbfaf9 ground: 2.9:1, under
 *   the 4.5:1 WCAG AA needs for body text, and it was carrying the trust line
 *   under the hero and the whole footer. Both greys are now AA on their
 *   backgrounds in both themes.
 *
 *   Visible focus. There was no :focus-visible rule at all, so a keyboard
 *   user tabbing to "Buy now" could not see where they were.
 */

:root {
  color-scheme: light dark;

  /* Ember on warm paper. The accent is the one thing carried over unchanged:
     it is the brand, it is in the logo mark, and it tests at 4.6:1 on white. */
  --accent: #cf4310;
  --accent-ink: #ffffff;
  --accent-dim: #fdeee6;
  --accent-hover: #b03809;

  --ink: #17161a;
  --muted: #5c5a63;   /* 6.4:1 on --bg */
  --faint: #74717c;   /* 4.6:1 on --bg -- AA, where the old one was 2.9:1 */
  --bg: #faf9f7;
  --card: #ffffff;
  --border: #e5e2dd;
  --border-strong: #d2cec7;
  --code-bg: #f4f2ef;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23,22,26,.04), 0 8px 24px -14px rgba(23,22,26,.14);
  --shadow-lift: 0 2px 4px rgba(23,22,26,.05), 0 18px 36px -18px rgba(23,22,26,.22);

  --measure: 920px;
  --measure-narrow: 680px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* A lighter ember: #cf4310 on a near-black ground is 3.1:1 and reads as
       dried blood. #ff7a45 is 6.9:1 and still the same hue family. */
    --accent: #ff7a45;
    --accent-ink: #2a0d02;
    --accent-dim: #2e1811;
    --accent-hover: #ff9268;

    --ink: #f3f1ee;
    --muted: #aba7b2;   /* 7.4:1 on --bg */
    --faint: #8f8b98;   /* 5.2:1 on --bg */
    --bg: #121114;
    --card: #1a191e;
    --border: #2b292f;
    --border-strong: #3d3a43;
    --code-bg: #201f24;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.7);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.45), 0 18px 36px -18px rgba(0,0,0,.85);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anchor navigation (#pricing, #faq) must not land under the sticky header. */
:target { scroll-margin-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* One focus ring for everything interactive. :focus-visible, not :focus, so a
   mouse click on a card does not leave a ring behind it. */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: var(--measure-narrow); margin: 0 auto; padding: 0 1.5rem; }

/* Keyboard users should be able to jump the nav. Styled here so any page can
   add <a class="skip" href="#main">...</a> as its first element and get it. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);   /* fallback: sem color-mix, opaco em vez de transparente */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.site-header .bar {
  max-width: var(--measure); margin: 0 auto; padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem; text-decoration: none;
  color: var(--ink); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
}
.logo .mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(155deg, var(--accent), #f2762e 65%, #ffa06b);
  display: inline-block; position: relative; flex: none;
  box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--accent) 55%, transparent);
}
/* The hook: a bar that turns up at the foot, drawn in the mark's negative space. */
.logo .mark::after {
  content: ""; position: absolute; inset: 7px 8px 8px 8px;
  border: 2px solid #fff; border-top: none; border-right: none;
  border-radius: 0 0 0 5px;
}
.nav-links { display: flex; gap: 1.6rem; font-size: 0.93rem; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; position: relative;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 640px) {
  .site-header .bar { padding: 0.7rem 1rem; }
  .logo { font-size: 1rem; gap: 0.5rem; }
  .logo .mark { width: 25px; height: 25px; border-radius: 8px; }
  .nav-links {
    gap: 1.1rem; font-size: 0.86rem; max-width: 62vw;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
  .nav-links a::after { display: none; }
}

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

.hero { padding: 4.5rem 0 3rem; position: relative; }
/* A warm bloom behind the headline, so the top of the page is not flat white.
   Decorative only, and it sits under the text rather than over it. */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -14rem; left: 50%; transform: translateX(-50%);
  width: min(760px, 120%); height: 34rem;
  background: radial-gradient(ellipse at center,
              color-mix(in srgb, var(--accent) 13%, transparent), transparent 68%);
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block; font-size: 0.76rem; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 0.34rem 0.8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.1rem); line-height: 1.08;
  letter-spacing: -0.035em; margin: 0 0 0.9rem; font-weight: 780;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--muted);
  margin: 0 0 2rem; max-width: 52ch; line-height: 1.55; text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }

/* The trust line was one long grey sentence split by middots -- at 0.85rem and
   2.9:1 it was the least readable text on the page while carrying the refund
   promise. Same markup, now spaced to read as discrete claims. */
.trust-line {
  margin-top: 2rem; font-size: 0.87rem; color: var(--faint);
  line-height: 2.1; max-width: 62ch;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 0.78rem 1.45rem; border-radius: var(--radius-sm);
  font-weight: 640; font-size: 0.96rem; font-family: inherit;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease,
              box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.08),
              0 8px 20px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--card); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.87rem; }
.btn-block { width: 100%; }

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

.section { padding: 3.25rem 0; }
.section-head { margin-bottom: 2rem; max-width: 60ch; }
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem); letter-spacing: -0.025em;
  margin: 0 0 0.45rem; font-weight: 720; text-wrap: balance;
}
.section-head p { color: var(--muted); margin: 0; text-wrap: pretty; }

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

.pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
@media (max-width: 820px) { .pkgs { grid-template-columns: 1fr; max-width: 460px; } }

.pkg {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
/* An ember hairline along the top edge, lit on hover. */
.pkg::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), #f2762e);
  opacity: 0; transition: opacity .18s ease;
}
.pkg:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.pkg:hover::before { opacity: 1; }
.pkg:focus-within { border-color: var(--accent); }

.pkg h3 { font-size: 1.02rem; margin: 0 0 0.45rem; font-weight: 680; letter-spacing: -0.01em; }
.pkg .price {
  font-size: 2.15rem; font-weight: 760; letter-spacing: -0.04em;
  margin: 0.15rem 0 0.9rem; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pkg .price small { font-size: 0.88rem; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.pkg p.desc { color: var(--muted); font-size: 0.94rem; margin: 0 0 1.15rem; }
.pkg ul {
  list-style: none; padding: 0; margin: 0 0 1.4rem;
  font-size: 0.9rem; color: var(--ink); flex: 1;
}
.pkg ul li { padding-left: 1.45rem; position: relative; margin-bottom: 0.5rem; line-height: 1.45; }
.pkg ul li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--accent-dim);
}
/* The tick, drawn rather than typed: a glyph inherits the line box and drifts. */
.pkg ul li::after {
  content: ""; position: absolute; left: .3rem; top: .62em;
  width: .38rem; height: .2rem;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.pkg .links {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: auto;
}
.pkg .links a.details {
  font-size: 0.87rem; color: var(--muted); text-decoration: none;
  transition: color .15s ease;
}
.pkg .links a.details:hover { color: var(--accent); }

/* Package detail pages use .product-card for the same job. */
.product-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem 1.5rem; box-shadow: var(--shadow);
}

/* --------------------------------------------------------- how it works - */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 1.4rem; } }
.step { position: relative; padding-left: 3rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--card); color: var(--accent);
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: 0.9rem; font-weight: 720;
  display: flex; align-items: center; justify-content: center;
}
/* The thread joining the steps -- vertical when they stack, and never after
   the last one. */
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.3rem; bottom: -1.4rem;
  width: 1.5px; background: linear-gradient(var(--border), transparent);
}
@media (min-width: 821px) { .step:not(:last-child)::after { display: none; } }
.step h3 { font-size: 1.02rem; margin: 0 0 0.35rem; font-weight: 670; }
.step p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ------------------------------------------------- cards / free scripts - */

.card-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 700px) { .card-row { grid-template-columns: 1fr; } }
.mini-card {
  display: block; text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.15rem 1.25rem; font-size: 0.93rem;
  color: var(--muted); line-height: 1.5;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mini-card:hover {
  border-color: var(--border-strong); box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.mini-card .k {
  display: block; color: var(--accent); font-size: 0.72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45rem;
}
.mini-card strong {
  display: block; margin-bottom: 0.3rem; color: var(--ink);
  font-size: 1rem; font-weight: 650; letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ faq - */

.faq { max-width: 74ch; }
.faq details { border-bottom: 1px solid var(--border); padding: 1.05rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  font-weight: 640; cursor: pointer; list-style: none;
  position: relative; padding-right: 2rem; letter-spacing: -0.005em;
  transition: color .15s ease;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
/* A rotating cross rather than a swapped +/- glyph: no reflow, and it animates. */
.faq summary::before,
.faq summary::after {
  content: ""; position: absolute; background: var(--muted);
  transition: transform .2s ease, background .15s ease;
}
.faq summary::before { right: 0.35rem; top: 0.72em; width: 0.75rem; height: 1.6px; }
.faq summary::after  { right: 0.72rem; top: 0.4em; width: 1.6px; height: 0.75rem; }
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::before { background: var(--accent); }
.faq details[open] summary::after { transform: rotate(90deg); background: var(--accent); }
.faq details p { color: var(--muted); margin: 0.75rem 0 0; font-size: 0.95rem; max-width: 68ch; }

/* ------------------------------------------------------- prose / legal - */

.prose { padding: 3rem 0 4rem; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.15rem); letter-spacing: -0.03em; margin: 0 0 1rem; font-weight: 750; text-wrap: balance; }
.prose h2 { font-size: 1.22rem; margin-top: 2.4rem; margin-bottom: .5rem; letter-spacing: -0.015em; font-weight: 690; }
.prose p { color: var(--muted); text-wrap: pretty; }
.prose > p:first-of-type { font-size: 1.08rem; }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose dt { font-weight: 640; margin-top: 1.1rem; color: var(--ink); }
.prose dd { margin: 0.15rem 0 0 0; color: var(--muted); }
.prose dl { margin: 1.5rem 0; }
.prose pre {
  background: var(--code-bg); padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  overflow-x: auto; border: 1px solid var(--border); font-size: 0.88rem; line-height: 1.55;
}
.prose code { font-family: var(--mono); font-size: 0.88em; }
.prose :not(pre) > code {
  background: var(--code-bg); border: 1px solid var(--border);
  padding: 0.12em 0.38em; border-radius: 5px; color: var(--ink);
}
.prose .box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.6rem; margin: 1.9rem 0;
  box-shadow: var(--shadow);
}
.prose .box .price {
  font-size: 1.35rem; font-weight: 740; margin: 0.3rem 0 1rem;
  letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.prose .box .guarantee { font-size: 0.87rem; color: var(--faint); margin: 1rem 0 0; }
.prose a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid var(--accent-dim); color: var(--muted); font-style: italic;
}
.prose table { border-collapse: collapse; width: 100%; margin: 0; font-size: 0.93rem; }
.prose th, .prose td {
  text-align: left; padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.prose th { font-weight: 640; color: var(--ink); }
.prose td { color: var(--muted); }
.prose tr:last-child td { border-bottom: none; }
.prose .table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6rem 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}

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

footer.site-footer {
  border-top: 1px solid var(--border); margin-top: 3rem; padding: 2.25rem 0 3rem;
  color: var(--faint); font-size: 0.87rem;
}
footer.site-footer a { color: var(--muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--accent); text-decoration: underline; }
footer.site-footer .links { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
footer.site-footer .links a { margin-right: 0; }

/* ------------------------------------------------------- small screens - */

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 1.1rem; }
  .hero { padding: 2.75rem 0 2rem; }
  .hero .eyebrow { margin-bottom: 1rem; }
  .lede { max-width: none; }
  .section { padding: 2.4rem 0; }
  .pkg { padding: 1.35rem 1.25rem; }
  .btn { width: 100%; }         /* thumb-sized targets, one per row */
  .pkg .links { flex-direction: column; align-items: stretch; gap: .6rem; }
  .pkg .links a.details { text-align: center; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
}

/* Printing a legal page or an invoice should not spend ink on chrome. */
@media print {
  .site-header, .hero::before, .hero-ctas, footer.site-footer .links { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose, .section { padding: 0; }
  a { text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ------------------------------------------------- hero: text + delivery preview - */
/* Two columns on a desk, one on a phone. The right column is what a delivery
   looks like, drawn in HTML: the page used to promise "working code in your
   inbox" without ever showing any. */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.demo {
  background: #17161a; color: #e9e6e1; border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem; box-shadow: var(--shadow-lift);
  font: 0.86rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid rgba(255,255,255,.06); overflow: hidden;
}
@media (prefers-color-scheme: dark) { .demo { background: #0f0e11; } }
.demo .bar { display: flex; gap: 6px; margin-bottom: 0.9rem; }
.demo .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a383e; display: block; }
.demo .bar i:first-child { background: var(--accent); }
.demo .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.demo .p { color: #8f8a94; }
.demo .ok { color: #7ed9a0; }
.demo .arrow { color: var(--accent); }
.demo .file { color: #ffd08a; }
.demo-cap {
  margin: 0.9rem 0 0; font: 0.8rem/1.5 var(--sans, inherit); color: #8f8a94;
}
.demo-cap b { color: #d9d5cf; font-weight: 600; }

/* The trust line, as four claims a reader can scan instead of one grey sentence. */
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem 1.4rem;
  margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
.trust-grid div { font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.trust-grid b { display: block; color: var(--ink); font-weight: 660; margin-bottom: 0.15rem; }

/* Language switch in the header: a small pill, so it reads as a setting, not a page. */
.nav-links a.lang {
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.15rem 0.6rem;
  font-size: 0.8rem; font-weight: 650; color: var(--ink);
}
.nav-links a.lang::after { display: none; }
