/* Frank Davis Digital — site styles
   One stylesheet, no build step. Colors are tokens on :root so the
   whole palette can be changed in one place. */

:root {
  --paper: #f5f2ec;
  --paper-2: #ece7de;
  --card: #fbfaf7;
  --ink: #15171c;
  --ink-2: #2b2f38;
  --muted: #5d6370;
  --line: #ddd6ca;
  --accent: #b8460f;
  --accent-ink: #ffffff;
  --accent-soft: #f4e3d7;
  --focus: #1d4ed8;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.8rem + 3vw, 4.4rem);

  --radius: 14px;
  --wrap: 1180px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111216;
    --paper-2: #181a20;
    --card: #1b1d24;
    --ink: #eeebe5;
    --ink-2: #d6d2ca;
    --muted: #a0a5b0;
    --line: #2d3039;
    --accent: #f0864a;
    --accent-ink: #1a0d05;
    --accent-soft: #33221a;
    --focus: #8ab4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111216;
  --paper-2: #181a20;
  --card: #1b1d24;
  --ink: #eeebe5;
  --ink-2: #d6d2ca;
  --muted: #a0a5b0;
  --line: #2d3039;
  --accent: #f0864a;
  --accent-ink: #1a0d05;
  --accent-soft: #33221a;
  --focus: #8ab4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; font-optical-sizing: auto; }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0 0 1.1em; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.9rem; display: inline-block; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); 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; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; line-height: 1.1; }
.brand span { line-height: 1.05; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 0.95rem; cursor: pointer; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.site-nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 0.96rem; font-weight: 500; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.site-nav .nav-cta { background: var(--ink); color: var(--paper); margin-left: 6px; }
.site-nav .nav-cta:hover, .site-nav .nav-cta[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

@media (max-width: 820px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 18px; }
  .js .site-nav a { display: block; padding: 12px 14px; border-radius: 10px; }
  .js .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-bottom: 10px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: var(--font-body); transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.arrow { transition: transform .15s; }
a:hover .arrow { transform: translateX(3px); }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 110px) 0; }
.section-alt { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 2.4rem; }
.section-head h2 { margin: 0; max-width: 22ch; }
.section-head p { margin: 0; max-width: 42ch; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
.hero-figure figcaption { position: absolute; left: 14px; bottom: 14px; background: color-mix(in srgb, var(--paper) 90%, transparent); padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; color: var(--ink-2); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-figure img { aspect-ratio: 3 / 2; } }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--card); padding: 30px 26px 28px; display: flex; flex-direction: column; text-decoration: none; transition: background .15s; }
.pillar:hover { background: var(--paper); color: inherit; }
.pillar .num { font-family: var(--font-display); font-size: 0.95rem; color: var(--accent); margin-bottom: 2.4rem; }
.pillar h3 { font-size: var(--step-2); margin-bottom: 0.4em; }
.pillar p { color: var(--muted); font-size: 0.96rem; margin: 0 0 1.4rem; flex: 1; }
.pillar .more { font-weight: 600; font-size: 0.92rem; }
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 10px; background: var(--paper-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; color: #fff; font-size: 0.86rem; background: linear-gradient(transparent, rgba(0,0,0,.6)); opacity: 0; transition: opacity .2s; }
.gallery figure:hover figcaption, .gallery figure:focus-within figcaption { opacity: 1; }
.g-wide { grid-column: span 7; aspect-ratio: 3 / 2; }
.g-tall { grid-column: span 5; aspect-ratio: 4 / 5; }
.g-third { grid-column: span 4; aspect-ratio: 1 / 1; }
.g-half { grid-column: span 6; aspect-ratio: 3 / 2; }
.g-full { grid-column: span 12; aspect-ratio: 21 / 9; }
/* wide + tall share a row: give them one height so the row lines up */
.g-wide, .g-tall { aspect-ratio: auto; height: clamp(300px, 40vw, 500px); }
@media (max-width: 760px) { .g-wide, .g-tall, .g-third, .g-half, .g-full { grid-column: span 12; aspect-ratio: 3 / 2; height: auto; } .gallery figcaption { opacity: 1; } }

/* ---------- Video ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }
.video-feature { grid-column: 1 / -1; max-width: 960px; }
.video-feature video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; }
.video-card h3 { margin-top: 14px; margin-bottom: 4px; }
.video-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.video-facade { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 0; padding: 0; width: 100%; cursor: pointer; display: block; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-facade:hover img { opacity: 1; }
.video-facade .play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.video-facade .play svg { width: 26px; height: 26px; margin-left: 4px; fill: var(--accent-ink); }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade[data-video-id=""] { cursor: default; }
.video-facade[data-video-id=""] .play { background: rgba(255,255,255,.18); }
.video-facade[data-video-id=""] .play svg { fill: #fff; }
.video-soon { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 0.78rem; padding: 4px 10px; border-radius: 999px; }

/* ---------- Article cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--ink); color: inherit; transform: translateY(-2px); }
.card .tag { font-size: 0.78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: var(--step-1); margin: 12px 0 10px; }
.card p { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card .meta { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; display: flex; justify-content: space-between; }

/* ---------- Services ---------- */
.service { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 70px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.service:first-of-type { border-top: 0; }
.service h2 { font-size: var(--step-3); }
.service ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.service li { margin-bottom: 0.45em; }
.service li::marker { color: var(--accent); }
@media (max-width: 820px) { .service { grid-template-columns: 1fr; } }

/* ---------- Page header ---------- */
.page-head { padding: clamp(48px, 8vw, 100px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; }
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { text-decoration: none; }

/* ---------- Article ---------- */
.article-head { padding: clamp(40px, 7vw, 90px) 0 28px; }
.article-head h1 { font-size: var(--step-4); max-width: 20ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.92rem; margin-top: 1rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--measure)) 260px; gap: 64px; justify-content: space-between; padding-bottom: 80px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { font-size: 1.08rem; line-height: 1.75; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--ink-2); }
.prose .callout { background: var(--accent-soft); border-radius: 12px; padding: 18px 22px; margin: 1.6em 0; font-size: 1rem; }
.prose .callout p:last-child { margin: 0; }
.prose .callout strong { display: block; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.45; min-width: 560px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose .checklist { list-style: none; padding-left: 0; }
.prose .checklist li { padding-left: 30px; position: relative; }
.prose .checklist li::before { content: ""; position: absolute; left: 2px; top: 0.4em; width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 4px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 0.92rem; border-left: 1px solid var(--line); padding-left: 20px; }
.toc h2 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 10px; line-height: 1.35; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--accent); }
.author-box { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.6rem; }
.author-box img { width: 56px; height: 56px; border-radius: 50%; }
.author-box p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.author-box strong { color: var(--ink); display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); border-radius: calc(var(--radius) + 6px); padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center; }
.cta-band h2 { margin: 0 0 .3em; color: var(--paper); }
.cta-band p { margin: 0; color: color-mix(in srgb, var(--paper) 75%, transparent); max-width: 50ch; }
.cta-band .btn-primary:hover { background: var(--paper); color: var(--ink); }
.btn-call { border-color: color-mix(in srgb, var(--paper) 55%, transparent); color: var(--paper); }
.btn-call:hover { background: var(--paper); color: var(--ink); }
.cta-band .btn-row { justify-content: flex-end; }
@media (max-width: 760px) { .cta-band .btn-row { justify-content: flex-start; } }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Two-col prose (about) ---------- */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.split figure { margin: 0; }
.split img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.principles { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 18px; }
.principles li { border-top: 1px solid var(--line); padding-top: 18px; }
.principles strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; display: block; margin-bottom: 4px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; font: inherit; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -5000px; }
.form-status { font-weight: 600; min-height: 1.5em; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(28px, 6vw, 80px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-aside { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; align-self: start; }
.contact-aside h2 { font-size: var(--step-1); }
.contact-aside dl { margin: 0; }
.contact-aside dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 14px; }
.contact-aside dd { margin: 2px 0 0; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; margin-top: 40px; font-size: 0.94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ---------- Consent banner ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 560px; margin-left: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); font-size: 0.93rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent .btn { padding: 9px 16px; font-size: 0.9rem; }
.consent .btn-row { margin-top: 0; gap: 8px; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; }
.notfound h1 span { color: var(--accent); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
