/* Ellie Fenn Photography — warm editorial */

/* Fonts are hosted with the site (SIL Open Font License), so no Google requests */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --linen: #fcfbf4;      /* page background (light cream) */
  --paper: #fffffb;      /* raised surfaces */
  --blush: #f1efe2;      /* soft fills behind arches and photos */
  --ink: #3b2f2a;        /* text */
  --ink-soft: #6e5f57;   /* secondary text */
  --sage: #8f9873;       /* decorative accent */
  --sage-deep: #5e6747;  /* links, buttons (AA on linen) */
  --error: #9a3b2e;      /* form error text and borders (AA on paper) */

  --display: "Fraunces", Georgia, serif;
  --body: "Instrument Sans", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--sage-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 100; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 340;
  letter-spacing: -0.015em;
  margin: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--linen) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 4.25rem;
}
.wordmark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "opsz" 36;
  font-size: 1.5rem; font-weight: 400;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
/* Elephant mark: feet sit on the text baseline, top lines up with the tall letters */
.wordmark .mark {
  height: .76em; width: auto;
  vertical-align: baseline;
  margin-right: .35em;
  fill: currentColor;
}
.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: .25rem 0; }
.site-nav a:hover { color: var(--sage-deep); text-decoration: underline; }

/* ---------- hero ---------- */
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding-top: clamp(2.5rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 7rem);
}
.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  max-width: 13ch;
}
.hero p {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
  margin: 1.75rem 0 2.25rem;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  background: var(--sage-deep); color: var(--paper);
  text-decoration: none; font-weight: 500;
  padding: .85rem 1.6rem; border-radius: 999px;
}
.button:hover { background: var(--ink); }
a.button:not([href]) { cursor: default; } /* email button before the script fills in the address */
.button svg, .button-outline svg {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round;
}

/* The arch: the site's one bold move */
.arch {
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: var(--blush);
  aspect-ratio: 4 / 5;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch img:not([src]) { display: none; } /* hero <img> waits for the random pick; without JavaScript the <noscript> photo shows instead */
.hero .arch img { object-position: 50% 50%; } /* where the arch crop centers on the hero photo */
.hero .arch { animation: rise 1.2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise {
  from { clip-path: inset(100% 0 0 0 round 999px 999px 6px 6px); }
  to   { clip-path: inset(0 0 0 0 round 999px 999px 6px 6px); }
}
@media (prefers-reduced-motion: reduce) { .hero .arch { animation: none; } }

/* ---------- work sections ---------- */
.work { padding: clamp(3rem, 7vw, 6rem) 0; scroll-margin-top: 4rem; }
.work + .work { border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }

.work-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1rem 4rem;
  align-items: end;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.work-head h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1; }
.work-head p { margin: 0; max-width: 50ch; color: var(--ink-soft); }

.gallery { columns: 3; column-gap: clamp(.75rem, 1.6vw, 1.25rem); }
.gallery a {
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(.75rem, 1.6vw, 1.25rem);
  border-radius: 4px;
  overflow: hidden;
  background: var(--blush);
}
.gallery img { width: 100%; transition: opacity .25s ease; }
.gallery a:hover img { opacity: .88; }

/* ---------- about ---------- */
.about { background: var(--paper); padding: clamp(3.5rem, 8vw, 7rem) 0; scroll-margin-top: 4rem; }
.about .wrap {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
/* The About arch is taller than the hero's (8:11 vs 4:5) so the portrait shows from the top of her head
   down to the same point the old centered crop reached */
.about .arch { max-width: 420px; aspect-ratio: 8 / 11; }
.about .arch img { object-position: 50% 0%; }
.about h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.05; margin-bottom: 1.5rem; }
.about p { max-width: 56ch; margin: 0 0 1.1rem; }

/* ---------- contact ---------- */
.contact { padding: clamp(4rem, 9vw, 8rem) 0; text-align: center; scroll-margin-top: 4rem; }
.contact h2 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.02; }
.contact-intro { max-width: 46ch; margin: 1.5rem auto 2.25rem; color: var(--ink-soft); }

