/* ============================================================
   Filippa Rosenquist - Portfolio (multi-page)
   Mobile-first. Base styles target a ~390px viewport,
   then scale up via min-width media queries.
   ============================================================ */

:root {
  --bg: #FFFFFF;        /* white */
  --ink: #1C1C1A;       /* near-black */
  --green: #2A5A42;     /* deep forest green */
  --muted: #B5AFA5;     /* dividers / secondary text on dark */
  --muted-text: #6B665D; /* accessible secondary text on light (>=4.5:1 on white) */
  --cream: #FAF7F2;
  --green-light: #7fb89c;

  --serif: "Libre Baskerville", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --pad: 1.5rem;        /* mobile gutter */
  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;          /* min 16px to prevent iOS auto-zoom */
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
p { margin: 0; }
em { font-style: italic; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Visible keyboard focus indicator (adapts to the element's text colour) */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Skip-to-content link for keyboard users */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 300;
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }

.btn, .nav__link, .nav__toggle, .filter, .social,
.mobile-nav__link, .contact__line, .cat-card {
  touch-action: manipulation;
}

/* ----------------------- Shared typography ----------------------- */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 1rem;
}
.eyebrow--green { color: var(--green); }
.eyebrow--light { color: var(--green-light); }

.section-heading {
  font-size: 2rem;
  letter-spacing: 0.01em;
}
.section-heading--light { color: var(--cream); }

.section-subline {
  margin-top: 0.85rem;
  font-weight: 300;
  color: #5a564f;
  max-width: 46ch;
}
.section-subline--light { color: rgba(250, 247, 242, 0.75); }

/* ----------------------------- Buttons --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn--ghost-light {
  color: var(--cream);
  border-color: rgba(250, 247, 242, 0.6);
}
.btn--ghost-light:hover, .btn--ghost-light:focus-visible {
  background: var(--cream); color: var(--ink); border-color: var(--cream);
}
.btn--ghost-dark {
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost-dark:hover, .btn--ghost-dark:focus-visible {
  background: var(--green); color: var(--cream); border-color: var(--green);
}
.btn--text {
  padding-left: 0.25rem; padding-right: 0.25rem;
  color: var(--green);
  border-bottom: 1px solid transparent;
  min-height: 44px;
}
.btn--text:hover, .btn--text:focus-visible { border-bottom-color: var(--green); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(28, 28, 26, 0.06);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav__logo { height: 38px; width: auto; display: block; }
/* Tint the dark logo white while it floats over the dark hero on home */
.home .nav:not(.is-scrolled) .nav__logo { filter: brightness(0) invert(1); }
.nav__links { display: none; }

/* On the homepage the nav floats over a dark hero - use light text
   until the user scrolls (then the cream bar kicks in). */
.home .nav:not(.is-scrolled) .nav__brand,
.home .nav:not(.is-scrolled) .nav__link { color: var(--cream); }
.home .nav:not(.is-scrolled) .nav__toggle span { background: var(--cream); }

/* Hamburger */
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
}
.nav__toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--cream); }
body.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--cream); }

/* Mobile overlay nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
body.menu-open .mobile-nav { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav__links {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  text-align: center;
}
.mobile-nav__link {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--cream);
  padding: 0.25rem 1rem;
}
.mobile-nav__link:active { color: var(--muted); }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: url("images/hero-option.webp") center / cover no-repeat;
}
.hero__overlay { position: absolute; inset: 0; background: rgba(28, 24, 20, 0.3); }
.hero__content {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) 16svh;
  text-align: left;
}
.hero__eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-light); margin-bottom: 1rem;
}
.hero__title { font-size: 2.8rem; color: var(--cream); max-width: 14ch; }
.hero__subline {
  margin-top: 1.1rem; font-weight: 300; font-size: 1.05rem;
  color: rgba(250, 247, 242, 0.92); max-width: 40ch;
}
.hero__cta { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.hero__cta .btn { width: 100%; }

/* Strip below hero */
.strip { background: var(--ink); color: var(--muted); text-align: center; padding: 1.1rem var(--pad); }
.strip p { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }

/* ============================================================
   PAGE HEADER (subpages)
   ============================================================ */
.page-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) var(--pad) 2.5rem;
}
.page-header__title { font-size: 2.3rem; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }
.page-header__subline {
  margin-top: 1rem; font-weight: 300; color: #5a564f; max-width: 46ch;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem var(--pad);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.about--page { padding-top: 1rem; }
.about__media { border-left: 3px solid var(--green); padding-left: 1rem; }
.about__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.about__caption {
  margin-top: 0.75rem; font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-text);
}
.about__text p { color: #3a382f; }
.about__text p + p { margin-top: 1rem; }
.about__lead { font-size: 1.1rem; color: var(--ink) !important; }
.about__block + .about__block { margin-top: 2rem; }
.about__heading { font-size: 1.5rem; margin-bottom: 0.9rem; }
.about__text > .btn--ghost-dark { margin-top: 2rem; }
.about__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* About page - single-column article, left-aligned to the page gutter */
.about-article { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--pad) 5rem; }
.about-article > * { max-width: 760px; }

