/* Sarah-Marie Photography */
:root {
  --ink: #292929;
  --soft: #5d5b5b;
  --muted: #8a8888;
  --header: #d1d1d1;
  --band: #d9d9d9;
  --line: #dcdcdc;
  --accent: #ac5d5d;
  --serif: 'Playfair Display', Georgia, serif;
  --italic: 'Bodoni Moda', 'Didot', Georgia, serif;
  --garamond: 'Cormorant Garamond', Garamond, Georgia, serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 300 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.4em; }
button { font: inherit; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Images fade in as they load */
.js img[loading="lazy"] { opacity: 0; transition: opacity .6s ease; }
.js img[loading="lazy"].is-loaded { opacity: 1; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(209,209,209,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow .3s ease; }
.site-header__inner { max-width: 1280px; margin: 0 auto; padding: 42px 24px 36px; text-align: center; transition: padding .35s ease; }
.logo { display: inline-block; font: 400 40px/1.15 var(--serif); letter-spacing: 4px; text-transform: uppercase; text-decoration: none; transition: font-size .35s ease, letter-spacing .35s ease; }
.nav { margin-top: 22px; display: flex; justify-content: center; gap: 30px; transition: margin .35s ease; }
.nav a { font: italic 400 16px/1.4 var(--italic); text-decoration: none; transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--soft); }
.nav a[aria-current="page"] { opacity: .75; }
.header-social { position: absolute; top: 14px; right: 14px; display: flex; gap: 10px; }
.header-social a, .footer-social a { color: #8a8a8a; display: block; transition: color .2s; }
.header-social a:hover, .footer-social a:hover { color: var(--ink); }
.header-social svg { width: 24px; height: 24px; display: block; }

.is-scrolled .site-header { box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.is-scrolled .site-header__inner { padding-top: 14px; padding-bottom: 12px; }
.is-scrolled .logo { font-size: 26px; letter-spacing: 3px; }
.is-scrolled .nav { margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 56px 20px 40px; color: var(--soft); }
.site-footer p { margin: 0; font-size: 16px; }
.footer-social { display: flex; justify-content: center; gap: 12px; margin: 18px 0 16px; }
.footer-social svg { width: 34px; height: 34px; display: block; }
.site-footer .copy { font-size: 13px; }

/* ---------- shared ---------- */
.display { font: 400 54px/1.15 var(--serif); margin: 0; text-align: center; }
.band { background: var(--band); padding: 26px 20px; }
.band--tall { padding: 58px 20px; }

/* ---------- portfolio ---------- */
.tagline { font: italic 400 30px/1.3 var(--italic); text-align: center; margin: 26px 20px 28px; }
.portfolio { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { all: unset; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; cursor: zoom-in; background: #eee; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .6s ease; }
.tile:hover img { transform: scale(1.035); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* ---------- about ---------- */
.about-intro { max-width: 980px; margin: 0 auto; padding: 52px 24px 30px; text-align: center; }
.about-hero { margin: 0 auto 80px; max-width: 930px; border: 5px solid var(--soft); }
.about-hero img { width: 100%; aspect-ratio: 920 / 420; object-fit: cover; object-position: 50% 0; }
.about-copy { max-width: 700px; margin: 34px auto 0; color: var(--soft); font-size: 18px; line-height: 1.8; }
.about-copy p { margin-bottom: 1.8em; }
.about-copy a { text-underline-offset: 3px; }
.process { max-width: 1140px; margin: 0 auto; padding: 52px 24px 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.step__img { aspect-ratio: 306 / 226; overflow: hidden; background: #eee; }
.step__img img { width: 100%; height: 100%; object-fit: cover; }
.step h3 { font: italic 400 21px/1.3 var(--italic); margin: 22px 8px 14px; }
.step p { margin: 0 8px; font-size: 16px; line-height: 1.8; color: var(--soft); }
.step a { text-underline-offset: 3px; }

/* ---------- investment ---------- */
.wide-hero { margin: 0; }
.wide-hero img { width: 100%; height: min(580px, 52vw); object-fit: cover; object-position: 52% 58%; }
.work { max-width: 1180px; margin: 0 auto; padding: 80px 24px 40px; display: grid; grid-template-columns: 190px minmax(0, 360px) minmax(0, 340px); gap: 20px 56px; justify-content: center; }
.work__title { font: 400 38px/1.3 var(--serif); margin: 0; }
.work__copy { font: 300 18px/1.3 var(--garamond); letter-spacing: .01em; }
.work__copy p { margin: 0 0 1.25em; }
.contact { display: grid; gap: 26px; align-content: start; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact label span { display: block; font-size: 14px; font-weight: 400; color: var(--ink); margin-bottom: 2px; }
.contact input, .contact textarea { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 8px 2px; font: 300 16px/1.5 var(--sans); color: var(--ink); border-radius: 0; resize: none; }
.contact input:focus, .contact textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.contact .is-invalid { border-bottom-color: #c0392b; }
.contact__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.contact__status { margin: 0; font-size: 14px; color: var(--soft); }
.contact button { background: var(--accent); color: #fff; border: 0; width: 112px; height: 36px; cursor: pointer; font-size: 15px; transition: background .2s; flex: none; }
.contact button:hover { background: #964d4d; }
.contact button[disabled] { opacity: .6; cursor: progress; }

/* ---------- blog ---------- */
.blog-nav { max-width: 988px; margin: 0 auto; padding: 30px 24px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.blog-nav__cats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 30px; font-size: 15px; }
.page-blog .blog-nav__cats { font-size: 16px; }
.blog-nav__cats > a, .blog-nav__more summary { text-decoration: none; color: var(--soft); cursor: pointer; transition: color .2s; }
.blog-nav__cats > a:hover, .blog-nav__more summary:hover { color: var(--ink); }
.blog-nav a[aria-current="page"], .blog-nav__more[data-active] summary { color: var(--accent); }
.blog-nav__more { position: relative; }
.blog-nav__more summary { list-style: none; }
.blog-nav__more summary::-webkit-details-marker { display: none; }
.blog-nav__more summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.blog-nav__menu { position: absolute; z-index: 20; top: calc(100% + 10px); left: -16px; background: #fff; border: 1px solid var(--line); padding: 10px 0; min-width: 230px; max-height: 60vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.blog-nav__menu a { display: block; padding: 5px 18px; text-decoration: none; color: var(--soft); }
.blog-nav__menu a:hover { color: var(--ink); background: #f6f6f6; }
.blog-search { position: relative; flex: none; width: 34px; height: 34px; }
.blog-search input { position: absolute; right: 0; top: 0; z-index: 5; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 0; padding: 0 34px 0 0; font: 300 15px var(--sans); color: transparent; background: transparent; transition: width .3s ease, border-color .3s ease, background-color .3s ease; cursor: pointer; -webkit-appearance: none; }
.blog-search input::placeholder { color: transparent; }
.blog-search input:focus, .blog-search input:not(:placeholder-shown) { width: 280px; padding-left: 12px; color: var(--ink); background: #fff; border-color: var(--line); cursor: text; outline: none; box-shadow: -24px 0 16px -4px #fff; }
.blog-search input:focus::placeholder { color: var(--muted); }
.blog-search input::-webkit-search-cancel-button { -webkit-appearance: none; height: 12px; width: 12px; margin-right: 6px; cursor: pointer; background: linear-gradient(45deg, transparent 45%, var(--soft) 45%, var(--soft) 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--soft) 45%, var(--soft) 55%, transparent 55%); }
.blog-search svg { position: absolute; z-index: 6; right: 8px; top: 8px; width: 18px; height: 18px; pointer-events: none; color: var(--ink); }

.blog-wrap { max-width: 988px; margin: 0 auto; padding: 0 24px 20px; }
.blog-heading { font: 400 34px/1.2 var(--serif); margin: 4px 0 28px; }
.post-list, .search-results { display: grid; gap: 32px; }
.card { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); min-height: 340px; background: #fff; transition: box-shadow .3s ease; }
.card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.06); }
.card__img { display: block; position: relative; overflow: hidden; background: #f1f1f1; min-height: 340px; }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .6s ease; }
.card:hover .card__img img { transform: scale(1.03); }
.card__ph { display: block; position: absolute; inset: 0; background: #eee; }
.card__body { padding: 30px 36px 34px; }
.card__title { font: 400 28px/1.3 var(--serif); margin: 18px 0 14px; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--soft); }
.card__excerpt { color: var(--ink); margin: 0; }

.post-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 1.5; }
.post-meta svg { width: 32px; height: 32px; flex: none; }
.post-meta__author, .post-meta__line { display: block; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 44px 0 10px; font-size: 15px; }
.pager a, .pager span { padding: 4px 10px; text-decoration: none; color: var(--soft); }
.pager a:hover { color: var(--ink); }
.pager span[aria-current] { color: var(--accent); }
.pager .pager__gap { color: var(--muted); }
.search-results .empty { text-align: center; color: var(--soft); padding: 30px 0; }

/* ---------- post ---------- */
.post { border: 1px solid var(--line); padding: 60px 100px 30px; }
.post .post-meta { font-size: 14px; }
.post .post-meta__author, .post .post-meta__line { display: inline; }
.post .post-meta__author::after { content: ' · '; }
.post__title { font: 400 40px/1.4 var(--serif); margin: 26px 0 26px; }
.post__body { font-size: 17px; line-height: 1.7; }
.post__body p { margin: 0 0 1.25em; overflow-wrap: anywhere; }
.post__body a { text-underline-offset: 3px; }
.post__body figure { margin: 32px 0; }
.post__body figure img { width: 100%; cursor: zoom-in; }
.post__body figure a img { cursor: pointer; }
.post__body figcaption { text-align: center; font-size: 14px; color: var(--soft); margin-top: 8px; }
.post__body h2, .post__body h3, .post__body h4 { font-family: var(--serif); font-weight: 400; line-height: 1.3; margin: 1.4em 0 .6em; }
.post__body blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); font-style: italic; }
.post__body ol, .post__body ul { padding-left: 1.4em; margin: 0 0 1.25em; }
.post__cats { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; }
.post__cats li + li::before { content: '·'; margin: 0 8px; }
.post__cats a { text-underline-offset: 3px; }
.post__share { display: flex; gap: 26px; align-items: center; border-top: 1px solid var(--line); margin-top: 30px; padding: 20px 0 0; }
.post__share a, .post__share button { color: var(--ink); display: block; background: none; border: 0; padding: 0; cursor: pointer; }
.post__share svg { width: 19px; height: 19px; display: block; }
.post__share a:hover, .post__share button:hover { color: var(--accent); }
.copy-link.is-copied::after { content: 'Link copied'; font-size: 13px; margin-left: 8px; color: var(--soft); }
.copy-link.is-copied { display: flex !important; align-items: center; }

.recent { margin-top: 30px; }
.recent__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.recent__head h2 { font: 400 18px var(--serif); margin: 0; }
.recent__head a { font-size: 14px; text-decoration: none; }
.recent__head a:hover { text-decoration: underline; }
.recent__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.mini { display: block; border: 1px solid var(--line); text-decoration: none; transition: box-shadow .3s ease; }
.mini:hover { box-shadow: 0 8px 28px rgba(0,0,0,.06); }
.mini img, .mini .card__ph { width: 100%; aspect-ratio: 290 / 162; object-fit: cover; min-height: 0; }
.mini__title { display: block; font: 400 18px/1.35 var(--serif); padding: 22px 24px 28px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 110px 24px 70px; }
.notfound .display { font-size: 44px; margin-bottom: 18px; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(255,255,255,.97); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
.lb.is-open { opacity: 1; visibility: visible; }
.lb__img { max-width: calc(100vw - 160px); max-height: calc(100vh - 100px); width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.08); transition: opacity .25s ease; }
.lb__img.is-swapping { opacity: 0; }
.lb button { position: absolute; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 14px; line-height: 0; }
.lb button svg { width: 26px; height: 26px; }
.lb__close { top: 14px; right: 14px; }
.lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--soft); letter-spacing: .08em; }
.lb-open { overflow: hidden; }
.lb button:focus:not(:focus-visible) { outline: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .work { grid-template-columns: 1fr 1fr; }
  .work__title { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .post { padding: 40px 36px 24px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .site-header__inner { padding: 26px 70px 20px; }
  .logo { font-size: 24px; letter-spacing: 2.5px; }
  .nav { margin-top: 10px; gap: 22px; }
  .header-social { top: 10px; right: 8px; gap: 6px; }
  .header-social svg { width: 20px; height: 20px; }
  .is-scrolled .site-header__inner { padding-top: 10px; padding-bottom: 10px; }
  .is-scrolled .logo { font-size: 18px; letter-spacing: 2px; }
  .tagline { font-size: 22px; margin: 20px 16px; }
  .portfolio { gap: 6px; }
  .display { font-size: 38px; }
  .about-intro { padding-top: 28px; }
  .about-copy { font-size: 17px; }
  .about-hero { margin-bottom: 40px; border-width: 4px; }
  .process { grid-template-columns: 1fr; gap: 44px; max-width: 460px; }
  .wide-hero img { height: 62vw; }
  .band--tall { padding: 36px 20px; }
  .work { grid-template-columns: 1fr; padding-top: 44px; gap: 18px; }
  .work__title { font-size: 32px; }
  .contact .row { grid-template-columns: 1fr; gap: 26px; }
  .blog-nav { flex-direction: column; align-items: stretch; padding: 18px 16px 18px; }
  .page-blog .blog-nav__cats, .blog-nav__cats { font-size: 15px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; flex-wrap: nowrap; overflow-x: auto; gap: 24px; padding-bottom: 6px; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .blog-nav__menu { position: fixed; top: auto; left: 16px; right: 16px; }
  .blog-search { width: 100%; }
  .blog-search input::placeholder { color: var(--muted); }
  .blog-search input, .blog-search input:focus, .blog-search input:not(:placeholder-shown) { position: static; width: 100%; padding-left: 12px; color: var(--ink); box-shadow: none; border-color: var(--line); padding-right: 34px; }
  .blog-wrap { padding: 0 16px 10px; }
  .card { grid-template-columns: 1fr; min-height: 0; }
  .card__img { min-height: 0; aspect-ratio: 4 / 3; }
  .card__body { padding: 22px 22px 26px; }
  .card__title { font-size: 24px; }
  .post { padding: 28px 20px 20px; border-left: 0; border-right: 0; }
  .post__title { font-size: 30px; }
  .post__body { font-size: 16px; }
  .recent__grid { grid-template-columns: 1fr; gap: 20px; }
  .lb__img { max-width: 100vw; max-height: calc(100vh - 120px); box-shadow: none; }
  .lb__prev, .lb__next { top: auto; bottom: 4px; transform: none; }
}
@media (max-width: 600px) {
  .portfolio { grid-template-columns: 1fr; gap: 12px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
