/* Self-hosted fonts (OFL, see assets/fonts/LICENSE.txt). Latin subsets of the variable files. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 100%; font-display: swap; src: url("/assets/fonts/archivo.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/newsreader.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); }

/* Layout: full-width bands that alternate white ground, a fine-line geometric pattern ground, and one black band per page.
   Text is left-aligned in a 1080px container; prose is capped at 64ch. The firm speaks in the sans; Ryan's signed notes are set in the serif. */
:root {
  --paper: #ffffff;
  --ink: #141414;
  --muted: #5f5f5c;
  --line: #d8d8d4;
  --ground: #f7f7f4;          /* pattern ground */
  --band: #0f0f0f;            /* the one black band per page */
  --band-ink: #f4f4f1;
  --band-muted: #b8b8b2;
  --accent: #141414;
  --accent-ink: #ffffff;
  --pat: rgba(20,20,20,0.16); /* pattern line color on light grounds */
  --pat-band: rgba(244,244,241,0.14);
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212; --ink: #ececea; --muted: #a6a6a1; --line: #2e2e2c; --ground: #181817;
    --band: #f4f4f1; --band-ink: #141414; --band-muted: #5f5f5c;
    --accent: #ececea; --accent-ink: #121212;
    --pat: rgba(236,236,234,0.14); --pat-band: rgba(20,20,20,0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121212; --ink: #ececea; --muted: #a6a6a1; --line: #2e2e2c; --ground: #181817;
  --band: #f4f4f1; --band-ink: #141414; --band-muted: #5f5f5c;
  --accent: #ececea; --accent-ink: #121212;
  --pat: rgba(236,236,234,0.14); --pat-band: rgba(20,20,20,0.14);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.prose { max-width: 64ch; }
.prose > * + * { margin-top: 1em; }
.lede { font-size: 1.15rem; color: var(--ink); }
.muted { color: var(--muted); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 0.55rem 0; border-top: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 1px solid var(--line); }


/* Site header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem 2rem; padding-block: 1.1rem; }
.brand { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }
.brand .amp { font-style: italic; color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; margin-left: auto; font-size: 0.95rem; }
.nav a { text-decoration: none; padding-block: 0.2rem; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav a:hover { border-bottom-color: var(--line); }

/* Bands */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band.tight { padding-block: clamp(2rem, 4vw, 3rem); }
.band.black { background: var(--band); color: var(--band-ink); }
.band.black .muted { color: var(--band-muted); }
.band.black ul.plain li { border-color: color-mix(in srgb, var(--band-ink) 22%, transparent); }
.band.ground { background-color: var(--ground); }
.band + .band:not(.black):not(.ground) { border-top: 1px solid var(--line); }

/* One pattern for the whole site: a fine isometric grid. Dark lines on light grounds, light lines on the dark band. */
:root { --iso-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0v97M0 16.2l56 32.3M56 16.2 0 48.5M0 64.7l56 32.3M56 64.7 0 97' stroke='%23141414' stroke-opacity='.15' stroke-width='1' fill='none'/%3E%3C/svg%3E"); --iso-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0v97M0 16.2l56 32.3M56 16.2 0 48.5M0 64.7l56 32.3M56 64.7 0 97' stroke='%23f4f4f1' stroke-opacity='.16' stroke-width='1' fill='none'/%3E%3C/svg%3E"); }
.pat-iso { background-image: var(--iso-dark); background-size: 56px 97px; }
.band.black .pat-iso, .band.black.pat-iso { background-image: var(--iso-light); background-size: 56px 97px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pat-iso { background-image: var(--iso-light); }
  :root:not([data-theme="light"]) .band.black .pat-iso, :root:not([data-theme="light"]) .band.black.pat-iso { background-image: var(--iso-dark); }
}
:root[data-theme="dark"] .pat-iso { background-image: var(--iso-light); }
:root[data-theme="dark"] .band.black .pat-iso, :root[data-theme="dark"] .band.black.pat-iso { background-image: var(--iso-dark); }


/* Accent strips: the two secondary patterns, used once per line page as a thin cap */
.strip { height: 22px; border: 1px solid var(--line); border-bottom: 0; }
.pat-hatch { background-image: repeating-linear-gradient(45deg, var(--pat) 0 1px, transparent 1px 12px); }
.pat-plus { background-image: linear-gradient(var(--pat) 1px, transparent 1px), linear-gradient(90deg, var(--pat) 1px, transparent 1px); background-size: 12px 12px; background-position: 6px 6px; }


figure.ph { margin: 0; }
/* Headshot slots: a standard 8x10 (4:5) at a fixed size, never stretched by the layout */
.note { grid-template-columns: 160px minmax(0, 1fr); }
.note.large { grid-template-columns: 240px minmax(0, 1fr); }
figure.photo.portrait { max-width: 300px; }


/* Rail illustrations: a small reversed panel under a section heading, drawn in the door style */
.rail { display: flex; flex-direction: column; gap: 1.3rem; align-items: flex-start; min-width: 0; }
.rail .ill { width: 100%; max-width: 240px; aspect-ratio: 3 / 2; background: var(--band); color: var(--band-ink); padding: 12px 16px; }
.rail .ill svg { width: 100%; height: 100%; display: block; }
@media (max-width: 760px) { .rail .ill { max-width: 200px; } .rail .ill, .rail .rail-photo, .rail figure.photo, figure.photo.portrait, figure.photo.proof-shot { margin-inline: auto; } }


/* Real photos in the placeholder slots */
figure.photo { margin: 0; }
.prose > figure.photo { margin-top: 1.8rem; }
figure.photo img { width: 100%; height: auto; display: block; filter: grayscale(1) contrast(1.04); border: 1px solid var(--line); }
figure.photo.wide img { aspect-ratio: 21 / 9; object-fit: cover; }
figure.photo.portrait { max-width: 360px; }
figure.photo figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }


/* Photo bands that run edge to edge, and photos that sit in the rail beside their text */
.bleed-band { width: 100%; }
.rail .rail-photo { width: 100%; max-width: 320px; }
.rail figure.photo.rail-photo { max-width: 320px; }


/* Headshot images: same fixed 4:5 boxes as the placeholders had */
img.hs { width: 160px; height: 200px; object-fit: cover; object-position: 50% 20%; display: block; border: 1px solid var(--line); flex: none; }
.note.large img.hs, .about-head img.hs { width: 240px; height: 300px; }
.about-head img.hs { margin-left: auto; }
@media (max-width: 760px) { .about-head img.hs { margin-inline: auto; } }


figure.photo.bleed img { aspect-ratio: 3 / 1; object-fit: cover; border: 0; filter: none; }
figure.photo img { filter: none; }


figure.photo.proof-shot { max-width: 640px; margin: 1.6rem auto 0; }

/* Hero: the pattern lives on the right half and fades out toward the text */
.hero { position: relative; overflow: hidden; }
.hero .pattern { position: absolute; inset: 0; left: 40%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero .prose { max-width: 56ch; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.4rem; }
@media (max-width: 700px) { .hero .pattern { left: 0; -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000); mask-image: linear-gradient(180deg, transparent 30%, #000); opacity: .7; } }

/* Doors */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.door { border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; min-width: 0; }
.door .cap { height: 200px; background: var(--band); color: var(--band-ink); padding: 14px 22px; }
.door .cap svg { width: 100%; height: 100%; display: block; }
.door .body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }
.door .body p { flex: 1; }
.door h3 { font-size: 1.6rem; }

/* Buttons and links */
.btn { display: inline-block; font: inherit; font-weight: 500; font-size: 0.98rem; text-decoration: none; padding: 0.7rem 1.15rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; border-radius: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.band.black .btn { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }

.btn:focus-visible, .nav a:focus-visible, .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.textlink { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.textlink:hover { text-decoration-color: var(--ink); }

/* Two-column sections: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; }
.split > * { min-width: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 1.2rem; } }
.stack > * + * { margin-top: 2.4rem; }
.offer h3 { margin-bottom: 0.6rem; }
.offer ul.plain { margin-top: 1rem; font-size: 0.97rem; }

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem 2.4rem; }
.proof div { border-top: 1px solid var(--ink); padding-top: 0.9rem; font-size: 0.98rem; min-width: 0; }
.band.black .proof div { border-top-color: var(--band-ink); }

/* Sizes (build page) */
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border: 1px solid var(--line); }
.size { padding: 1.5rem 1.5rem 1.6rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.size:last-child { border-right: 0; }
@media (max-width: 860px) { .size { border-right: 0; border-bottom: 1px solid var(--line); } .size:last-child { border-bottom: 0; } }
.size h3 { font-size: 1.35rem; }
.size p { flex: 1; font-size: 0.97rem; }
.size .price { font-family: var(--serif); font-size: 1.3rem; flex: 0; border-top: 1px solid var(--line); padding-top: 0.8rem; }

/* Signed note: Ryan's voice in the serif, with the photo */
.note { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 2.2rem; align-items: start; border: 1px solid var(--line); padding: 2rem; background: var(--paper); }
.note.large { grid-template-columns: 300px minmax(0, 1fr); }
.note img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; filter: grayscale(1) contrast(1.05); }
.note .text { font-family: var(--serif); font-size: 1.18rem; line-height: 1.5; }
.note .text > * + * { margin-top: 0.9em; }
.note .sig { margin-top: 1.2rem; font-family: var(--sans); font-size: 0.92rem; color: var(--muted); }
.note .kicker { font-family: var(--sans); font-size: 0.92rem; color: var(--muted); margin-bottom: 0.8rem; }
@media (max-width: 700px) { .note, .note.large { grid-template-columns: 1fr; } .note img { max-width: 220px; } .note img, .note img.hs { margin-inline: auto; } }

/* Contact promise */
.promise { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.promise p { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); max-width: 22ch; line-height: 1.2; }

/* Forms */
form { display: grid; gap: 1rem; max-width: 520px; }
label { display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--muted); }
input, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-bottom-color: var(--ink); padding: 0.65rem 0.75rem; border-radius: 0; width: 100%; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sent { font-size: 0.95rem; color: var(--muted); }

/* About page */
.about-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3rem; align-items: start; }
.about-head img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; max-width: 300px; margin-left: auto; filter: grayscale(1) contrast(1.05); }
@media (max-width: 760px) { .about-head { grid-template-columns: 1fr; } .about-head img { margin-inline: auto; max-width: 260px; } }

/* Landing page */
.landing .site-head .nav { display: none; }
.landing-hero h1 { max-width: 18ch; }
.quote { font-family: var(--serif); font-size: 1.5rem; line-height: 1.3; max-width: 30ch; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 760px) { .story-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

footer { border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
footer .wrap { padding-block: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }

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

/* Law page story photo: same treatment as the site's other photos, in black and white */
/* The photo fills its grid column, top to bottom of the text column's height: the figure is absolutely
   positioned inside a relative cell, so it adds no height of its own. */
.story-media { position: relative; min-height: 0; }
figure.photo.story-photo { position: absolute; inset: 0; margin: 0; max-width: none; }
figure.photo.story-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: grayscale(1) contrast(1.04); }
@media (max-width: 760px) { .story-media { aspect-ratio: 4 / 5; width: 100%; margin-inline: auto; } }

/* Form status line */
.sent.error { color: var(--ink); border-left: 2px solid var(--ink); padding-left: 0.7rem; }
.noscript-note { font-size: 0.92rem; color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Law page hero: headline left, Ryan's note card right */
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.4rem 3rem; align-items: start; }
.hero-split .note { padding: 1.6rem; gap: 1.6rem; }
@media (max-width: 760px) { .hero-split { grid-template-columns: 1fr; } }
.hero-split h1 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); max-width: none; }

/* Fractional COO: offers as columns, compact lists */
.sizes.offers .size p { flex: 0 0 auto; }
.size ul.compact { list-style: disc; margin: 0; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.4; }
.size ul.compact li { padding: 0.15rem 0; border: 0; }
ul.plain.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.4rem; font-size: 0.92rem; line-height: 1.4; }
ul.plain.cols li { padding: 0.45rem 0; border-bottom: 0; }
ul.plain.cols li:last-child { border-bottom: 0; }
@media (max-width: 700px) { ul.plain.cols { grid-template-columns: 1fr; } }

/* Fractional COO: denser vertical rhythm */
.hero.wide-h1 h1 { max-width: 26ch; }
.hero.wide-h1 { padding-block: clamp(2rem, 4vw, 3rem); }
.bleed-band.slim figure.photo.bleed img { aspect-ratio: 6 / 1; }
.dense .band.tight { padding-block: 2rem; }
.hero.wide-h1 .prose { max-width: 80ch; }
.dense .split .prose { max-width: 76ch; }
