/* Mike Sharp Photography — public site */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
:root {
  --bg: #fff;
  --ink: #000;
  --muted: #555;
  --line: #e5e5e5;
  --gutter: 4vw;
  --gap: max(4px, .25vw);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 300; font-size: 1rem; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.2; letter-spacing: -.01em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 2.4rem var(--gutter) 2.2rem; position: relative; }
.site-title { font-size: clamp(1.35rem, 1rem + 1.3vw, 1.9rem); font-weight: 400; text-decoration: none; letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; font-size: .9rem; font-weight: 400; }
.site-nav a { text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: currentColor; }
.site-nav .nav-icon { display: inline-flex; border: 0 !important; }
.nav-toggle { display: none; width: 48px; height: 40px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 14px; } .nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 19.5px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 19.5px; transform: rotate(-45deg); }

@media (max-width: 767px) {
  :root { --gutter: 6vw; }
  .nav-toggle { display: block; z-index: 20; }
  .site-nav { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; gap: 1.4rem; font-size: 1.6rem; font-weight: 300; z-index: 10; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .site-header { padding-top: 1.8rem; padding-bottom: 1.8rem; }
  .site-title { position: relative; z-index: 20; }
}

main { padding: 0 var(--gutter) 4rem; min-height: 60vh; }

/* Home: portfolio grid */
.portfolio-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 2.2rem var(--gap); }
@media (min-width: 700px)  { .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.2vw; } }
@media (min-width: 1100px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
.portfolio-grid a { display: block; text-decoration: none; }
.frame { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f2f2f2; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.portfolio-grid a:hover .frame img { opacity: .85; }
.portfolio-title { display: block; text-align: center; margin-top: .9rem; font-size: clamp(1.05rem, .95rem + .5vw, 1.35rem); font-weight: 400; }

/* Gallery page */
.gallery-intro { max-width: 46rem; margin: 3rem 0 4rem; }
.gallery-intro h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin: 0 0 1.6rem; }
.gallery-intro p { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); line-height: 1.85; margin: 0 0 1em; }
.photo-grid { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 700px)  { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid a { display: block; overflow: hidden; background: #f2f2f2; cursor: zoom-in; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.photo-grid a:hover img { opacity: .88; }
.photo-grid--crop a { aspect-ratio: 16 / 9; }
.photo-grid--natural { align-items: start; }
.photo-grid--natural a { aspect-ratio: var(--ar, 3 / 2); }
.photo-grid--natural img { object-fit: contain; background: var(--bg); }
.gallery-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; font-weight: 400; }
.gallery-pager a { text-decoration: none; border-bottom: 1px solid transparent; }
.gallery-pager a:hover { border-bottom-color: currentColor; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.98); display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; height: 100dvh; padding: 3.5rem 0 3rem; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { margin-top: .8rem; font-size: .9rem; color: var(--muted); text-align: center; min-height: 1.4em; }
.lightbox button { background: none; border: 0; color: var(--ink); cursor: pointer; font: 300 3.4rem/1 var(--font); padding: .5rem 1rem; }
.lb-close { position: absolute; top: .8rem; right: 1rem; font-size: 2.2rem !important; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lb-count { position: absolute; top: 1.4rem; left: 1.4rem; margin: 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 699px) {
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { position: absolute; bottom: .6rem; }
  .lb-prev { left: 1rem; } .lb-next { right: 1rem; }
}

/* Pages */
.page { display: grid; gap: 3rem; margin: 2rem 0 2rem; }
.page--with-image { align-items: start; }
@media (min-width: 900px) { .page--with-image { grid-template-columns: 1fr 1fr; gap: 5vw; } }
.page-body { max-width: 40rem; }
.page-body h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); margin: 0 0 1.6rem; }
.page-body p { font-size: clamp(1rem, .95rem + .3vw, 1.12rem); line-height: 1.85; }
.page-image img { width: 100%; }

/* Contact form */
.contact-form { display: grid; gap: 1.1rem; margin-top: 2rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 400; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form input, .contact-form textarea { font: inherit; font-weight: 300; padding: .8rem .9rem; border: 1px solid #bbb; border-radius: 0; background: #fafafa; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; background: #fff; }
.contact-form button { justify-self: start; font: 400 1rem var(--font); background: var(--ink); color: var(--bg); border: 0; padding: .9rem 2.4rem; cursor: pointer; }
.contact-form button:hover { background: #333; }
.form-thanks, .notice { padding: 1rem 1.2rem; background: #f4f4f4; border-left: 3px solid var(--ink); }

/* Footer */
.site-footer { padding: 3rem var(--gutter) 3.5rem; border-top: 1px solid var(--line); margin-top: 2rem; font-size: .9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-weight: 400; margin-bottom: 1.4rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-note { max-width: 42rem; color: var(--muted); margin: 0 0 .6rem; }
.footer-copy { color: var(--muted); margin: 0; font-size: .8rem; }
.empty { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Cookie consent */
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.footer-copy a { color: inherit; }
.cookie-banner { position: fixed; z-index: 40; left: 1rem; right: 1rem; bottom: 1rem; max-width: 34rem; margin-left: auto;
  background: #fff; color: var(--ink); border: 1px solid #d6d6d6; box-shadow: 0 10px 40px rgba(0,0,0,.14); padding: 1.3rem 1.4rem 1.4rem; font-size: .92rem; line-height: 1.6; }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.05rem; font-weight: 500; margin: 0 0 .4rem; }
.cookie-banner p { margin: 0 0 .9rem; }
.cookie-status:empty { display: none; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cookie-actions button { font: 400 .9rem var(--font); padding: .8rem .6rem; cursor: pointer; background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.cookie-actions button:hover { background: #333; }
@media (max-width: 420px) { .cookie-actions { grid-template-columns: 1fr; } }
.form-privacy { font-size: .82rem; color: var(--muted); margin: 0; }
.form-privacy a { color: inherit; }
