/* Madison May Photography: the one stylesheet.
   Plain and quiet so the photos lead: white page, black type, one font
   (Inter, served from /assets/fonts), no colors but a light grey card. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter.woff2) format('woff2');
}

:root {
  --ink: #000;
  --muted: #6b6b6b;
  --line: #a8a6a1;
  --card: #dfe0e1;
  --bg: #fff;
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: 6vw;              /* page edges: 4vw on desktop */
  --gap: 3px;                 /* between gallery photos: 17px on desktop */
  --title: 23px;              /* site name in the header */
  --h1: 34px;                 /* page headings (About, Contact) */
  --h2: 24px;                 /* session names */
  --text: 16px;
  --small: 14px;
  --header-h: 112px;
}
@media (min-width: 768px) {
  :root {
    --gutter: 4vw;
    --gap: 17px;
    --title: clamp(24px, 2.45vw, 32px);
    --h1: clamp(34px, 3.4vw, 44px);
    --h2: 28px;
    --header-h: 120px;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--text)/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
p { margin: 0 0 1.2em; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header: the name, then the menu beside it; icons at the right.
   It stays at the top, slides away while scrolling down and comes back on
   any scroll up (site.js sets .tucked). */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0 40px;
  min-height: var(--header-h);
  padding: 20px var(--gutter);
  background: var(--bg);
  transition: transform .35s ease;
}
.site-header.tucked { transform: translateY(-100%); }
.site-title {
  font-size: var(--title); font-weight: 700; line-height: 1.5;
  text-transform: uppercase; text-decoration: none; letter-spacing: -0.005em;
  flex: 0 1 auto;
}
@media (min-width: 768px) { .site-title { line-height: 1.4; } }
.nav { display: none; flex-wrap: wrap; gap: 4px 20px; flex: 1; }
.nav a { text-decoration: none; line-height: 1.6; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: currentColor; }
.header-icons { display: none; margin-left: auto; }
.icon { display: inline-flex; width: 24px; height: 24px; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.icon svg .dot { fill: currentColor; stroke: none; }

.burger {
  margin-left: auto; width: 44px; height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer; position: relative;
}
.burger span {
  position: absolute; left: 4px; right: 4px; height: 1px; background: var(--ink);
  transition: transform .25s ease, top .25s ease;
}
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 27px; }
.menu-open .burger span:first-child { top: 21px; transform: rotate(45deg); left: 7px; right: 7px; }
.menu-open .burger span:last-child { top: 21px; transform: rotate(-45deg); left: 7px; right: 7px; }

@media (min-width: 1024px) {
  .nav, .header-icons { display: flex; }
  .burger { display: none; }
}

/* Phone menu: the whole screen, big centered links, Instagram at the foot. */
.mobile-nav {
  position: fixed; inset: 0; z-index: 15; background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mobile-nav nav a { font-size: 32px; line-height: 1.7; text-decoration: none; }
.mobile-nav nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.mobile-icons { margin-top: auto; padding-top: 32px; }
.menu-open { overflow: hidden; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---------- Pages */
main { padding: 24px var(--gutter) 96px; min-height: 50vh; }
@media (min-width: 768px) { main { padding-top: 51px; padding-bottom: 120px; } }

/* Galleries: a masonry of photos at their own shapes. Without JavaScript
   it's CSS columns; site.js deals the photos into columns left to right so
   the first ones sit along the top, as people read. */
.masonry { columns: 2; column-gap: var(--gap); }
.masonry figure { margin: 0 0 var(--gap); break-inside: avoid; background: #eeedeb; aspect-ratio: var(--ar); }
.masonry img { width: 100%; height: 100%; object-fit: cover; }
.masonry.dealt { columns: auto; display: flex; gap: var(--gap); align-items: flex-start; }
.masonry.dealt .col { flex: 1; min-width: 0; }
@media (min-width: 640px) { .masonry { columns: 3; } }
@media (min-width: 900px) { .masonry { columns: 4; } }
@media (min-width: 1200px) { .masonry { columns: 5; } }

/* About: a big photo with a grey card overlapping it on the right. */
.about { display: grid; }
.about-card { background: var(--card); padding: 40px 28px 32px; }
.about-card h1 { text-transform: uppercase; }
@media (min-width: 768px) {
  .about { grid-template-columns: repeat(20, 1fr); padding-top: 32px; }
  .about-photo { grid-column: 1 / 15; grid-row: 1; }
  .about-card { grid-column: 12 / 21; grid-row: 1; align-self: start; margin-top: 72px; padding: 48px; z-index: 1; }
}

/* Contact: centered, narrow. */
.contact-page { text-align: center; padding-top: 48px; }
.contact-page .lede { max-width: 30em; margin: 0 auto 32px; }
.elsewhere { margin: 40px 0 12px; }
.icon.boxed { width: 32px; height: 32px; padding: 5px; border: 1.5px solid currentColor; border-radius: 6px; }

/* Buttons: square outlines; they fill black on hover. */
.btn {
  display: inline-block; padding: 16px 32px; border: 2px solid var(--ink);
  background: none; color: var(--ink); font: 500 var(--text)/1.2 var(--font);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn.outline { color: var(--line); border-color: var(--line); }
.btn.outline:hover { background: none; color: var(--ink); border-color: var(--ink); }

/* The contact form: underlined fields, left aligned in a centered column. */
.form { max-width: 520px; margin: 0 auto; text-align: left; display: grid; gap: 22px; }
.field { display: grid; gap: 4px; }
.label { font-size: var(--small); }
.opt { color: var(--muted); }
.form input:not([type=radio]), .form textarea {
  font: inherit; color: inherit; background: none; width: 100%;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 8px 0;
}
.form textarea { border: 1px solid var(--ink); padding: 10px 12px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
.form textarea:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics legend { margin-bottom: 8px; padding: 0; }
.topics label { position: relative; }
.topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topics span { display: inline-block; padding: 6px 14px; border: 1px solid var(--ink); font-size: var(--small); line-height: 1.5; }
.topics input:checked + span { background: var(--ink); color: #fff; }
.topics input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form-status { margin: 0; }
.form-status.error { color: #9b1c1c; }

/* Sessions: one per row, photo left, words right (stacked on phones). */
.session { display: grid; gap: 20px; padding: 8px 0 48px; }
.session + .session { border-top: 1px solid #e6e6e6; padding-top: 48px; }
.session-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.session h2 { margin-bottom: .3em; }
.session-meta { color: var(--muted); }
.session-text .btn { margin-top: 8px; }
@media (min-width: 768px) {
  .session { grid-template-columns: minmax(0, 412fr) minmax(0, 732fr); gap: 34px; padding-bottom: 72px; }
  .session + .session { padding-top: 72px; }
}

/* ---------- Footer: the name left, Instagram right. */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 48px var(--gutter) 64px; font-size: var(--small);
}
.footer-name { margin: 0; text-transform: uppercase; }
