/* DitchBook marketing site — static, print-first, phone-first. */

:root {
  --paper: oklch(0.992 0.004 92);
  --paper-dim: oklch(0.972 0.007 92);
  --ink: oklch(0.22 0.012 258);
  --ink-mid: oklch(0.34 0.012 258);
  --ink-soft: oklch(0.44 0.012 258);
  --water: oklch(0.44 0.09 242);
  --water-deep: oklch(0.35 0.088 242);
  --water-tint: oklch(0.94 0.02 242);
  --water-line: oklch(0.78 0.035 242);
  --border: oklch(0.87 0.008 92);
  --border-strong: oklch(0.80 0.01 92);
  --on-water: oklch(0.985 0.006 92);

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 66ch;

  /* type scale — ~1.28 ratio, fluid */
  --step--1: clamp(0.94rem, 0.9rem + 0.2vw, 1rem);
  --step-0:  1.125rem;                                    /* 18px body */
  --step-1:  clamp(1.25rem, 1.15rem + 0.5vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(1.9rem, 1.5rem + 2vw, 2.85rem);
  --step-4:  clamp(2.35rem, 1.7rem + 3.4vw, 4rem);

  --space-section: clamp(3.25rem, 2rem + 5vw, 5.5rem);
}

* {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--water-tint);
  color: var(--ink);
}

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

a {
  color: var(--water-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in oklab, var(--water-deep) 45%, transparent);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover,
a:focus {
  color: var(--water);
  text-decoration-color: currentColor;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
  font-optical-sizing: auto;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.018em;
  font-weight: 600;
}

h2 {
  font-size: var(--step-3);
  letter-spacing: -0.014em;
}

h3 {
  font-size: var(--step-1);
  letter-spacing: -0.006em;
  line-height: 1.2;
}

p {
  margin: 0 0 1.15em;
  max-width: var(--measure);
  text-wrap: pretty;
}

ul, ol {
  max-width: var(--measure);
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.5em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

/* anchor offset for sticky header */
[id] {
  scroll-margin-top: 6rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--water-deep);
  color: var(--on-water);
  padding: 0.75em 1.25em;
  border-radius: 3px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(6px);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 196px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2rem);
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--ink-mid);
  text-decoration: none;
  padding: 0.2em 0;
  position: relative;
}

.site-nav a:not(.phone)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1.5px;
  background: var(--water);
  transition: right 0.2s ease;
}

.site-nav a:not(.phone):hover::after,
.site-nav a:not(.phone):focus::after {
  right: 0;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--water-deep);
}

.site-nav .phone {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--step-0);
  color: var(--water-deep);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* ---------- Shared kicker ---------- */

.section-kicker,
.hero-kicker {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--water-deep);
  font-weight: 600;
  margin: 0 0 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}

.section-kicker::before {
  content: "";
  width: 1.9em;
  height: 1.5px;
  background: var(--water);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 2rem + 6vw, 6rem) 0 clamp(3rem, 2rem + 5vw, 5.5rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* restrained water-line contour motif — very light */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    var(--water-line) 38px,
    var(--water-line) 39px
  );
  -webkit-mask-image: radial-gradient(115% 90% at 88% 8%, #000 0%, transparent 62%);
  mask-image: radial-gradient(115% 90% at 88% 8%, #000 0%, transparent 62%);
  opacity: 0.5;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  color: var(--ink-soft);
}

.hero-kicker::before {
  content: "";
  width: 1.9em;
  height: 1.5px;
  background: var(--water);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  hanging-punctuation: first last;
}

.hero-aside {
  padding-bottom: 0.35rem;
}

.hero .subhead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-mid);
  max-width: 42ch;
  margin: 0 0 1.75rem;
  border-left: 2px solid var(--water);
  padding-left: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  padding: 0.82em 1.5em;
  border-radius: 4px;
  text-decoration: none;
  border: 1.5px solid var(--water-deep);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--water-deep);
  color: var(--on-water);
  box-shadow: 0 1px 2px oklch(0.35 0.088 242 / 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--water);
  border-color: var(--water);
  color: var(--on-water);
  box-shadow: 0 4px 12px oklch(0.35 0.088 242 / 0.28);
}

.btn-secondary {
  background: transparent;
  color: var(--water-deep);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--water-tint);
  color: var(--water-deep);
}

/* ---------- Sections ---------- */

