/* Cary Photography. Warm paper, soft ink, and the photographs in charge. */

@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Special Elite'; src: url('/fonts/special-elite-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --paper: #faf7f2;
  --paper-deep: #f2ece3;
  --ink: #2a2623;
  --muted: #6e655d;
  --line: #e4dcd0;
  --accent: #9b6a4c;
  --accent-deep: #7d5238;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Jost', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --type: 'Special Elite', 'Courier New', monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.7 var(--sans); letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: 0.005em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px var(--gutter) 14px;
  border-bottom: 1px solid transparent; transition: border-color .3s, padding .3s;
}
/* The frosted background sits on its own layer: a backdrop filter on the header
   itself would trap the full-screen phone menu inside the header's box. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px); -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); padding-top: 14px; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1.1; }
.brand-name { font: 500 clamp(1.9rem, 3.6vw, 2.6rem)/1 var(--serif); letter-spacing: 0.02em; }
.brand-tag { font: 400 0.78rem/1 var(--sans); letter-spacing: 0.22em; color: var(--muted); margin-top: 8px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin: 0; padding: 0; }
.site-nav a { font-size: 0.92rem; letter-spacing: 0.06em; text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.menu-toggle { display: none; }

/* Buttons and links */
.button {
  display: inline-block; font: 500 0.9rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); background: var(--ink); border: 0; padding: 17px 30px; text-decoration: none; cursor: pointer;
  transition: background .25s, transform .25s;
}
.button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.text-link { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* Image placeholders: a blurred preview until the photograph arrives */
.ph { display: block; background: var(--ph) center / cover no-repeat, var(--paper-deep); overflow: hidden; }
.ph img { opacity: 0; transition: opacity .7s ease; }
.ph img.ld { opacity: 1; }

/* Home: hero */
/* Shown as she framed it: 3:2, centred on the page like a print, never wider
   than the photographs themselves. */
.hero { position: relative; width: min(calc(100% - 2 * var(--gutter)), calc(76vh * 1.5), 1650px); aspect-ratio: 3 / 2; margin: 6px auto 0; overflow: hidden; background: var(--paper-deep); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide .ph, .hero-slide img { width: 100%; height: 100%; }
.hero-slide img { object-fit: cover; }

.intro { max-width: 820px; margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter) clamp(40px, 6vw, 70px); text-align: center; }
.intro-lead { font: italic 400 clamp(1.7rem, 3.4vw, 2.5rem)/1.35 var(--serif); margin-bottom: 0.8em; }
.intro-sub { color: var(--muted); letter-spacing: 0.04em; }

/* Home: Love. Peace.. Happiness... */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.trio-card { text-decoration: none; display: flex; flex-direction: column; }
.trio-photo { aspect-ratio: 4 / 5; }
.trio-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .7s ease, transform 1.2s ease; }
.trio-card:hover .trio-photo img { transform: scale(1.035); }
.trio-title { font: 500 2.2rem/1.1 var(--serif); margin-top: 18px; }
.trio-sub { color: var(--muted); font-size: 0.95rem; letter-spacing: 0.04em; }

.meet-teaser { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; max-width: 960px; margin: clamp(80px, 11vw, 140px) auto; padding: 0 var(--gutter); }
.portrait { width: 220px; aspect-ratio: 1; border-radius: 50%; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.moments { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(14px, 2vw, 28px); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); align-items: center; }
.moments .ph img { width: 100%; }

