/* Nathalie Gribinski — site styles
   Colors and fonts are set once here, in :root. Change them and the whole site follows. */
:root {
  --bg: #e6dfd3;          /* warm off-white page background */
  --surface: #ffffff;     /* cards */
  --tint: #ddd5c7;        /* alternate section background */
  --ink: #23201d;         /* main text */
  --muted: #5f5750;       /* secondary text */
  --line: #cdc2b1;        /* hairlines */
  --accent: #a5410d;      /* orange for buttons and links (readable on light backgrounds) */
  --accent-bright: #ee7a37; /* brighter orange for small highlights */
  --accent-ink: #ffffff;
  --radius: 10px;
  --font: "Jost", "Futura PT", Futura, "Century Gothic", system-ui, sans-serif;
  --wrap: 1200px;
}

* { 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); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; font-weight: 600; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 500; color: var(--muted); margin-bottom: .6em; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 40em; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: .8em 1.4em; border-radius: 999px; font-weight: 500; text-decoration: none;
  border: 2px solid var(--accent); transition: background .15s, color .15s;
  font: inherit; font-weight: 500; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { padding: .5em 1em; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(230, 223, 211, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px); }
.hero h1 { max-width: 14em; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 500; text-decoration: none; }
.section-head.stack { display: block; }
.section-head.stack p { color: var(--muted); max-width: 44em; margin-top: .6em; }
.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); }

/* Grids */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Project cards */
.card { display: block; color: inherit; text-decoration: none; }
.card-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-img.fit-contain { background: var(--surface); border: 1px solid var(--line); }
.card-img.fit-contain img { object-fit: contain; padding: 14%; }
.card:hover .card-img img { transform: scale(1.03); }
.card-text { padding-top: 14px; }
.card-text h3 { margin-bottom: .25em; }
.card-text p:last-child { color: var(--muted); font-size: .95rem; margin: 0; }
.card:hover h3 { color: var(--accent); }
.card .eyebrow { margin-bottom: .3em; }
.badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; letter-spacing: .03em; }

/* Services */
.service { display: block; background: var(--surface); border-radius: var(--radius); padding: 24px; color: inherit; text-decoration: none; border: 1px solid var(--line); transition: border-color .15s; }
.service:hover { border-color: var(--accent); }
.service p { color: var(--muted); font-size: .95rem; }
.service .more { color: var(--accent); font-weight: 500; font-size: .95rem; }
.industries { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.industries p { margin: 0; color: var(--muted); }
.industries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.industries li { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 14px; font-size: .95rem; }

/* Quotes */
.quote { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); break-inside: avoid; margin-bottom: 24px; }
.quotes .quote { margin-bottom: 0; }
.quote blockquote { margin: 0 0 16px; }
.quote blockquote p { margin: 0; font-size: 1.02rem; }
.quote figcaption { display: flex; flex-direction: column; font-size: .92rem; }
.quote figcaption span { color: var(--muted); }
.quote-large { margin-top: 56px; padding: clamp(28px, 4vw, 48px); border-left: 4px solid var(--accent-bright); }
.quote-large blockquote p { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; }
.masonry { columns: 3 300px; column-gap: 24px; }

