/* flip-the-script — the Klaff prototype
 * Editorial serif. Warm cream paper. Deep ink. Restrained.
 */

:root {
  --bg:        #f6f1e7;
  --ink:       #1a1612;
  --muted:     #6b6259;
  --accent:    #b34a1b;
  --rule:      #d8cfbf;
  --softpanel: #efe8d8;

  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Palatino", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Courier New", monospace;

  --measure: 38rem;      /* ~608px; generous reading column */
  --wide:    56rem;      /* ~896px; outer bound */
  --gutter:  clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html {
  font-size: 17px;                       /* lift base up a notch — editorial, not cramped */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";  /* old-style numerals when available */
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
}

/* Layout scaffolding
---------------------------------- */
.page {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.col {
  max-width: var(--measure);
  margin: 0;
}

/* Top bar — deliberately quiet.
   Site name left, nav right, nothing else. No CTA. */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2.25rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  gap: 2rem;
  flex-wrap: wrap;
}

.mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: none;
}
.mark a {
  color: var(--ink);
  text-decoration: none;
  border: 0;
}
.mark a:hover { color: var(--accent); }

.mark-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

nav.primary {
  font-family: var(--serif);
  font-size: 0.95rem;
}
nav.primary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
nav.primary a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
}

/* Hero — one sentence, a lot of breathing room.
   The whole point is that nothing above the fold asks you to do anything. */
.hero {
  padding: clamp(4rem, 14vh, 10rem) 0 clamp(3rem, 8vh, 6rem);
  max-width: 42rem;
}
.hero p {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
}
.hero p em {
  font-style: italic;
  font-weight: 400;
}

/* Drop-cap flourish — editorial move, used once. */
.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.4rem;
  line-height: 0.88;
  padding: 0.25rem 0.6rem 0 0;
  font-weight: 400;
  color: var(--ink);
}

/* Body prose sections */
section.prose {
  padding: 3.25rem 0;
  border-top: 1px solid var(--rule);
}
section.prose:first-of-type {
  border-top: none;
}

section.prose h2 {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
  /* hang into the gutter slightly on wide viewports — newspaper feel */
}

@media (min-width: 900px) {
  section.prose h2 {
    margin-left: -1.75rem;
  }
}

section.prose h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2.5rem 0 0.6rem;
  line-height: 1.3;
}

section.prose p {
  max-width: var(--measure);
  margin: 0 0 1.15rem;
  font-size: 1.08rem;
  line-height: 1.65;
}

section.prose p.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 36rem;
}

section.prose ul {
  max-width: var(--measure);
  padding-left: 1.1rem;
  margin: 0 0 1.25rem;
}
section.prose ul li {
  margin: 0.3rem 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Prose within-body emphasis — use sparingly */
em { font-style: italic; }
strong { font-weight: 600; }

/* Pullquote / peer-moment callout */
.peer {
  max-width: 36rem;
  margin: 2.5rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--accent);
  font-size: 1.22rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}
.peer cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The "facts" line — price, length, turnaround — in mono */
.facts {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 1.75rem 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.facts .fact { display: flex; flex-direction: column; }
.facts .fact .label {
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  letter-spacing: 0.08em;
}
.facts .fact .value {
  color: var(--ink);
  font-size: 0.95rem;
}

/* "Link list" — where the reader decides what to look at next.
   Not a CTA. Not a button. An editorial table of contents. */
.pathways {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}
.pathways li {
  border-top: 1px solid var(--rule);
  padding: 1.05rem 0;
}
.pathways li:last-child {
  border-bottom: 1px solid var(--rule);
}
.pathways a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
  border: 0;
  font-size: 1.1rem;
}
.pathways a:hover {
  color: var(--accent);
}
.pathways a .arrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform 180ms ease, color 180ms ease;
}
.pathways a:hover .arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Two-column compare table (used on Buyer's Formula) */
.compare {
  display: grid;
  gap: 2.5rem 3rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 2rem;
  max-width: var(--measure);
}
@media (min-width: 800px) {
  .compare { grid-template-columns: 1fr 1fr; }
}
.compare h4 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.compare ul {
  padding-left: 1.1rem;
  margin: 0;
}
.compare ul li { margin: 0.5rem 0; font-size: 1rem; line-height: 1.55; }

/* Before/after block on Demonstration page */
.ba {
  border: 1px solid var(--rule);
  padding: 1.4rem 1.5rem 1.2rem;
  margin: 1.8rem 0;
  background: var(--softpanel);
  max-width: var(--measure);
}
.ba .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.65rem;
}
.ba p { margin: 0 0 0.6rem; }
.ba p:last-child { margin-bottom: 0; }

.metrics {
  margin: 2rem 0;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.2rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 720px) {
  .metrics { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
}
.metrics .metric {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.metrics .metric .label {
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}
.metrics .metric .value {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.2;
}

/* Booking section — deliberately quiet.
   Not a "contact form." A single question and a button. */
.booking {
  max-width: 38rem;
  margin-top: 2.5rem;
  padding: 2rem 2.2rem 2.1rem;
  background: var(--softpanel);
  border: 1px solid var(--rule);
}
.booking h3 {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 500;
}
.booking .fineprint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin: 0 0 1.2rem;
}
.booking label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1rem 0 0.4rem;
}
.booking input[type="text"],
.booking input[type="email"],
.booking textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--ink);
  line-height: 1.5;
  outline: none;
  transition: border-color 120ms ease;
}
.booking input:focus,
.booking textarea:focus {
  border-color: var(--accent);
}
.booking textarea {
  min-height: 6rem;
  resize: vertical;
}
.booking button {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.65rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 150ms ease;
}
.booking button:hover {
  background: var(--accent);
}

.booking .hush {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.booking .confirm {
  display: none;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}
.booking .confirm.visible { display: block; }

/* Signature block */
.sig {
  max-width: var(--measure);
  margin: 3rem 0 1rem;
  font-style: italic;
  color: var(--ink);
  font-size: 1.05rem;
}
.sig::before {
  content: "— ";
  color: var(--muted);
}

/* Autonomy line — the close-move sentence at the bottom of most pages */
.autonomy {
  max-width: var(--measure);
  margin: 3rem 0 0;
  font-size: 1.08rem;
  color: var(--ink);
  font-style: italic;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

/* Footer */
footer.site {
  margin-top: 5rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
footer.site a {
  color: var(--muted);
  border-bottom-color: var(--rule);
}
footer.site a:hover { color: var(--accent); border-color: var(--accent); }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* A touch of responsive restraint for very small screens */
@media (max-width: 540px) {
  html { font-size: 16px; }
  .hero { padding-top: 3rem; padding-bottom: 2rem; }
  .hero p { font-size: 1.7rem; line-height: 1.25; }
  .topbar { padding-top: 1.5rem; }
  nav.primary ul { gap: 1.1rem; }
}

/* Skip link — a11y quietly */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 0;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  z-index: 999;
}