section {
  padding: var(--space-section) 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.section-head h2 {
  margin: 0;
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  max-width: none;
  counter-reset: step;
}

.steps li {
  margin: 0;
  padding-top: 1.3rem;
  border-top: 2px solid var(--water);
  position: relative;
}

.step-number {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--water-deep);
  margin-bottom: 0.7em;
  font-variant-numeric: tabular-nums;
}

.step-number::before {
  content: "0";
  opacity: 0.5;
}

.steps h3 {
  margin-bottom: 0.35em;
}

.steps p {
  color: var(--ink-mid);
  max-width: 34ch;
  margin: 0;
}

.no-accounts {
  margin: clamp(2.25rem, 4vw, 3rem) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-mid);
  max-width: 48ch;
  padding-left: 1.15rem;
  border-left: 2px solid var(--border-strong);
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}

.price-col {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.price-col--paid {
  background: var(--paper-dim);
}

.price-col + .price-col {
  border-left: 1px solid var(--border-strong);
}

.price-head {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.price-col h3 {
  font-size: var(--step-1);
  margin: 0 0 0.15em;
}

.price-tag {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.15rem);
  letter-spacing: -0.02em;
  color: var(--water-deep);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.price-col ul {
  padding: 0;
  margin: 0 0 1.5rem;
  max-width: none;
  list-style: none;
}

.price-col li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.7em;
}

.price-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.7em;
  height: 0.7em;
  border: 1.5px solid var(--water);
  border-right: none;
  border-top: none;
  transform: rotate(-45deg) translateY(-0.15em);
  transform-origin: center;
}

.price-note {
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.55;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ---------- Credibility strip (inverted band) ---------- */

.credibility {
  background: var(--ink);
  color: var(--on-water);
  border-bottom: none;
  position: relative;
}

.credibility .section-kicker {
  color: var(--water-line);
}

.credibility .section-kicker::before {
  background: var(--water-line);
}

.credibility p {
  max-width: 62ch;
  color: oklch(0.86 0.01 258);
}

.credibility .credibility-lead {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--on-water);
  margin-bottom: 1.1em;
  text-wrap: pretty;
}

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

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--border);
}

.faq-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item h3 {
  margin-bottom: 0.35em;
  font-size: var(--step-0);
  font-weight: 600;
}

.faq-item p {
  color: var(--ink-mid);
  font-size: var(--step--1);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 46ch;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(2.75rem, 4vw, 4rem) 0;
  background: var(--paper-dim);
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand p,
.footer-contact p {
  margin: 0;
  max-width: none;
}

.footer-wordmark strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.footer-place {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-top: 0.15em;
}

.footer-contact {
  text-align: right;
}

.footer-reach {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-mid);
  margin-bottom: 0.5em;
}

.footer-lines {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 0.6em;
}

.footer-lines a {
  color: var(--water-deep);
  font-weight: 500;
  text-decoration: none;
}

.footer-lines a:hover,
.footer-lines a:focus {
  text-decoration: underline;
}

.footer-copy {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.75rem;
  }

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

  .hero .subhead {
    max-width: 52ch;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .faq-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .price-col + .price-col {
    border-left: none;
    border-top: 1px solid var(--border-strong);
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

  .footer-contact {
    text-align: left;
  }

  .footer-lines {
    justify-content: flex-start;
  }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --ink: #000;
    --ink-mid: #1a1a1a;
    --ink-soft: #333;
  }

  html { scroll-behavior: auto; }

  body {
    font-size: 11pt;
    line-height: 1.45;
    color: #000;
    background: #fff;
  }

  .site-header {
    position: static;
    background: none;
    backdrop-filter: none;
  }

  .site-nav a[href^="#"],
  .hero-actions,
  .skip-link {
    display: none;
  }

  .hero::after,
  .hero .subhead { border: none; }

  .hero .subhead { padding-left: 0; }

  .credibility {
    background: #fff;
    color: #000;
    border: 1px solid #999;
  }

  .credibility p,
  .credibility .credibility-lead,
  .credibility .section-kicker { color: #000; }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="tel:"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #333;
  }

  section {
    border-bottom: 1px solid #ccc;
    padding: 1.25rem 0;
    page-break-inside: avoid;
  }

  .pricing-grid,
  .price-col + .price-col {
    border-color: #999;
  }

  .price-col--paid { background: none; }
}
