/* ===========================================================
   Shared stylesheet for actuallygrace.com and
   gracemariaphotography.com. This file is identical in both
   Website folders. When it changes, it changes in both.
   =========================================================== */

:root {
  /* Palette: a cool room with light coming in.
     North window light, plaster wall, ink, and one warm note. */
  --ink:        #1B2028;
  --ink-soft:   #565E68;
  --paper:      #F1F1EF;
  --wall:       #DBDCD6;
  --rule:       #C7C9C2;
  --light:      #D9A24A;
  --night:      #141821;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.1875rem);
  line-height: 1.62;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* --- reusable bits ---------------------------------------- */

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

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.25em 0 0.6em;
}
.prose em { font-style: italic; }

.link-quiet {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 160ms ease;
}
.link-quiet:hover { border-color: var(--light); }

.arrow { font-family: var(--sans); font-size: 0.8em; }

/* --- site header ------------------------------------------ */

.site-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.75rem 1.5rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.2;
}
.wordmark span {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--light); }

/* --- site footer ------------------------------------------ */

.site-foot {
  margin-top: 6rem;
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}
.site-foot a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-foot a:hover { border-color: var(--light); }

/* ===========================================================
   actuallygrace.com
   =========================================================== */

/* The signature: the name set as a lexicon entry, lit from behind. */

.lexicon {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}
.lexicon::before {
  content: "";
  position: absolute;
  inset: -10% auto auto -6%;
  width: min(34rem, 70%);
  aspect-ratio: 1;
  background: radial-gradient(circle at 30% 30%, rgba(217,162,74,0.30), rgba(217,162,74,0) 68%);
  pointer-events: none;
  z-index: 0;
}
.lexicon > * { position: relative; z-index: 1; }

.headword {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 8.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}
.headword i { font-style: italic; font-weight: 300; }

.pron {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 1.1rem 0 2rem;
}

.definition {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.625rem);
  line-height: 1.42;
  font-weight: 300;
  max-width: 30rem;
  margin: 0 0 1.5rem;
  border-left: 2px solid var(--light);
  padding-left: 1.5rem;
}

.aside-note {
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 26rem;
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .lexicon .headword,
  .lexicon .pron,
  .lexicon .definition,
  .lexicon .aside-note {
    animation: rise 700ms cubic-bezier(0.22, 0.7, 0.25, 1) both;
  }
  .lexicon .pron        { animation-delay: 90ms; }
  .lexicon .definition  { animation-delay: 170ms; }
  .lexicon .aside-note  { animation-delay: 250ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

/* Writing list */

.section { padding-block: clamp(3rem, 6vw, 4.5rem); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  margin: 0 0 2rem;
}

.entries { list-style: none; margin: 0; padding: 0; }

.entries li { border-top: 1px solid var(--rule); }
.entries li:last-child { border-bottom: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.25rem 2rem;
  align-items: baseline;
  padding-block: 1.5rem;
  text-decoration: none;
  transition: background-color 160ms ease;
}
.entry:hover { background: rgba(219,220,214,0.45); }

.entry-date {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.4rem;
}
.entry-title {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  line-height: 1.28;
  margin: 0 0 0.35rem;
}
.entry-dek {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.entry-body { grid-column: 2; }

@media (max-width: 34rem) {
  .entry { grid-template-columns: 1fr; }
  .entry-body { grid-column: 1; }
  .entry-date { padding-top: 0; }
}

/* Crossover band to the photography site */

.crossover {
  background: var(--night);
  color: var(--paper);
  margin-top: 4rem;
}
.crossover-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.crossover .eyebrow { color: rgba(241,241,239,0.55); }
.crossover h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}
.crossover p {
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(241,241,239,0.72);
  max-width: 26rem;
  margin: 0 0 1.75rem;
}
.crossover-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--light);
  padding-bottom: 3px;
}
.crossover-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.crossover-strip img { aspect-ratio: 2 / 3; object-fit: cover; }

@media (max-width: 44rem) {
  .crossover-inner { grid-template-columns: 1fr; }
}

/* Stay in touch */

