/* Construal Research — site styles
   Type: Outfit (headings), Newsreader (body), Kalam (annotations only).
   Color: anything in color is hand-drawn. Type stays black. */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/outfit-latin.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/newsreader-latin.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/newsreader-italic-latin.woff2) format("woff2"); }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/kalam-latin.woff2) format("woff2"); }

:root {
  --ink: #141414;
  --paper: #ffffff;
  --red: #D10000;
  --blue: #275FED;
  --green: #008722;
  --muted: #555555;
  --rule: #141414;
  --wash: #f6f6f4;

  --head: "Outfit", system-ui, sans-serif;
  --body: "Newsreader", Georgia, serif;
  --hand: "Kalam", "Comic Neue", cursive;

  --wrap: 72rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(4rem, 9vw, 7.5rem);
  --mark-weight: 3px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.125rem, 0.4vw + 1.03rem, 1.3125rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3, .footer-heading, .eyebrow, .button, .nav { font-family: var(--head); }
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw + 0.6rem, 4.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 2.4vw + 0.8rem, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.lede { font-size: 1.15em; line-height: 1.5; }
.eyebrow { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 1.25rem; }
.fine { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Buttons: black ink, clean type */
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.9em 1.35em;
  border: 2px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); background: var(--ink); text-decoration: none; }
.button:active { transform: none; box-shadow: none; }
.button-small { font-size: 0.875rem; padding: 0.65em 1em; }
.link-arrow { font-family: var(--head); font-weight: 600; font-size: 1rem; text-decoration: none; }
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.logo img { width: 190px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-size: 1rem; font-weight: 500; flex-wrap: wrap; }
.nav a:not(.button) { text-decoration: none; }
.nav a:not(.button):hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 40rem) {
  .logo img { width: 160px; }
  .header-inner { row-gap: 0.9rem; }
  .nav { width: 100%; justify-content: space-between; gap: 0.75rem; font-size: 0.95rem; }
}

/* Hand-drawn marks */
.mk { position: relative; white-space: nowrap; display: inline-block; }
.mk-svg { position: absolute; pointer-events: none; overflow: visible; }
.mk-svg path { stroke-width: var(--mark-weight); }
.mk-wrap-circle { margin-right: 0.2em; }
.mk-wrap-circle .mk-svg { left: -0.3em; top: -0.14em; width: calc(100% + 0.62em); height: calc(100% + 0.34em); }
.mk-wrap-underline .mk-svg { left: -0.05em; right: -0.05em; bottom: -0.32em; width: calc(100% + 0.1em); height: 0.42em; }
.mk-box { position: relative; padding: clamp(1.25rem, 3vw, 2rem); }
.mk-box > .mk-svg { inset: 0; width: 100%; height: 100%; }
.annotation { font-family: var(--hand); font-size: 1.15rem; line-height: 1.25; }
.annotation-red { color: var(--red); }
.annotation-blue { color: var(--blue); }

/* Sections */
.section { padding: var(--space) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: var(--measure); }

/* Home: hero */
.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem); }
.hero h1 { max-width: 15ch; margin-bottom: 0.5em; }
.hero h1 .mk-wrap-circle .mk-svg path { stroke-width: 3.5px; }
.hero .lede { max-width: 36rem; margin-bottom: 2rem; }

/* Home: the shift */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); margin: 2.75rem 0 1.25rem; max-width: 52rem; }
.stat-figure { font-family: var(--head); font-weight: 600; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; margin: 0 0 1.2rem; }
.stat-figure .mk-wrap-underline .mk-svg { bottom: -0.16em; height: 0.24em; }
.stat p { margin: 0; }
.stat .stat-figure { margin-bottom: 1.1rem; }
.source { font-size: 0.85rem; color: var(--muted); max-width: 52rem; }
@media (max-width: 34rem) { .stats { grid-template-columns: 1fr; } }

