/* Mark Ketch Photography — design system
   Apple-inspired: system type, generous space, frosted nav, quiet motion. */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0066cc;
  --btn: #1d1d1f;
  --btn-text: #ffffff;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
  --narrow: 720px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #0b0b0c;
    --surface: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383c;
    --accent: #2997ff;
    --btn: #f5f5f7;
    --btn-text: #1d1d1f;
    --nav-bg: rgba(0, 0, 0, 0.72);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0b0b0c;
  --surface: #161617;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383c;
  --accent: #2997ff;
  --btn: #f5f5f7;
  --btn-text: #1d1d1f;
  --nav-bg: rgba(0, 0, 0, 0.72);
  color-scheme: dark;
}
/* The portfolio always shows on black, like a gallery wall. */
body.dark-page {
  --bg: #000; --bg-alt: #0b0b0c; --surface: #161617; --text: #f5f5f7; --muted: #a1a1a6;
  --line: #38383c; --accent: #2997ff; --btn: #f5f5f7; --btn-text: #1d1d1f; --nav-bg: rgba(0,0,0,.72);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 var(--font); letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(40px, 7vw, 80px); }
h2 { font-size: clamp(30px, 4.5vw, 48px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); margin-inline: auto; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; max-width: 40ch; margin: 18px 0 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--btn); color: var(--btn-text); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid color-mix(in srgb, var(--line) 60%, transparent); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 52px;
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; padding-top: env(safe-area-inset-top); }
.wordmark { color: var(--text); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.wordmark:hover { text-decoration: none; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text); opacity: 0.8; font-size: 14px; transition: opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current] { opacity: 1; text-decoration: none; }
.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 13px; width: 18px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), top .35s var(--ease); }
.nav-toggle span:first-child { top: 18px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }
.menu { display: none; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .menu { display: grid; gap: 4px; padding: 8px var(--gutter) 28px; max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .45s var(--ease), opacity .3s; }
  .menu a { color: var(--text); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; padding: 6px 0; }
  .nav.open .menu { max-height: 400px; opacity: 1; }
  .nav.open { background: var(--bg); }
}

/* ---------- Buttons & links ---------- */
.btn { display: inline-block; background: var(--btn); color: var(--btn-text); font-size: 17px; font-weight: 500;
  padding: 12px 24px; border-radius: 980px; border: 0; cursor: pointer; transition: transform .2s var(--ease), opacity .2s; }