/* Call to action */
.cta { background: var(--ink); color: #fff; padding: clamp(56px, 8vw, 96px) 0; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #d9d2c9; }
.cta .btn { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--ink); }
.cta .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Work page */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips a { text-decoration: none; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 500; }
.chips a:hover { background: var(--ink); color: #fff; }
.work-section { scroll-margin-top: 70px; border-top: 1px solid var(--line); }

/* Project page */
.project { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); }
.crumbs a { text-decoration: none; font-weight: 500; }
.project-head { margin: 24px 0 40px; max-width: 820px; }
.meta { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 24px 0 0; }
.meta dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.meta dd { margin: 0; font-weight: 500; }
.project-body { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.project-text { position: sticky; top: 96px; }
.case-study .project-text h2 { font-size: 1.25rem; margin-top: 1.4em; }
.case-study .cs-block:first-child h2 { margin-top: 0; }
.shots { display: grid; gap: 24px; }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.shot img { width: 100%; height: auto; }
.shot.fit-contain { background: var(--surface); border: 1px solid var(--line); }
.shot.fit-contain img { padding: 8%; }
.related { color: var(--muted); }
.next { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.next span { color: var(--muted); }
.next a { font-size: 1.3rem; font-weight: 600; text-decoration: none; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.portrait { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.process { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.process li { counter-increment: step; }
.process li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.process p { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-bright); outline-offset: 0; }
.form button { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .95rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
.footer-inner p { margin: 0; }
.footer-name { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-copy { width: 100%; font-size: .85rem; }

/* Tablet */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .process { grid-template-columns: repeat(2, 1fr); }
  .project-body { grid-template-columns: 1fr; }
  .project-text { position: static; max-width: 720px; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .header-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .brand span { font-size: 1rem; }
  .nav { gap: 16px; width: 100%; justify-content: space-between; }
  .nav .btn-small { padding: .4em .9em; }
  .grid-3, .grid-4, .process { grid-template-columns: 1fr; }
  .about, .contact { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; }
  .form .row { grid-template-columns: 1fr; }
  .quote-large { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.form h2{font-size:1.4rem}.small{font-size:.9rem;color:var(--muted)}

/* Hero with artwork */
.hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-art { display: block; color: var(--muted); text-decoration: none; font-size: .9rem; }
.hero-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--tint); margin-bottom: 10px; }
.hero-art:hover span { color: var(--accent); }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { max-width: 420px; } }

/* Pictures: every picture shown whole, in frames of the same size */
.project-body { grid-template-columns: minmax(280px, 1fr) 1.6fr; }
.project-text { position: static; }
.project-head { margin: 16px 0 32px; }
.project-head h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.shot { display: flex; align-items: center; justify-content: center; height: min(calc(100vh - 120px), 760px); background: var(--tint); padding: 24px; }
.shot img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.shot.fit-contain { height: min(calc(100vh - 120px), 460px); padding: 48px; }
.shot.fit-contain img { padding: 0; max-width: 70%; max-height: 80%; }
/* Grid thumbnails: whole picture, no cropping */
.card-img { background: var(--tint); }
.card-img img { object-fit: contain; padding: 6%; }
.card-img.fit-contain img { padding: 16%; }
@media (max-width: 980px) {
  .shot { height: auto; max-height: none; padding: 16px; }
  .shot img { max-height: 75vh; }
  .shot.fit-contain { height: auto; padding: 32px; }
  .shot.fit-contain img { max-height: 280px; }
}
/* Phone and tablet: title, then the pictures, then the story */
@media (max-width: 980px) {
  .project-body { display: flex; flex-direction: column; gap: 24px; }
  .project-text { display: contents; }
  .project-text > * { order: 3; max-width: 720px; }
  .project-text > .crumbs { order: 0; margin-bottom: 0; }
  .project-text > .project-head { order: 1; margin: 0; }
  .shots { order: 2; }
}

/* Logos: a smaller white tile, with the logo filling it and a 20px white border */
.shot.fit-contain { height: auto; width: 100%; max-width: 460px; padding: 20px; }
.shot.fit-contain img { max-width: 100%; max-height: none; padding: 0; }
.card-img.fit-contain img { padding: 20px; }
@media (max-width: 980px) {
  .shot.fit-contain { padding: 20px; max-width: 360px; }
  .shot.fit-contain img { max-height: none; }
}

/* Project page layout: title on top left; pictures start level with the gray intro line */
.project-body { display: grid; grid-template-columns: minmax(280px, 1fr) 1.6fr; grid-template-rows: auto 1fr; column-gap: clamp(28px, 5vw, 64px); row-gap: 0; padding-top: 16px; }
.ph-top { grid-column: 1; grid-row: 1; }
.ph-top .crumbs { margin-bottom: 16px; }
.ph-top h1 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: .4em; }
.project-text { grid-column: 1; grid-row: 2; }
.project-text .meta { margin: 0 0 32px; }
.shots { grid-column: 2; grid-row: 2; align-self: start; }
@media (max-width: 980px) {
  .project-body { display: flex; flex-direction: column; gap: 0; }
  .project-text { display: block; }
  .ph-top { order: 0; }
  .shots { order: 1; margin-bottom: 32px; }
  .project-text { order: 2; }
}
@media (min-width: 981px) {
  .project { padding-top: 24px; }
  .shot { height: max(440px, min(calc(100vh - 340px), 760px)); }
  .shot.fit-contain { height: auto; }
}

/* ===== Project pages (final layout) =====
   Desktop: all text in the left column, pictures large in the right column,
   both starting 70px below the header. */
@media (min-width: 981px) {
  .project { padding-top: 70px; }
  .project-body {
    display: grid; grid-template-columns: minmax(300px, 1fr) 2fr;
    grid-template-rows: auto 1fr; column-gap: clamp(32px, 4vw, 56px); row-gap: 0; padding-top: 0;
  }
  .ph-top { grid-column: 1; grid-row: 1; }
  .project-text { grid-column: 1; grid-row: 2; display: block; position: static; }
  .shots { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-top: 0; }
  .ph-top .crumbs { margin: 0 0 16px; line-height: 1.2; }
  .shot { height: max(480px, min(calc(100vh - 170px), 900px)); }
  .shot.fit-contain { height: auto; max-width: 640px; }
}
/* Titles 20% smaller */
.ph-top h1 { font-size: clamp(1.6rem, 2.9vw, 2.4rem); }
@media (min-width: 981px) {
  .shot.fit-contain img { max-height: calc(100vh - 210px); width: auto; }
}

/* ===== Pictures on project pages (latest) =====
   Logos: centered on a white square, logo about 80% of the square.
   Everything else: just the picture, no frame. */
.shot { background: none; border: 0; padding: 0; height: auto; display: block; border-radius: 0; }
.shot img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 170px); padding: 0; border-radius: 0; }
.shot.fit-contain {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 1 / 1; width: min(100%, 640px, calc(100vh - 170px)); max-width: none; height: auto; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.shot.fit-contain img { max-width: 80%; max-height: 80%; width: auto; height: auto; }
@media (max-width: 980px) {
  .shot img { max-height: 75vh; }
  .shot.fit-contain { width: 100%; max-width: 420px; }
}

/* Desktop: first picture starts level with the INDUSTRY / WORK labels */
.ph-top .lead { margin-bottom: 20px; }
@media (min-width: 981px) {
  .shots { grid-row: 2; }
  .shot img { max-height: max(400px, calc(100vh - 380px)); }
  .shot.fit-contain { width: min(100%, 640px, max(380px, calc(100vh - 380px))); }
}

/* Desktop: first picture starts level with the gray intro line under the title */
@media (min-width: 981px) {
  .project-body { grid-template-rows: auto auto auto auto 1fr; }
  .ph-top { display: contents; }
  .ph-top > * { grid-column: 1; }
  .ph-top .crumbs { grid-row: 1; }
  .ph-top .eyebrow { grid-row: 2; }
  .ph-top h1 { grid-row: 3; }
  .ph-top .lead { grid-row: 4; margin-top: 0; }
  .project-text { grid-row: 5; }
  .shots { grid-row: 4 / span 2; }
  .shot img { max-height: max(420px, calc(100vh - 330px)); }
  .shot.fit-contain { width: min(100%, 640px, max(400px, calc(100vh - 330px))); }
}

/* Project pages: body text and Industry / Work values 15% smaller */
.project-text .meta dd,
.project-text p,
.project-text li { font-size: 15.3px; }

/* ===== Click-to-enlarge pictures ===== */
.shot { cursor: zoom-in; }
.shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(24, 21, 19, .97); }
.lb[hidden] { display: none; }
.lb-stage { position: absolute; inset: 0; overflow: auto; display: flex; padding: 56px 72px; -webkit-overflow-scrolling: touch; }
.lb-img { margin: auto; display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lb-logo .lb-img { background: #fff; padding: 6vmin; border-radius: var(--radius); }
.lb.zoomed .lb-stage { padding: 0; display: block; }
.lb.zoomed .lb-img { max-width: none; max-height: none; height: auto; margin: 0; cursor: grab; }
.lb.zoomed .lb-img:active { cursor: grabbing; }
.lb-btn { position: absolute; z-index: 2; border: 0; background: rgba(20,18,16,.6); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.25); width: 48px; height: 48px; border-radius: 50%; font: 400 30px/1 var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(20,18,16,.85); outline: none; }
.lb-btn[hidden] { display: none; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; bottom: 10px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255,255,255,.75); font-size: .85rem; pointer-events: none; }
@media (max-width: 700px) {
  .lb-stage { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 6px; transform: none; width: 40px; height: 40px; }
  .lb-count { bottom: 16px; }
}

/* Desktop: picture top sits exactly on the top of the capital letters of the gray intro line.
   Jost: line box is 1.6em, glyph box 1.445em, cap height 0.70em, ascent 1.07em
   -> cap top is 0.8em - 0.7225em + 0.37em = 0.4475em below the top of the line. */
.project-body { --lead-fs: clamp(1.1rem, 1.8vw, 1.3rem); }
@media (min-width: 981px) {
  .ph-top .lead { font-size: var(--lead-fs); line-height: 1.6; }
  .shots { margin-top: calc(var(--lead-fs) * 0.4475); }
}

/* Project pages: body and intro about 10% smaller with tighter leading.
   Picture offset for the intro's capital letters at line-height 1.3: 0.65em - 0.7225em + 0.37em = 0.2975em */
.project-text .meta dd,
.project-text p,
.project-text li { font-size: 13.8px; line-height: 1.5; }
.project-body { --lead-fs: clamp(1rem, 1.62vw, 1.17rem); }
.ph-top .lead { font-size: var(--lead-fs); line-height: 1.3; }
@media (min-width: 981px) {
  .ph-top .lead { line-height: 1.3; }
  .shots { margin-top: calc(var(--lead-fs) * 0.2975); }
}

/* Logo squares about 2/3 of their old size; business cards and stationery shown on their own */
.shot.fit-contain { width: min(100%, 420px); }
@media (min-width: 981px) { .shot.fit-contain { width: min(100%, 420px); } }
.shot.card img { max-width: min(100%, 560px); box-shadow: 0 1px 3px rgba(35, 32, 29, .12), 0 6px 18px rgba(35, 32, 29, .08); }

/* Logo square: same width as the cards on the page (560px), more white space around the logo */
.shot.fit-contain { width: min(100%, 560px); }
@media (min-width: 981px) { .shot.fit-contain { width: min(100%, 560px); } }
.shot.fit-contain img { max-width: 58%; max-height: 58%; }
@media (min-width: 981px) { .shot.fit-contain { width: min(100%, 560px, max(420px, calc(100vh - 330px))); } }

/* Back link and next-project link together at the top left */
.ph-top .crumbs { display: flex; flex-wrap: wrap; gap: 8px 28px; }
/* Next project's title on the right, level with the back link */
.ph-top .crumbs { justify-content: space-between; }
.crumb-next { text-align: right; }
@media (min-width: 981px) { .ph-top .crumbs { grid-column: 1 / -1; } }

/* All buttons: white type on orange */
.btn, .btn-ghost, .cta .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover, .btn-ghost:hover, .cta .btn:hover { background: #8f380b; border-color: #8f380b; color: #fff; }
/* Zoom viewer: white arrows and X on solid orange circles */
.lb-btn { background: var(--accent); box-shadow: none; }
.lb-btn:hover, .lb-btn:focus-visible { background: #8f380b; }

/* Desktop: project titles on one line, spanning the page width above the picture */
@media (min-width: 981px) {
  .ph-top h1 { grid-column: 1 / -1; white-space: nowrap; }
}

/* 25px more space between the title and the gray description (picture moves down with it) */
.ph-top h1 { margin-bottom: calc(.4em + 25px); }

/* Project testimonial: smaller quote, thicker orange line */
.quote-large { border-left-width: 7px; }
.quote-large blockquote p { font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.55; }

/* Zoom viewer: logos stay on their white square, logo at the same 58% as on the page */
.lb-frame { display: contents; }
.lb-logo .lb-img { background: none; padding: 0; border-radius: 0; }
.lb.lb-logo .lb-frame {
  display: flex; align-items: center; justify-content: center; margin: auto; flex: none;
  width: min(100%, calc(100vh - 112px)); aspect-ratio: 1 / 1; height: auto;
  background: #fff; border-radius: var(--radius); cursor: zoom-in;
}
.lb.lb-logo .lb-frame .lb-img { max-width: 58%; max-height: 58%; width: auto; height: auto; margin: 0; }
.lb.lb-logo.zoomed .lb-stage { display: flex; padding: 0; }
.lb.lb-logo.zoomed .lb-frame { max-width: none; cursor: grab; }
.lb.lb-logo.zoomed .lb-frame .lb-img { max-width: 58%; max-height: 58%; width: 58%; }
/* Previous | Next project, grouped on the right */
.crumb-pn { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.crumb-pn a { text-decoration: none; font-weight: 500; }
.crumb-bar { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); }

/* Section headings (The client / The challenge / What I did) on every project page, smaller */
.project-text .cs-block h2 { font-size: 15.5px; font-weight: 600; line-height: 1.3; margin: 1.5em 0 .35em; }
.project-text .cs-block:first-child h2 { margin-top: 0; }
.project-text .cs-block p { margin: 0 0 .6em; }

/* Work and home grids: square tiles. Pictures fill the square (cropped, no beige);
   logos stay on white, about 20% smaller than before */
.card-img { aspect-ratio: 1 / 1; background: none; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; padding: 0; }
.card-img.fit-contain { background: var(--surface); display: flex; align-items: center; justify-content: center; }
.card-img.fit-contain img { width: 70%; height: 52%; object-fit: contain; padding: 0; }

/* Work and home grids: tiles 20% smaller, the freed space goes between them; more space between rows */
@media (min-width: 981px) {
  .card-grid { grid-template-columns: repeat(3, calc((100% - 56px) / 3 * 0.8)); justify-content: space-between; row-gap: 64px; }
}
@media (max-width: 980px) {
  .card-grid { row-gap: 44px; }
}

/* Business cards: one card that flips between front and back */
.shot.flip { cursor: pointer; perspective: 1600px; max-width: min(100%, 560px); }
.flip-inner { display: grid; transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.flip-inner img { grid-area: 1 / 1; width: 100%; height: auto; max-height: none; max-width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 1px 3px rgba(35, 32, 29, .12), 0 6px 18px rgba(35, 32, 29, .08); }
.flip-back { transform: rotateY(180deg); }
.shot.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-hint { margin-top: 10px; font-size: .8rem; letter-spacing: .04em; color: var(--muted); }
.shot.flip:hover .flip-hint { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
.lb.no-zoom .lb-img, .lb.no-zoom .lb-frame { cursor: default; }

/* "Have a project in mind?" band: darker warm beige instead of black */
.cta { background: #cdbfa9; color: var(--ink); }
.cta h2 { color: var(--ink); }
.cta p { color: #4a423a; }
.cta .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta .btn:hover { background: #8f380b; border-color: #8f380b; color: #fff; }

/* Menu bar: same darker beige as the contact band */
.site-header { background: rgba(205, 191, 169, .96); border-bottom-color: #bfb09a; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: #86340a; }

/* Contact page: top of the white box level with the capital letters of the gray intro line
   (same rule as project pages: cap top = 0.4475em below the top of a 1.6 line) */
.contact { --lead-fs: clamp(1.1rem, 1.8vw, 1.3rem); }
@media (min-width: 981px) {
  .contact { grid-template-rows: auto auto 1fr; row-gap: 0; }
  .contact-text { display: contents; }
  .contact-text > * { grid-column: 1; }
  .contact-text h1 { grid-row: 1; }
  .contact-text .lead { grid-row: 2; font-size: var(--lead-fs); line-height: 1.6; margin-top: 0; }
  .contact-more { grid-row: 3; }
  .contact .form { grid-column: 2; grid-row: 2 / span 2; align-self: start; margin-top: calc(var(--lead-fs) * 0.4475); }
}

/* Footer: the same warm beige as the menu bar, a touch lighter */
.site-footer { background: #d6cab7; border-top-color: #c6b8a2; color: #4f4842; }
.site-footer a { color: #8f380b; }

/* Menu bar and footer: one shared color, the menu beige a touch lighter */
:root { --chrome: #d6cab7; --chrome-line: #c6b8a2; }
.site-header { background: var(--chrome); border-bottom-color: var(--chrome-line); }
.site-footer { background: var(--chrome); border-top-color: var(--chrome-line); }

/* Testimonials: darker beige cards (same as menu and footer) with more space between them */
.quote { background: var(--chrome); border-color: var(--chrome-line); margin-bottom: 48px; }
.quote figcaption span { color: #4f4842; }
.masonry { column-gap: 48px; }
.grid.quotes { gap: 48px; }

/* ===== One type scale everywhere =====
   Gray intro lines match the project pages' intro; body text matches project body text. */
:root { --lead-fs: clamp(1rem, 1.62vw, 1.17rem); }
.lead, .ph-top .lead, .contact-text .lead { font-size: var(--lead-fs); line-height: 1.3; }
.project-body, .contact { --lead-fs: clamp(1rem, 1.62vw, 1.17rem); }
main p:not(.lead):not(.eyebrow):not(.crumbs):not(.small):not(.flip-hint):not(.lb-count),
main li, main dd { font-size: 13.8px; line-height: 1.5; }
/* quotes keep their own sizes */
.quote blockquote p { font-size: 1.02rem; line-height: 1.55; }
.quote-large blockquote p { font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.55; }
/* contact box: cap top of a 1.3 line is 0.65em - 0.3525em = 0.2975em below the line top */
@media (min-width: 981px) {
  .contact-text .lead { line-height: 1.3; }
  .contact .form { margin-top: calc(var(--lead-fs) * 0.2975); }
}
.small { font-size: 12.5px; line-height: 1.5; }
main .btn:not(.btn-small) { font-size: 17px; }

/* About photo: smaller square with the testimonial's orange bar; top aligned to the
   capital letters of the gray intro line (cap top of a 1.3 line = 0.2975em) */
.portrait { aspect-ratio: 1 / 1; object-fit: cover; object-position: 44% 40%;
  width: 100%; max-width: 340px; border-left: 7px solid var(--accent-bright); }
@media (min-width: 981px) {
  .about { grid-template-rows: auto auto 1fr; row-gap: 0; }
  .about-text { display: contents; }
  .about-text > * { grid-column: 1; }
  .about-text h1 { grid-row: 1; }
  .about-text .lead { grid-row: 2; margin-top: 0; }
  .about-more { grid-row: 3; }
  .about .portrait { grid-column: 2; grid-row: 2 / span 2; align-self: start;
    margin-top: calc(var(--lead-fs) * 0.2975); }
}

/* Work page category pills in the site orange */
.chips a { color: var(--accent); border-color: var(--accent); }
.chips a:hover, .chips a:focus-visible { background: var(--accent); color: #fff; }

/* every testimonial card gets the same 7px orange strip as the project quotes and the About photo */
.quote { border-left: 7px solid var(--accent-bright); }