.about-photo { margin: 0; }
.about-photo img { width: 100%; height: auto; display: block; }
.about-photo figcaption {
  margin-top: 0.75rem; font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-text);
}
.about-photo--portrait { max-width: 520px; border-left: 3px solid var(--green); padding-left: 1rem; margin-bottom: 2.5rem; }
.about-photo--feature { margin: 3rem 0; }
.about-photo--feature figcaption {
  margin-top: 0.85rem; font-family: var(--serif); font-style: italic;
  text-transform: none; letter-spacing: 0; font-size: 1.15rem; color: var(--green);
}

.about-story p, .about-whatido p { color: #3a382f; }
.about-story p + p, .about-whatido p + p { margin-top: 1rem; }
.story-lead { font-size: 1.15rem; color: var(--ink) !important; }

.about-whatido .eyebrow { margin-bottom: 0.75rem; }
.about-whatido .section-heading { margin-bottom: 1.25rem; }
.about-whatido .about__actions { margin-top: 2rem; }

/* ============================================================
   FEATURE band (Laurence)
   ============================================================ */
.feature {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--pad) 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature__text p { color: #3a382f; }
.feature__text p + p { margin-top: 1rem; }
.feature__cta { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.feature__cta .btn--ghost-dark { width: 100%; }

/* ============================================================
   SERVICES (dark)
   ============================================================ */
.services { background: var(--ink); color: var(--cream); padding: 4.5rem var(--pad); }
.services--full { background: var(--bg); color: var(--ink); padding-top: 1rem; padding-bottom: 1.5rem; }
.services--full + .work { padding-top: 2.5rem; }
.services__head { max-width: var(--maxw); margin: 0 auto 2.75rem; }
.services__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem;
}
.service { border-top: 2px solid var(--green); padding-top: 1.25rem; }
.service__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 1.5rem; }
.service__num {
  display: block; font-family: var(--serif); font-size: 0.85rem;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.6rem;
}
.service__title { font-size: 1.5rem; margin-bottom: 0.85rem; }
.services:not(.services--full) .service__title { color: var(--cream); }
.service__body { font-weight: 300; }
.services:not(.services--full) .service__body { color: rgba(250, 247, 242, 0.85); }
.services--full .service__body { color: #3a382f; }
.service__includes { margin-top: 1rem; font-size: 0.85rem; letter-spacing: 0.02em; color: #8f9d8f; }
.services--full .service__includes { color: var(--green); }
.services--full .service__num { color: var(--muted-text); }
.services__foot { max-width: var(--maxw); margin: 2.75rem auto 0; }

/* Tools strip (services page) */
.tools {
  max-width: var(--maxw);
  margin: 4rem auto 0;
  border-top: 1px solid var(--muted);
  padding-top: 2rem;
}
.tools__chips {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tools__chips li {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 100px;
  padding: 0.5rem 1.1rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tools__chips li:hover { background: var(--green); color: var(--cream); border-color: var(--green); }

/* ============================================================
   WORK I'VE BUILT
   ============================================================ */
.work { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem var(--pad); }
.work__head { margin-bottom: 2.75rem; }
.work__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.project { padding: 2rem 0; border-top: 1px solid var(--muted); }
.project__label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.9rem;
}
.project__name { font-size: 1.7rem; margin-bottom: 0.9rem; }
.project__desc { color: #3a382f; font-weight: 300; margin-bottom: 1.6rem; }
.project__cta { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.25rem; }
.project__cta .btn { width: 100%; }
.project__note { font-size: 0.8rem; color: var(--muted-text); }

/* ============================================================
   LEGAL PAGES (terms, accessibility, privacy, cookies)
   ============================================================ */
.legal { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--pad) 5rem; }
.legal__row {
  padding: 2rem 0;
  border-top: 1px solid var(--muted);
  display: flex; flex-direction: column; gap: 1rem;
}
.legal__heading { font-size: 1.4rem; }
.legal__body p, .legal__lead p { color: #3a382f; }
.legal__body p + p { margin-top: 1rem; }
.legal__body ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.legal__body li { color: #3a382f; margin-bottom: 0.45rem; }
.legal__lead { max-width: 60ch; padding-bottom: 1rem; }
.legal__intro { max-width: 640px; padding-top: 0.5rem; }
.legal__intro p { color: #3a382f; margin-bottom: 1.75rem; }

/* 404 page */
.notfound {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 5rem) var(--pad) 6rem;
  min-height: 60svh;
}
.notfound p.eyebrow { margin-bottom: 1rem; }
.notfound__sub { margin-top: 1rem; font-weight: 300; color: #3a382f; max-width: 46ch; }
.notfound__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ============================================================
   WRITING (creative writing excerpts)
   ============================================================ */
.writing { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--pad) 4.5rem; }
.writing__head { margin-bottom: 2.5rem; }
.writing__list { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
.excerpt {
  margin: 0;
  border-left: 3px solid var(--green);
  padding: 0.25rem 0 0.25rem 1.5rem;
}
.excerpt blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
}
.excerpt blockquote p { margin: 0; }
.excerpt blockquote p + p { margin-top: 1rem; }
.excerpt figcaption {
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* ============================================================
   PORTFOLIO PREVIEW (home) - category cards
   ============================================================ */
.port-preview { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem var(--pad); }
.port-preview__head { margin-bottom: 2rem; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.cat-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28, 24, 20, 0.6) 0%, rgba(28, 24, 20, 0.05) 55%);
}
.cat-card__label {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  padding: 1rem;
  font-family: var(--serif); font-size: 1.2rem; color: var(--cream);
}
.cat-card:active img { transform: scale(1.04); }
.port-preview__foot { margin-top: 2rem; }

/* ============================================================
   PORTFOLIO (gallery page)
   ============================================================ */
.portfolio { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--pad) 4.5rem; }
.filters {
  display: flex; flex-wrap: nowrap; gap: 0.5rem;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; -ms-overflow-style: none;
  margin-bottom: 2rem; padding-bottom: 0.25rem;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto; min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--muted); background: transparent; color: var(--muted-text);
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.filter.is-active { color: var(--cream); background: var(--green); border-color: var(--green); }

/* Masonry via CSS columns - images keep their natural proportions */
.gallery { columns: 1; column-gap: 0.75rem; }
.gallery__item {
  position: relative; overflow: hidden; cursor: pointer;
  break-inside: avoid; margin-bottom: 0.75rem;
}
.gallery__item img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(28, 24, 20, 0); transition: background-color 0.3s ease;
  pointer-events: none;
}
.gallery__item.is-hidden { display: none; }

/* ============================================================
   CONTACT (dark)
   ============================================================ */
.contact { background: var(--ink); color: var(--cream); padding: 5rem var(--pad); }
.contact__inner { max-width: var(--maxw); margin: 0 auto; }
.contact__details { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.contact__line {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--serif); font-size: 1.25rem; color: var(--cream); width: fit-content;
}
a.contact__line { border-bottom: 1px solid transparent; transition: border-color 0.2s ease, color 0.2s ease; }
a.contact__line:hover, a.contact__line:focus-visible { color: var(--green-light); border-color: var(--green-light); }
.contact__line--static { color: rgba(250, 247, 242, 0.7); }

.contact__socials { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(250, 247, 242, 0.3); color: var(--cream);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.social svg { width: 22px; height: 22px; fill: currentColor; }
.social:hover, .social:focus-visible { background: var(--green); border-color: var(--green); }

/* Contact form (Formspree) */
.contact__grid { display: flex; flex-direction: column; gap: 3rem; }
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form__field { display: flex; flex-direction: column; gap: 0.5rem; }
.form__label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-text);
}
.form__input {
  font-family: var(--sans);
  font-size: 16px;            /* 16px min to prevent iOS auto-zoom */
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 0;
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form__input::placeholder { color: #9a958c; }
.form__input:focus { outline: none; border-color: var(--green); }
.form__textarea { resize: vertical; min-height: 130px; }
.form__submit { align-self: flex-start; margin-top: 0.25rem; }
.form__status { margin-top: 0.25rem; font-size: 0.9rem; line-height: 1.5; }
.form__status:empty { display: none; }
.form__status--success { color: var(--green); }
.form__status--error { color: #b3261e; }
/* Honeypot - visually hidden, off-screen */
.form__hp {
  position: absolute !important;
  left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* Contact page - white form section */
.form-section { max-width: var(--maxw); margin: 0 auto; padding: 3rem var(--pad) 5rem; }
.form-section__inner { max-width: 640px; border-top: 1px solid var(--muted); padding-top: 2.5rem; }
.form-section .section-heading { margin: 0.4rem 0 1.75rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink); color: var(--muted);
  padding: 1.75rem var(--pad);
  border-top: 1px solid rgba(181, 175, 165, 0.18);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.footer__main { display: flex; flex-direction: column; gap: 1rem; }
.footer__copy { font-size: 0.85rem; }
.footer__links, .footer__legal { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; }
.footer__links a, .footer__legal a { font-size: 0.85rem; color: var(--muted); }
.footer__links a:hover, .footer__legal a:hover { color: var(--cream); }
.footer__legal { padding-top: 1.1rem; border-top: 1px solid rgba(181, 175, 165, 0.12); }
.footer__legal a { font-size: 0.8rem; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 14, 12, 0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s linear 0s; }
.lightbox__stage {
  max-width: 92vw; max-height: 86svh; padding: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__img {
  max-width: 100%; max-height: 84svh; width: auto; height: auto;
  object-fit: contain; user-select: none; -webkit-user-drag: none;
}
.lightbox__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 48px; height: 48px; border: none;
  background: rgba(0, 0, 0, 0.3); color: var(--cream);
  font-size: 2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: none;
  background: rgba(0, 0, 0, 0.3); color: var(--cream);
  font-size: 2rem; line-height: 1;
  display: none; align-items: center; justify-content: center;
}
.lightbox__nav--prev { left: 0.75rem; }
.lightbox__nav--next { right: 0.75rem; }

/* ============================================================
   ===============  TABLET  (>= 700px)  =======================
   ============================================================ */
@media (min-width: 700px) {
  :root { --pad: 2.5rem; }

  .section-heading { font-size: 2.5rem; }
  .page-header__title { font-size: 3.4rem; }

  /* Wide collage on desktop/tablet; the tall version stays on mobile */
  .hero { background-image: url("images/hero-desktop.webp"); background-position: center; }
  .hero__title { font-size: 4rem; }
  .hero__cta { flex-direction: row; }
  .hero__cta .btn { width: auto; }
  .hero__content { padding-bottom: 12svh; }

  .strip p { font-size: 0.8rem; }

  .feature { flex-direction: row; align-items: center; gap: 3.5rem; padding-bottom: 5.5rem; }
  .feature--reverse { flex-direction: row-reverse; }
  .feature__media { flex: 0 0 48%; }
  .feature__text { flex: 1; }
  .feature__cta { flex-direction: row; align-items: center; }
  .feature__cta .btn--ghost-dark { width: auto; }

  .services__grid { grid-template-columns: 1fr 1fr; gap: 3rem 3.5rem; }

  .work__grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .project__cta { flex-direction: row; flex-wrap: wrap; }
  .project__cta .btn { width: auto; }

  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }

  .gallery { columns: 2; column-gap: 1rem; }
  .gallery__item { margin-bottom: 1rem; }

  .writing__list { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* ============================================================
   ===============  DESKTOP  (>= 1000px)  =====================
   ============================================================ */
@media (min-width: 1000px) {
  .nav__links { display: flex; gap: 2rem; }
  .nav__link {
    position: relative; font-size: 0.9rem; font-weight: 500;
    letter-spacing: 0.04em; padding: 0.25rem 0; color: var(--ink);
  }
  .nav__link::after {
    content: ""; position: absolute; left: 0; bottom: -2px;
    width: 0; height: 2px; background: var(--green); transition: width 0.25s ease;
  }
  .nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
  /* keep the active underline visible against the dark hero on home */
  .home .nav:not(.is-scrolled) .nav__link::after { background: var(--green-light); }
  .nav__toggle { display: none; }

  .about {
    flex-direction: row; align-items: flex-start; gap: 4rem;
    padding: 6.5rem var(--pad);
  }
  .about--page { padding-top: 1rem; }
  .about__media { flex: 0 0 42%; position: sticky; top: calc(var(--nav-h) + 2rem); }
  .about__text { flex: 1; }

  .services, .work, .portfolio, .contact, .port-preview { padding-top: 6.5rem; padding-bottom: 6.5rem; }
  .services--full, .portfolio, .about--page { padding-top: 1rem; }
  .services--full { padding-bottom: 2rem; }
  .services--full + .work { padding-top: 3rem; }

  .gallery { columns: 3; }
  .writing__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

  .legal__row { flex-direction: row; gap: 4rem; }
  .legal__heading { flex: 0 0 32%; }
  .legal__body { flex: 1; }
  .gallery__item:hover img { transform: scale(1.04); }
  .gallery__item:hover::after { background: rgba(28, 24, 20, 0.25); }

  .cat-card:hover img { transform: scale(1.05); }

  .lightbox__nav { display: flex; }

  .contact__grid { flex-direction: row; gap: 5rem; align-items: start; }
  .contact__col { flex: 1; }

  .footer__main { flex-direction: row; align-items: center; justify-content: space-between; }

  .hero__title { font-size: 4.75rem; }
  .page-header__title { font-size: 4rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