/* Inquiry form (shown only once a Formspree form ID is set; see script.js) */
.inquiry-card {
  max-width: 36rem; margin: 0 auto; text-align: left;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.inquiry { display: grid; gap: 1.15rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field { display: grid; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field { display: block; }
fieldset.field legend { padding: 0; margin-bottom: .55rem; }
.field-label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field-hint { font-weight: 400; color: var(--ink-soft); margin-left: .35em; }
.inquiry input[type="text"], .inquiry input[type="email"], .inquiry textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--linen);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 12px; padding: .75rem .9rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.inquiry textarea { resize: vertical; min-height: 7.5rem; }
.inquiry ::placeholder { color: color-mix(in srgb, var(--ink-soft) 75%, transparent); }
.inquiry input:focus, .inquiry textarea:focus {
  outline: none; border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 35%, transparent);
}
.inquiry input:user-invalid, .inquiry textarea:user-invalid,
.inquiry input[aria-invalid="true"], .inquiry textarea[aria-invalid="true"] { border-color: var(--error); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block; padding: .5rem 1.05rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--linen); font-size: .95rem; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip span:hover { border-color: var(--sage-deep); }
.chip input:checked + span { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--sage-deep); outline-offset: 2px; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* spam bait for bots */

.inquiry .button { width: 100%; border: 0; font: inherit; font-weight: 500; cursor: pointer; padding: .95rem 1.6rem; margin-top: .25rem; }
.inquiry .button:disabled { opacity: .65; cursor: progress; }
.form-note { margin: -.35rem 0 0; font-size: .85rem; color: var(--ink-soft); text-align: center; }
.form-status { margin: 0; font-size: .95rem; color: var(--ink-soft); text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }

.inquiry-thanks { text-align: center; padding: 1.75rem .5rem; }
.inquiry-thanks:focus { outline: none; }
.inquiry-thanks h3 {
  font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 48;
  font-weight: 400; font-size: 2rem; line-height: 1.1; margin: 0 0 .6rem;
}
.inquiry-thanks p { margin: 0; color: var(--ink-soft); }

/* Email + phone: the main buttons when there's no form, "or reach me directly" options under it when there is */
.contact-direct-label { display: none; margin: 0 0 .9rem; font-size: .95rem; color: var(--ink-soft); }
.contact.has-form .contact-direct { margin-top: 2.25rem; }
.contact.has-form .contact-direct-label { display: block; }
.contact-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.button-outline {
  display: inline-flex; align-items: center; gap: .55em;
  font: inherit; font-weight: 500; color: var(--ink); text-decoration: none;
  background: none; cursor: pointer;
  padding: .8rem 1.5rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  transition: color .2s ease, border-color .2s ease;
}
.button-outline:hover { color: var(--sage-deep); border-color: var(--sage-deep); }

.site-footer { padding: 2rem 0 2.5rem; color: var(--ink-soft); font-size: .875rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- lightbox ---------- */
.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: color-mix(in srgb, var(--ink) 94%, black);
  color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: transparent; }
.lb-figure { margin: 0; display: grid; place-items: center; min-height: 0; padding: 0 4.5rem; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: 3px; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; font-size: .9rem; }
.lb-btn {
  background: none; border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  color: var(--paper); border-radius: 999px;
  width: 2.75rem; height: 2.75rem; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center;
}
.lb-btn:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); }
.lb-btn:focus-visible { outline-color: var(--paper); }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .gallery { columns: 2; }
  .work-head { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: .25rem; padding-top: .75rem; padding-bottom: .6rem; }
  .site-nav { width: 100%; overflow-x: auto; gap: 1.25rem; scrollbar-width: none; }
  .work, .about, .contact { scroll-margin-top: 6rem; }
  .hero .wrap { grid-template-columns: 1fr; align-items: start; }
  .hero .arch { order: -1; max-width: 340px; width: 78%; }
  .about .wrap { grid-template-columns: 1fr; }
  .about .arch { max-width: 300px; width: 75%; }
  .field-row { grid-template-columns: 1fr; }
  .lb-figure { padding: 0 .75rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; translate: none; }
}
