/* jedcasey.com. One stylesheet, no build step.
   Light and minimal: a warm off-white page, white rounded cards,
   one accent colour, and plenty of space. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --page: #f3f0eb;
  --card: #ffffff;
  --ink: #171717;
  --muted: #5d5a55;
  --line: #e4dfd7;
  --accent: #0f6b57;
  --accent-soft: #e3f0ec;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --radius: 24px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.2vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); letter-spacing: -0.01em; }
/* The one flourish: a phrase set in italic serif inside a plain heading. */
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
ul { margin: 0; padding-left: 1.15em; }
li { margin-bottom: 0.45em; }
li:last-child { margin-bottom: 0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 740px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

/* ── Header ── */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.site-name { font-size: 1.25rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.site-name::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.98rem; padding: 0.6rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ── Small labels and buttons ── */
.label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: #cfc9bf; }
.btn-outline:hover { border-color: var(--ink); }

.stack { font-size: 0.9rem; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); padding: 1.6rem; }
@media (min-width: 720px) { .card { padding: 2.25rem; } }

/* ── Hero ── */
.hero { padding: 2.5rem 0 1rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.45fr 1fr; gap: 3.5rem; } .hero { padding-top: 4rem; } }
.hero .lead { font-size: 1.15rem; max-width: 36rem; margin-top: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }
.hero-facts { font-size: 0.95rem; color: var(--muted); margin-top: 1.4rem; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 859px) { .hero-photo { aspect-ratio: 4 / 3; object-position: 50% 30%; } }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; text-align: center; margin-top: 2.5rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-number { display: block; font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 500; line-height: 1.1; color: var(--accent); letter-spacing: -0.02em; }
.stat-label { display: block; font-size: 0.92rem; color: var(--muted); margin-top: 0.35rem; text-wrap: balance; }

/* ── Sections ── */
.section { padding: 4.5rem 0 0; }
.section:last-of-type { padding-bottom: 4.5rem; }
.section-head { text-align: center; max-width: 38rem; margin: 0 auto 2.25rem; }
.section-head p { color: var(--muted); margin-top: 0.9rem; }

.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Numbered points */
.points { counter-reset: point; }
.point { counter-increment: point; }
.point::before {
  content: counter(point);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.95rem;
  margin-bottom: 1rem;
}
.point h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.point p { color: var(--muted); font-size: 1rem; }

/* ── Featured case study ── */
.feature { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 800px) { .feature { grid-template-columns: 1.05fr 1fr; gap: 2.5rem; } }
.feature img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.feature h3 { margin: 1rem 0 0.7rem; }
.feature p { color: var(--muted); }
.feature .btn { margin-top: 0.75rem; }

/* ── Projects: problem / decision / result ── */
.project + .project { margin-top: 1rem; }
.project-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.6rem; }
.project-top .label { margin: 0; }
.project-top .when { font-size: 0.9rem; color: var(--muted); }
.project h3 { margin-bottom: 1.5rem; }
.pdr { display: grid; gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .pdr { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.pdr h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.pdr p, .pdr li { font-size: 0.98rem; }
.project .stack { margin-top: 1.5rem; }
.project-plain p { color: var(--muted); max-width: 40rem; }

/* ── Background lists ── */
.rows { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.rows li { padding: 1rem 0; border-top: 1px solid var(--line); margin: 0; }
.rows .when { display: block; color: var(--muted); font-size: 0.88rem; }
.rows strong { display: block; font-weight: 600; }
.rows .what { display: block; color: var(--muted); font-size: 0.96rem; }

/* ── Contact: the one dark card ── */
.contact-card { background: var(--ink); color: #fff; text-align: center; padding: 3rem 1.5rem; }
.contact-card h2 { color: #fff; }
.contact-card p { color: #cfcac2; max-width: 32rem; margin: 1rem auto 0; }
.contact-links { list-style: none; padding: 0; margin: 1.9rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.contact-links li { margin: 0; }
.contact-card .btn { background: #fff; color: var(--ink); border-color: #fff; }
.contact-card .btn-outline { background: transparent; color: #fff; border-color: #6d6a65; }
.contact-card .btn-outline:hover { border-color: #fff; }

/* ── Case study article ── */
.article-head { padding: 2.5rem 0 2rem; }
@media (min-width: 860px) { .article-head { padding-top: 4rem; } }
.article-head h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin: 1.1rem 0 1.2rem; }
.article-head .lead { font-size: 1.15rem; color: var(--muted); }
.article figure { margin: 0 0 1rem; }
.article figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.article figcaption { font-size: 0.9rem; color: var(--muted); margin: 0.7rem 0.5rem 0; }
.article .card { margin-bottom: 1rem; }
.article .card > h2 { font-size: clamp(1.5rem, 3.6vw, 1.9rem); margin-bottom: 1.1rem; }
.article h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin: 1.75rem 0 0.4rem; }
.article ul { margin-bottom: 1em; }
.article .card p, .article .card li { color: #3d3a36; }

.summary dl { margin: 0; display: grid; gap: 1.1rem; }
@media (min-width: 720px) { .summary dl { grid-template-columns: 1fr 1fr; gap: 1.4rem 2rem; } }
.summary dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.summary dd { margin: 0.25rem 0 0; }

.table-scroll { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 620px; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
tr.chosen td { background: var(--accent-soft); }

.objection { border-top: 1px solid var(--line); padding: 1.3rem 0; }
.objection:last-child { padding-bottom: 0; }
.objection h3 { margin: 0 0 0.4rem; font-family: var(--serif); font-style: italic; font-size: 1.25rem; font-weight: 500; }

.article-foot { margin: 2rem 0 4.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Footer ── */
.site-footer { padding: 0 0 2.5rem; font-size: 0.9rem; color: var(--muted); text-align: center; }