.keep-up {
  border: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 40rem;
}
.keep-up h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  margin: 0 0 0.6rem;
}
.keep-up p {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* About page */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 34rem) minmax(0, 18rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-layout figure { margin: 0; }
.about-layout figure img { aspect-ratio: 4 / 5; }
.about-layout figcaption {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
@media (max-width: 52rem) {
  .about-layout { grid-template-columns: 1fr; }
  .about-layout figure { max-width: 18rem; order: -1; }
}

/* Landscape photographs in the about figure or the crossover strip. The 4:5
   default above centre-crops a horizontal frame and cuts the subject out;
   adding class="wide" to the img opts that one photograph out of it. */
.about-layout figure img.wide,
.crossover-strip img.wide { aspect-ratio: 3 / 2; }

/* Post page */

.post-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.post-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  max-width: 32rem;
}
.post-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.post-body { padding-block: 2.5rem 1rem; }
.post-body .prose > p:first-child::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.82;
  padding: 0.06em 0.08em 0 0;
  font-weight: 300;
}

/* ===========================================================
   gracemariaphotography.com
   =========================================================== */

/* Missing images read as labelled frames rather than broken icons. */
.frame {
  background: var(--wall);
  object-fit: cover;
  width: 100%;
  /* height: auto is load-bearing. Every <img> carries height="2700" (or 1200)
     so the page does not reflow while loading. Without height:auto that
     attribute becomes the used height, aspect-ratio is ignored, and the frame
     renders 2700px tall with the photograph zoomed in to fill it. */
  height: auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-soft);
}

.photo-hero {
  position: relative;
  background: var(--night);
}
/* The hero shows the whole photograph. A fixed height here would crop it —
   the old clamp() cut the top of the subject's head off and took her legs
   with it. The file is 3:2, so matching that ratio means object-fit has
   nothing to trim. */
.photo-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.photo-hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: flex-end;
  padding: var(--gutter);
  background: linear-gradient(to top, rgba(20,24,33,0.68), rgba(20,24,33,0));
  color: var(--paper);
}
.photo-hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.05;
  margin: 0;
}
.photo-hero-name span {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(241,241,239,0.7);
  margin-top: 0.5rem;
}
.photo-hero-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: rgba(241,241,239,0.7);
  margin: 0;
}

/* Portfolio */

.gallery { padding-block: clamp(3rem, 6vw, 5rem); }

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
}
.gallery-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  margin: 0;
}
.gallery-note {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 24rem;
}

/* Masonry, via multi-column. CSS Grid cannot do this: with mixed 2:3 and 3:2
   frames it forces every row to the height of its tallest item, which leaves
   a hole under each landscape photograph. Columns let each frame keep its own
   height and pack against the one above it — no gaps, and nothing cropped.
   Columns are sized, not counted, so the count adapts to the viewport. */
.grid {
  column-width: 17rem;
  column-gap: 1rem;
}
.grid figure {
  margin: 0 0 1rem;
  break-inside: avoid;          /* never split a photograph across columns */
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;     /* older Firefox */
}
.grid figcaption {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
/* Gallery slots match the files exactly, so nothing is ever cropped:
   portrait frames are 2:3 (1800x2700), landscape are 3:2 (1800x1200).
   Do not set these to 4:5 — that centre-crops every portrait and takes
   the top of the subject's head off. Uneven rows are the intended look. */
.grid .tall  { aspect-ratio: 2 / 3; }
.grid .wide  { aspect-ratio: 3 / 2; }
.grid .square{ aspect-ratio: 1; }

.grid figure a { display: block; }

/* Rate card: a printed studio price list, not feature cards. */

.rate-card { max-width: 46rem; padding-block: 1rem; }

.rate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}
.rate:last-of-type { border-bottom: 1px solid var(--rule); }

.rate-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  margin: 0;
}
.rate-price {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--ink);
}
.rate-detail {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0;
  max-width: 34rem;
}
.rate-includes {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.fine-print {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 34rem;
  margin: 2.5rem 0 0;
}

/* Inquiry form */

.form { max-width: 34rem; padding-block: 1rem; }
.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  border-radius: 0;
  transition: border-color 160ms ease;
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--light);
  border-bottom-width: 2px;
}
.hidden-field { position: absolute; left: -9999px; }

.button {
  font-family: var(--sans);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.button:hover { background: var(--light); border-color: var(--light); color: var(--night); }

/* --- accessibility floor --------------------------------- */

:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 3px;
}

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

/* The "how a session goes" block: portrait beside prose, stacking on phones. */
.approach {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 62rem) {
  .approach { grid-template-columns: 4fr 5fr; }
}
.approach picture { display: block; }
.approach .frame { aspect-ratio: 3 / 2; }
.approach-words p { max-width: 34rem; }