.btn:hover { text-decoration: none; opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-light { background: rgba(255,255,255,.92); color: #1d1d1f; }
.btn-block { width: 100%; padding: 15px; }
.link { font-size: 17px; }
.link-light { color: #fff; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }

/* ---------- Hero ---------- */
.hero, .story-hero { position: relative; height: min(100svh, 1000px); min-height: 520px; overflow: hidden; margin-top: -53px; color: #fff; background: #000; }
.story-hero { height: min(82svh, 860px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero-shade, .promo-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: clamp(40px, 9vh, 96px); }
.hero-copy .eyebrow { color: rgba(255,255,255,.8); }
.hero-copy h1 { max-width: 14ch; }
.hero-sub { font-size: clamp(19px, 2.2vw, 24px); color: rgba(255,255,255,.85); max-width: 34ch; margin: 18px 0 28px; }

/* ---------- Sections ---------- */
.statement { padding: clamp(80px, 14vw, 160px) 0; }
.statement p { font-size: clamp(26px, 3.6vw, 40px); font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; }
.statement p + p { font-size: clamp(19px, 2vw, 22px); font-weight: 400; line-height: 1.5; color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head { padding: clamp(64px, 11vw, 140px) 0 clamp(40px, 6vw, 72px); }
.cta { text-align: center; padding: clamp(80px, 12vw, 150px) 0; }
.cta h2 { margin-bottom: 14px; }
.cta p { font-size: 19px; max-width: 46ch; margin: 0 auto 28px; }
.cta .link { display: inline-block; margin-bottom: 28px; }

/* ---------- Galleries ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature-grid .tile:first-child { grid-column: 1 / -1; }
.feature-grid .tile img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.feature-grid .tile:first-child img { aspect-ratio: 16 / 9; }
.masonry { columns: 3 320px; column-gap: 16px; }
.masonry .tile { break-inside: avoid; margin: 0 0 16px; }
.tile { margin: 0; }
.tile a { display: block; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-alt); }
.tile img { width: 100%; transition: transform .8s var(--ease), opacity .4s; }
.tile a:hover img { transform: scale(1.025); }
.tile figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 10px 2px 0; }
.masonry .tile figcaption { display: none; }
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .masonry { column-gap: 0; } .masonry .tile { margin-bottom: 12px; }
}
.img-missing { aspect-ratio: 3/2; background: var(--bg-alt); }

/* ---------- Promo card ---------- */
.promo { padding-top: clamp(80px, 10vw, 120px); }
.promo-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: #fff; height: clamp(440px, 56vw, 640px); background: #000; }
.promo-card:hover { text-decoration: none; }
.promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.promo-card:hover img { transform: scale(1.03); }
.promo-copy { position: absolute; left: clamp(24px, 5vw, 56px); right: clamp(24px, 5vw, 56px); bottom: clamp(28px, 5vw, 56px); }
.promo-copy .eyebrow { color: rgba(255,255,255,.8); }
.promo-copy h2 { max-width: 18ch; margin-bottom: 18px; }

/* ---------- Weddings ---------- */
.approach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 24px 0 clamp(80px, 10vw, 120px); border-top: 0.5px solid var(--line); padding-top: 48px; }
.approach h3 { margin-bottom: 10px; }
@media (max-width: 760px) { .approach { grid-template-columns: 1fr; gap: 28px; } }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 40px 24px; }
.story-card { color: var(--text); }
.story-card:hover { text-decoration: none; }
.story-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--bg-alt); }
.story-img img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 1s var(--ease); }
.story-card:hover .story-img img { transform: scale(1.03); }
.story-card h3 { margin-bottom: 4px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(48px, 8vw, 110px) 0 clamp(80px, 10vw, 140px); }
.about-img { border-radius: var(--radius); overflow: hidden; }
.about-img img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-copy h1 { font-size: clamp(40px, 5.5vw, 64px); margin-bottom: 28px; }
.prose p { font-size: 19px; line-height: 1.55; color: var(--muted); }
.prose h2 { font-size: 24px; margin: 1.8em 0 .5em; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; padding-bottom: 32px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { resize: vertical; min-height: 140px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg-alt); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: 9px 4px; font-size: 14px; font-weight: 500; border-radius: 9px; transition: background .25s var(--ease), box-shadow .25s; }
.segmented input:checked + span { background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.wedding-only { display: none; }
.form.is-wedding .wedding-only { display: grid; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; }
.form-status { text-align: center; min-height: 1.4em; margin: 0; font-size: 15px; }
.form-status.ok { color: #1d8f45; } .form-status.err { color: #d70015; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); font-size: 14px; padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 0.5px solid var(--line); }
.footer-name { font-weight: 600; margin: 0 0 4px; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: start; }
.footer-links a { color: var(--muted); }
.legal { padding-top: 16px; font-size: 12px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.96); display: grid; place-items: center; touch-action: pan-y; animation: fade .25s var(--ease); }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 14px; width: 100%; padding: 0 var(--gutter); }
.lb-figure img { max-width: 100%; max-height: calc(100svh - 120px); width: auto; object-fit: contain; border-radius: 6px; transition: opacity .25s, transform .25s var(--ease); }
.lb-figure figcaption { color: #a1a1a6; font-size: 14px; text-align: center; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 26px; line-height: 1; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); transform: none; } }
body.lb-open { overflow: hidden; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-img { transform: none; }
}

/* ---------- Transparent nav over full-bleed heroes ---------- */
.over-hero .nav:not(.scrolled):not(.open) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.over-hero .nav:not(.scrolled):not(.open) .wordmark,
.over-hero .nav:not(.scrolled):not(.open) .nav-links a { color: #fff; }
.over-hero .nav:not(.scrolled):not(.open) .nav-toggle span { background: #fff; }
.nav { transition: background .35s var(--ease), border-color .35s; }
