/* Andrew Harrell — site styles */
:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f2eee3;
  --ink: #1d2420;
  --ink-2: #4b5550;
  --ink-3: #6f7872;
  --line: #e3ddce;
  --forest: #2d4a3e;
  --forest-2: #3d6253;
  --forest-soft: #e4ebe5;
  --moss: #6e7c4e;
  --ochre: #b98228;
  --ochre-ink: #8a5f17;
  --ochre-soft: #f5e9cd;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(29, 36, 32, .05), 0 8px 24px -12px rgba(29, 36, 32, .18);
  --wrap: 1120px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::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-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--forest-2); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
  font-variation-settings: "opsz" 72;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 24; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--forest); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ochre-ink);
  margin-bottom: .9rem;
}
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-3); }
.small { font-size: .92rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .96rem;
  padding: 8px 11px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--forest); background: var(--forest-soft); }
.nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; max-height: calc(100vh - 68px); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 12px; border-radius: 10px; font-size: 1.02rem; }
  .nav .btn { margin: 8px 0 0; text-align: center; justify-content: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .98rem/1 var(--font-body);
  padding: 14px 22px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-2); color: #fff; }
.nav .btn-primary { color: #fff; padding: 11px 18px; }
.nav .btn-primary:hover { background: var(--forest-2); color: #fff; }
.btn-secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-secondary:hover { background: var(--forest-soft); color: var(--forest); }
.btn-ghost { color: var(--forest); padding-left: 4px; padding-right: 4px; }
.btn-ghost:hover { color: var(--forest-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.arrow::after { content: "→"; transition: transform .15s; }
a:hover .arrow::after, .arrow:hover::after { transform: translateX(3px); }

/* Sections */
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--surface-2); }
.section-forest { background: var(--forest); color: #eef2ee; }
.section-forest h2, .section-forest h3 { color: #fff; }
.section-forest a { color: #f3d58f; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
@media (max-width: 700px) { section { padding: 64px 0; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 76px 0 84px; }
.hero .topo { position: absolute; right: -180px; top: -120px; width: 900px; height: 900px; color: var(--line); pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 28px; }
.hero-photo { position: relative; }
.hero-photo img { border-radius: 22px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; box-shadow: var(--shadow); }
.hero-badge {
  position: absolute; left: -22px; bottom: 26px; background: var(--surface); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); font-size: .9rem; line-height: 1.35; max-width: 230px;
}
.hero-badge strong { display: block; color: var(--forest); }
@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 420px; }
  .hero-badge { left: 12px; }
}

.page-hero { position: relative; overflow: hidden; padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero .topo { position: absolute; right: -260px; top: -260px; width: 820px; height: 820px; color: var(--line); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { max-width: 58ch; }
.page-hero .btn-row { margin-top: 26px; }

.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.crumbs span { margin: 0 6px; }

/* Proof strip */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.proof ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.proof li { padding: 22px 20px; margin: 0; border-left: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); line-height: 1.4; }
.proof li:first-child { border-left: 0; }
.proof strong { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .proof ul { grid-template-columns: repeat(2, 1fr); }
  .proof li:nth-child(3) { border-left: 0; }
  .proof li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Cards and grids */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-2); }
.card .btn-ghost { margin-top: auto; padding-top: 6px; }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--forest-2); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.card-feature { background: var(--forest); border-color: var(--forest); color: #e9efea; }
.card-feature h3 { color: #fff; }
.card-feature p { color: #d4ded7; }
.card-feature .btn-ghost, .card-feature .tag { color: #f3d58f; }
.card .tag {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre-ink); margin-bottom: 10px;
}
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--forest-soft); color: var(--forest); margin-bottom: 18px;
}
.card-feature .icon { background: rgba(255,255,255,.1); color: #f3d58f; }
.icon svg { width: 22px; height: 22px; }

.media-card { padding: 0; overflow: hidden; }
.media-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.media-card .card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: .96rem;
}
a.chip:hover { border-color: var(--forest); color: var(--forest); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-wide { grid-template-columns: 1.1fr .9fr; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; gap: 32px; } }

/* Lists */
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--forest-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232d4a3e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.section-forest .check-list li::before { background-color: rgba(255,255,255,.12); }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.steps li { counter-increment: step; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 1.6rem;
  color: var(--ochre); margin-bottom: 8px; font-weight: 500;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-2); margin: 0; font-size: .98rem; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.def-list { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.def-list > div { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.def-list h3 { font-size: 1.15rem; margin: 0; }
.def-list p { margin: 0; color: var(--ink-2); }
@media (max-width: 700px) { .def-list > div { grid-template-columns: 1fr; gap: 6px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--forest); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-2); padding-right: 40px; }

/* Callout */
.callout {
  background: var(--ochre-soft); border-radius: var(--radius); padding: 28px 30px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.callout h3 { margin: 0 0 .2em; }
.callout p { margin: 0; color: var(--ink-2); }

.cta-band { text-align: left; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3em; }
.cta-band p { margin: 0; color: #cfdad3; max-width: 52ch; }
.cta-band .btn-primary { background: #f3d58f; color: var(--forest); }
.cta-band .btn-primary:hover { background: #fff; color: var(--forest); }
.cta-band .btn-secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Prose */
.prose { max-width: 700px; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: #2c3430; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ochre); color: var(--ink-2); font-style: italic; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: .9rem; color: var(--ink-3); margin-top: 8px; }
.prose img { border-radius: var(--radius); }
.article-meta { color: var(--ink-3); font-size: .95rem; margin-top: 8px; }

/* Software mini-cards */
.sw-card .sw-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 560; margin-bottom: 4px; color: var(--ink); }

/* Photo grid (about) */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-grid figure { margin: 0; }
.photo-grid img { border-radius: 12px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.photo-grid figcaption { font-size: .86rem; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 760px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid #d6cfbe; border-radius: 10px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-soft); }
textarea { min-height: 160px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { font-weight: 500; margin: 0; min-height: 1.4em; }
.form-status.ok { color: var(--forest); }
.form-status.err { color: #a2402c; }

.contact-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-aside h3 { font-size: 1.1rem; margin-top: 1.4em; }
.contact-aside h3:first-child { margin-top: 0; }

.embed-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.embed-frame iframe { width: 100%; height: 720px; border: 0; display: block; }

/* Writing list */
.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li { margin: 0; border-bottom: 1px solid var(--line); }
.post-list a { display: block; padding: 26px 0; text-decoration: none; color: inherit; }
.post-list a:hover h3 { color: var(--forest); }
.post-list h3 { margin: 4px 0 6px; }
.post-list p { margin: 0; color: var(--ink-2); }
.post-list time { font-size: .88rem; color: var(--ink-3); }

/* Footer */
.site-footer { background: #17201c; color: #b9c4bd; padding: 64px 0 36px; font-size: .96rem; }
.site-footer a { color: #e3e9e5; text-decoration: none; }
.site-footer a:hover { color: #f3d58f; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.18);
}
.social a:hover { border-color: #f3d58f; }
.social svg { width: 18px; height: 18px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .88rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer a, .contact-aside a { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
[id] { scroll-margin-top: 84px; }
