/* Peak Exposure Studio
   Colors and type are set once in :root. Change them there. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #F7F3EE;        /* warm white page */
  --paper-2: #EFE9E1;      /* slightly deeper panel */
  --line: #DDD4C8;         /* hairlines */
  --ink: #26272A;          /* charcoal text */
  --ink-2: #5E5A54;        /* secondary text */
  --ink-3: #8C857B;        /* captions, metadata */
  --maroon: #6B1D2F;
  --maroon-deep: #521523;
  --night: #222326;        /* dark band and footer */
  --on-night: #EDE7DF;
  --on-night-2: #A9A298;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--maroon); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--maroon-deep); }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; max-width: 64ch; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--maroon); margin: 0 0 1.2em;
}
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 .95rem/1 var(--sans); letter-spacing: .02em;
  padding: 1em 1.6em; border: 1px solid transparent; border-radius: 2px;
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--maroon); color: #fff; }
.btn-solid:hover { background: var(--maroon-deep); color: #fff; }
.btn-ghost { border-color: rgba(247,243,238,.6); color: var(--paper); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow-link { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.arrow-link::after { content: " \2192"; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,243,238,.96); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: auto; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.brand .logo-light { display: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 3vw, 36px); }
.main-nav a { color: inherit; text-decoration: none; font-size: .92rem; font-weight: 500; letter-spacing: .03em; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.nav-toggle { display: none; background: none; border: 0; color: inherit; font: 500 .9rem var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 8px 0; cursor: pointer; }

/* Header sitting on top of the hero photo (home page) */
.site-header.over-hero { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: rgba(247,243,238,.18); color: var(--paper); }
.site-header.over-hero .logo-dark { display: none; }
.site-header.over-hero .logo-light { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--maroon); }
  .brand-name { font-size: 1.2rem; }
}

/* ---------- Hero ---------- */
/* The photo is solid at the top and fades into the warm white page toward the bottom.
   To change the fade, edit the mask-image stops: the 74% stop (.14) sets how much photo
   still shows near the bottom; it reaches plain warm white at the very bottom. */
.hero {
  position: relative; min-height: min(90svh, 820px); display: flex; align-items: flex-end;
  color: var(--ink); background: var(--paper); overflow: hidden;
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 50% 38%; }
.hero-media {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 22%, rgba(0,0,0,.5) 52%, rgba(0,0,0,.14) 74%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 22%, rgba(0,0,0,.5) 52%, rgba(0,0,0,.14) 74%, rgba(0,0,0,0) 100%);
}
/* Darkens just the top edge so the white header stays readable */
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 160px; z-index: 0;
  background: linear-gradient(to bottom, rgba(24,22,22,.4), rgba(24,22,22,0));
}
.hero-content { position: relative; z-index: 1; padding-top: 140px; padding-bottom: clamp(36px, 6vh, 64px); }
.hero h1 { max-width: 16ch; margin-bottom: .3em; }
.hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 48ch; margin-bottom: 1.6em; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 6.5vw, 84px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; margin-bottom: clamp(28px, 4vw, 44px); align-items: end; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* Intro statement */
.statement { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.3; max-width: 34ch; margin: 0 0 clamp(28px, 4vw, 44px); }
.statement em { color: var(--maroon); }

/* Two disciplines side by side */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.pair > div { padding: 28px 40px 0 0; }
.pair > div + div { padding-left: 40px; border-left: 1px solid var(--line); }
.pair .num { font-family: var(--serif); font-size: 1.1rem; color: var(--maroon); display: block; margin-bottom: .8em; }
@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; }
  .pair > div, .pair > div + div { padding: 24px 0 0; border-left: 0; }
  .pair > div + div { border-top: 1px solid var(--line); }
}