/* Home: analytics vs research */
.compare { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); column-gap: clamp(1.5rem, 4vw, 3rem); margin: 2.75rem 0 2rem; max-width: 60rem; }
.compare-col { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
.compare-col h3 { font-size: 1rem; letter-spacing: 0.02em; margin: 0 0 0.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.compare-col p { margin: 0; padding: 0.85rem 0; border-bottom: 1px solid #d9d9d9; }
.compare-col p:last-child { border-bottom: 0; }
.compare-tools { padding: clamp(1.25rem, 3vw, 2rem) 0; color: var(--muted); }
.compare-tools h3 { color: var(--ink); }
.compare-research p { font-weight: 500; }
.compare-research h3 { border-bottom-color: var(--rule); }
.compare-note { position: relative; }
@media (max-width: 44rem) {
  .compare { grid-template-columns: 1fr; row-gap: 1rem; }
  .compare-tools { padding-top: 0; }
}

/* Home: steps */
.steps { list-style: none; padding: 0; margin: 2.75rem 0 0; display: grid; gap: 0; max-width: 52rem; counter-reset: step; }
.step { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.25rem; padding: 1.4rem 0; border-top: 1px solid #d9d9d9; position: relative; }
.step:first-child { border-top: 0; }
.step-num { font-family: var(--head); font-weight: 600; font-size: 1.15rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; position: relative; margin-top: -0.1rem; }
.step-num .mk-svg { inset: 0; width: 100%; height: 100%; }
.step-num .mk-svg path { stroke-width: 2.25px; }
.step h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.step p { margin: 0; }
.step-note { position: absolute; right: 0; top: 1.2rem; transform: rotate(-3deg); display: flex; align-items: center; gap: 0.4rem; }
.step-note svg { width: 2.5rem; height: 1.25rem; }
@media (max-width: 60rem) { .step-note { position: static; transform: rotate(-2deg); grid-column: 2; margin-top: 0.35rem; } .step-note svg { display: none; } }

/* Home: Insights list */
.post-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; max-width: 52rem; }
.post-list li { padding: 1.25rem 0; border-top: 1px solid #d9d9d9; }
.post-list li:first-child { border-top: 0; }
.post-meta { font-family: var(--head); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.35rem; }
.post-list a { font-family: var(--head); font-weight: 600; font-size: 1.3rem; text-decoration: none; line-height: 1.25; }
.post-list a:hover { text-decoration: underline; }
.post-list p { margin: 0.4rem 0 0; }

/* Home: founder note */
.founder { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; max-width: 60rem; }
.founder-photo { position: relative; width: 100%; max-width: 13rem; aspect-ratio: 1; }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.founder-photo .mk-svg { inset: -9%; width: 118%; height: 118%; }
.founder-photo .mk-svg path { stroke-width: 3px; }
.founder-sign { font-family: var(--head); font-weight: 500; font-size: 1rem; margin: 1.5rem 0 1.75rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
@media (max-width: 40rem) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 9.5rem; margin: 0.5rem 0 0 0.75rem; } }

/* Interior pages */
.page-head { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { max-width: var(--measure); }
.prose { max-width: var(--measure); padding-bottom: var(--space); }
.prose h2 { font-size: clamp(1.5rem, 1.6vw + 0.9rem, 2rem); margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.55em; padding-left: 0.2em; }
.prose li::marker { font-family: var(--head); font-weight: 600; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.25em; border-left: 2px solid var(--ink); font-style: italic; }
.prose img { margin: 2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose .cta { margin-top: 2.5em; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 18rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-photo { position: sticky; top: 2rem; margin-top: 0.4rem; }
.about-photo img { width: 100%; }
.about-photo figcaption { font-family: var(--hand); color: var(--blue); font-size: 1.1rem; margin-top: 0.6rem; transform: rotate(-2deg); }
@media (max-width: 52rem) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 15rem; order: -1; margin: 0; }
}

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; }
.site-footer a { color: var(--paper); }
.site-footer .button { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.site-footer .button:hover { box-shadow: 4px 4px 0 #8a8a8a; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.footer-heading { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.6rem; }
.footer-email { font-family: var(--head); font-size: 1rem; margin-top: 1.25rem; }
.site-footer .fine { color: #b5b5b5; margin-top: 0.85rem; }
.subscribe-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.subscribe-form input[type="email"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1rem; padding: 0.8em 0.9em;
  border: 2px solid var(--paper); border-radius: 2px; background: var(--ink); color: var(--paper);
}
.subscribe-form input::placeholder { color: #9a9a9a; }
.footer-legal { display: flex; align-items: center; gap: 0.85rem 1.25rem; flex-wrap: wrap; border-top: 1px solid #3a3a3a; padding-top: 1.75rem; font-size: 0.85rem; color: #b5b5b5; }
.footer-legal p { margin: 0; }
.footer-links { display: flex; gap: 1.25rem; margin-left: auto !important; }
.footer-mark { width: 24px; height: 24px; }
@media (max-width: 44rem) { .footer-grid { grid-template-columns: 1fr; } .footer-links { margin-left: 0 !important; } }

/* Inline subscribe block (end of posts, light background) */
.subscribe-inline { background: var(--wash); padding: clamp(1.5rem, 4vw, 2.5rem); margin-top: 3rem; }
.subscribe-inline .subscribe-form input[type="email"] { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.subscribe-inline .subscribe-form input::placeholder { color: #8a8a8a; }
.subscribe-inline .footer-heading { font-size: 1.35rem; }

/* 404 */
.notfound { padding: var(--space) 0; }

@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
@media print { .site-header .nav, .site-footer { display: none; } }
.post-byline { font-family: var(--head); font-weight: 500; font-size: 1rem; margin-top: 2.5em; }