.details-teaser { text-align: center; max-width: var(--max); margin: clamp(80px, 11vw, 140px) auto 0; padding: 0 var(--gutter); }
.price-row { list-style: none; padding: 0; margin: 10px 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-row li { padding: 30px 18px; display: flex; flex-direction: column; gap: 6px; }
.price-row li + li { border-left: 1px solid var(--line); }
.price { font: 500 2.6rem/1 var(--serif); }
.price-name { color: var(--muted); font-size: 0.95rem; }

.cta { text-align: center; padding: clamp(70px, 10vw, 120px) var(--gutter); }
.home .cta { background: var(--paper-deep); margin-top: clamp(80px, 11vw, 140px); }

/* Typed quotes, as on Cary's original cards */
.typed-quote { margin: 26px auto 0; max-width: 640px; font-family: var(--type); color: #3a3531; }
.typed-quote blockquote { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.6; }
.typed-quote figcaption { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.typed-quote.small blockquote { font-size: 1.02rem; }

/* Gallery pages */
.gallery-head { text-align: center; padding: clamp(36px, 6vw, 70px) var(--gutter) clamp(30px, 5vw, 56px); }
.gallery-sub { color: var(--muted); letter-spacing: 0.06em; }

/* Justified rows: each photograph grows in proportion to its shape. */
.justified { display: flex; flex-wrap: wrap; gap: 10px; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); --row: 260px; }
.justified::after { content: ''; flex-grow: 999; }
.tile { flex-grow: var(--r); flex-basis: calc(var(--row) * var(--r)); display: block; position: relative; cursor: zoom-in; max-width: 100%; }
.tile .ph { aspect-ratio: var(--r); width: 100%; height: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .7s ease, filter .3s; }
.tile:hover img { filter: brightness(1.06) saturate(1.04); }

.gallery-next { display: flex; justify-content: center; gap: 40px; padding: clamp(60px, 8vw, 100px) var(--gutter); }
.gallery-next a { font: 500 2rem/1 var(--serif); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.gallery-next a:hover { border-color: var(--accent); }

/* Lightbox */
.lightbox { padding: 0; border: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; max-height: 100dvh; height: 100dvh; background: rgba(26, 23, 21, 0.96); color: #f4efe8; }
.lightbox::backdrop { background: rgba(26, 23, 21, 0.96); }
.lightbox[open] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr); align-items: center; }
.lb-figure { grid-column: 2; grid-row: 1; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; height: 100%; padding: 48px 0 24px; }
.lb-figure picture { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.lb-figure picture > source { display: none; }
.lb-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.lb-caption { margin-top: 12px; color: #f4efe8; text-align: center; padding: 0 10px; }
.lb-line { display: block; font: italic clamp(1rem, 2.2vw, 1.3rem)/1.24 var(--serif); text-wrap: balance; }
.lb-count { display: block; margin-top: 5px; color: #c8bfb4; font-size: .72rem; letter-spacing: .05em; }
.lightbox button { background: none; border: 0; color: #f4efe8; font: 300 3rem/1 var(--serif); cursor: pointer; width: 64px; height: 64px; opacity: .75; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 8px; right: 8px; font-size: 2.4rem !important; }
.lightbox :focus-visible { outline: 1px solid rgba(244, 239, 232, .55); outline-offset: -8px; }

/* Meet Cary */
.meet { display: grid; grid-template-columns: 340px 1fr; gap: clamp(30px, 6vw, 80px); max-width: 1100px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter); align-items: start; }
.portrait-large { border-radius: 2px; aspect-ratio: auto; }
.meet-photo { position: sticky; top: 170px; }
.meet .typed-quote { margin: 0 0 34px; text-align: left; }
.favs-title { font-style: italic; font-weight: 400; font-size: 1.7rem; margin-top: 1.4em; }
.favs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.favs li { font-size: 0.98rem; }
/* The slash trails each item, so a wrapped line never starts with one. */
.favs li:not(:last-child)::after { content: '/'; color: var(--accent); margin: 0 10px; }

/* Details */
.details { max-width: 1100px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 0; }
.details h1 { text-align: center; }
.details > section { margin-top: clamp(40px, 6vw, 70px); }
.details h2 { font-style: italic; font-weight: 400; }
.cost-intro { color: var(--muted); }
.sessions { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); margin-top: 20px; }
.session { background: #fff; border: 1px solid var(--line); padding: 34px 28px 26px; display: flex; flex-direction: column; }
.session-price { font: 500 3rem/1 var(--serif); margin-bottom: 14px; }
.session h3 { font-size: 1.35rem; }
.session-length { color: var(--accent-deep); letter-spacing: 0.05em; font-size: 0.95rem; }
.session-note { margin-top: auto; font-family: var(--type); font-size: 0.92rem; color: var(--muted); }
.included { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; background: var(--paper-deep); padding: clamp(24px, 4vw, 40px); }
.included-photos { display: flex; gap: 12px; align-items: center; }
.included-photos .ph { width: 140px; align-self: center; }
.details .cta { padding-top: clamp(40px, 6vw, 64px); }
.included p { margin: 0; font-size: 1.05rem; }

/* Say Hello and client pages */
.hello, .client { max-width: 720px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter); text-align: center; }
.hello-intro { font: italic 400 1.5rem/1.45 var(--serif); }
.hello-form { display: grid; gap: 18px; text-align: left; margin: 40px 0 30px; }
.hello-form label { display: grid; gap: 6px; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hello-form input, .hello-form select, .hello-form textarea {
  font: 300 1.05rem/1.5 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 13px 14px; border-radius: 0; letter-spacing: 0.01em; text-transform: none;
}
.hello-form input:focus, .hello-form select:focus, .hello-form textarea:focus { border-color: var(--accent); outline: none; }
.hello-form .button { justify-self: start; }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.contact-status:empty { display: none; }
.hello-travel { color: var(--muted); }

/* Footer */
.site-footer { text-align: center; padding: 60px var(--gutter) 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.site-footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-love { font: italic 400 1.6rem/1 var(--serif); color: var(--ink); margin-bottom: 18px; }
.copyright { font-size: 0.82rem; letter-spacing: 0.06em; }

/* Small screens */
@media (max-width: 860px) {
  .site-header { flex-direction: row; justify-content: space-between; padding: 14px var(--gutter); }
  .brand { align-items: flex-start; }
  .brand-name { font-size: 1.7rem; }
  .brand-tag { font-size: 0.66rem; margin-top: 5px; }
  .menu-toggle {
    display: block; font: 500 0.8rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
    background: none; border: 1px solid var(--ink); color: var(--ink); padding: 11px 14px; cursor: pointer;
  }
  .site-nav { position: fixed; inset: 0; top: 0; background: var(--paper); display: none; align-items: center; justify-content: center; z-index: -1; }
  .site-nav.is-open { display: flex; z-index: 30; }
  .site-nav ul { flex-direction: column; align-items: center; gap: 14px; }
  .site-nav a { font: 500 2rem/1.2 var(--serif); color: var(--ink); }
  .menu-toggle[aria-expanded="true"] { position: relative; z-index: 40; }
  .trio { grid-template-columns: 1fr; }
  .trio-photo { aspect-ratio: 5 / 4; }
  .meet-teaser { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .moments { grid-template-columns: 1fr; }
  .price-row { grid-template-columns: 1fr; }
  .price-row li + li { border-left: 0; border-top: 1px solid var(--line); }
  .meet { grid-template-columns: 1fr; }
  .meet-photo { position: static; max-width: 340px; margin: 0 auto; }
  .sessions { grid-template-columns: 1fr; }
  .included { grid-template-columns: 1fr; }
  .justified { --row: 200px; gap: 6px; }
}
/* Phones: site.js deals the photographs into two columns, each going to the
   shorter one, so they read in Cary's order and none is cropped. */
.justified.is-columns { display: flex; align-items: flex-start; gap: 6px; padding: 0 12px; }
.justified.is-columns::after { display: none; }
.m-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.m-col .tile { flex: none; }
@media (max-width: 860px) {
  .lightbox[open] { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lb-prev, .lb-next { position: absolute; bottom: 10px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .gallery-next { gap: 24px; }
  .gallery-next a { font-size: 1.6rem; }
}

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