/* Work list: big screenshot beside each site */
.work { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 3vw, 32px); }
.work a {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 48px); align-items: center;
  color: inherit; text-decoration: none;
}
.thumb {
  margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.thumb .fallback { font-size: .9rem; color: var(--ink-3); }
.thumb img + .fallback { display: none; }
.work h3 { margin: 0 0 .25em; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.work .what { color: var(--ink-2); margin: 0 0 .9em; }
.work .domain { font-size: .88rem; font-weight: 500; color: var(--maroon); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.work .domain::after { content: " \2197"; }
.work a:hover .thumb img { transform: scale(1.025); }
.work a:hover h3 { color: var(--maroon); }
@media (max-width: 760px) { .work a { grid-template-columns: 1fr; gap: 14px; } }

/* SageLoch app grid */
.apps { list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #3A3B3F; }
.apps li { padding: 14px 16px 14px 0; border-bottom: 1px solid #3A3B3F; display: flex; gap: 10px; align-items: baseline; }
.apps b { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--on-night); }
.apps span { font-size: .85rem; color: var(--on-night-2); }
@media (max-width: 760px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.principles { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.principles h3 { font-size: 1.3rem; margin: 0 0 .15em; color: var(--on-night); }
.principles p { margin: 0; font-size: .95rem; }

/* Dark band */
.band { background: var(--night); color: var(--on-night); }
.band .eyebrow { color: #C98A97; }
.band p { color: var(--on-night-2); }
.band a:not(.btn) { color: var(--on-night); }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px 72px; align-items: start; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid #3A3B3F; }
.facts dt { color: var(--on-night-2); font-size: .9rem; }
.facts dd { margin: 0; text-align: right; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 72px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* Closing call to action */
.closing { text-align: center; }
.closing h2 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: .25em; }
.closing p { margin: 0 auto 1.5em; color: var(--ink-2); }
.closing .btn-row { justify-content: center; }

/* ---------- Inner page header ---------- */
.page-head { padding: clamp(48px, 7vw, 84px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .25em; }
.page-head .lead { margin: 0; }

/* ---------- 404 page: text beside a photo ---------- */
.lost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: calc(100svh - var(--header-h)); }
.lost-text { align-self: center; padding: 64px var(--gutter) 64px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.lost-text h1 { max-width: 12ch; }
.lost-photo { margin: 0; padding: 20px 20px 20px 0; }
.lost-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
@media (max-width: 860px) {
  .lost { grid-template-columns: 1fr; min-height: 0; }
  .lost-photo { order: -1; padding: 16px 16px 0; height: 42vh; min-height: 240px; }
  .lost-text { padding: 40px var(--gutter) 64px; }
}

/* ---------- Camera gear listings ---------- */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 24px; }
.gear-item { display: grid; align-content: start; gap: 14px; }
.gear-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.gear-photo img { width: 100%; height: 100%; object-fit: cover; }
.gear-badge { position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--paper); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; }
.gear-item h3 { font-size: 1.4rem; margin: 0 0 .2em; }
.gear-meta { color: var(--maroon); font-weight: 500; font-size: .95rem; margin: 0 0 .5em; }
.gear-desc { color: var(--ink-2); font-size: .95rem; margin: 0 0 .8em; }
.gear-item.is-sold .gear-photo img { filter: grayscale(1); opacity: .6; }
.gear-item.is-sold h3, .gear-item.is-sold .gear-meta { color: var(--ink-3); }

/* ---------- Prose pages ---------- */
.prose { max-width: 680px; }
.prose h2 { font-size: 1.9rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px 80px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 500; letter-spacing: .02em; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #FBF9F6; border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(107,29,47,.12); }
.honeypot { display: none; }
.form-status { display: none; padding: 14px 16px; border-left: 2px solid; }
.form-status.show { display: block; }
.form-status.ok { background: #EAF1EA; color: #234D2A; border-color: #3E7A47; }
.form-status.err { background: #F6E8E8; color: #6B1D2F; border-color: var(--maroon); }
.aside-block { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.aside-block h3 { font-size: 1.4rem; }
.aside-block ol { padding-left: 1.2em; margin: 0; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-night-2); font-size: .92rem; padding: 48px 0 28px; }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-grid h2 { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: 1.2em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand img { width: 52px; margin-bottom: 18px; }
.footer-brand p { max-width: 36ch; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid #3A3B3F; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

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