/*
 * Theme Name: Chelsea Kruis Photography 2
 * Theme URI: https://chelseakruis.com
 * Author: Chelsea Kruis
 * Author URI: https://chelseakruis.com
 * Description: An autumn editorial theme for portrait photographers. Framed hero photograph that cycles through a pool of pictures, filterable portfolio powered by a Works post type, session packages and an inquiry form.
 * Version: 2.10.6
 * Requires at least: 6.4
 * Tested up to: 6.8
 * Requires PHP: 7.4
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: chelsea-kruis
 * Tags: photography, portfolio, custom-menu, custom-logo, featured-images, translation-ready, block-styles, wide-blocks
 */

/* ==========================================================================
   Chelsea Kruis Photography — autumn editorial theme
   ========================================================================== */

:root {
  /* Palette -----------------------------------------------------------------
     Earth #a16d47 · Sand #d8caba · Latte #c0ad8d · Olive #776f4f ·
     Linen #f7f3eb, with Olive deepened to #3f3b2c for the dark bands.
     No near-black is used: the dark sections are deep olive, the header is a
     Sand bar, the closing band is Latte and the footer is deep Earth.
     Every colour below is editable under Appearance → Customize → Theme colors.
     The -rgb companions are rewritten by inc/colors.php so translucent tints
     follow whichever colour you pick. */
  --ink: #3f3b2c;
  --ink-rgb: 63, 59, 44;
  --ink-soft: #c0ad8d;
  --footer: #7a4e30;
  --ink-line: rgba(var(--cream-rgb), 0.14);
  --cream: #f7f3eb;
  --cream-rgb: 247, 243, 235;
  --cream-2: #d8caba;
  --cream-2-rgb: 216, 202, 186;
  --muted: #776f4f;
  --rust: #a16d47;
  --rust-rgb: 161, 109, 71;
  --rust-deep: #6f4629;
  --amber: #b98a63;
  --gold: #c0ad8d;
  --sage: #8b8464;
  --body: #46402f;
  --body-soft: #56503c;
  --overlay: #3a3323;
  --overlay-rgb: 58, 51, 35;

  /* Gradients ---------------------------------------------------------------
     These are the template's original gradients. The stop strengths are
     editable under Appearance → Customize → Theme colors → Gradients. */
  --hero-scrim-start: 0.72;
  --hero-scrim-upper: 0.22;
  --hero-scrim-lower: 0.45;
  --hero-scrim-end: 0.94;
  --hero-vignette: 0.5;
  --caption-strength: 0.72;
  --cta-glow-rgb: 161, 109, 71;
  --cta-glow-strength: 0.35;
  --hero-scrim: linear-gradient(
      180deg,
      rgba(var(--overlay-rgb), var(--hero-scrim-start)) 0%,
      rgba(var(--overlay-rgb), var(--hero-scrim-upper)) 32%,
      rgba(var(--overlay-rgb), var(--hero-scrim-lower)) 68%,
      rgba(var(--overlay-rgb), var(--hero-scrim-end)) 100%
    ),
    radial-gradient(120% 85% at 50% 45%, transparent 42%, rgba(var(--overlay-rgb), var(--hero-vignette)) 100%);
  --caption-grad: linear-gradient(180deg, transparent, rgba(var(--overlay-rgb), var(--caption-strength)));
  --cta-glow: radial-gradient(60% 120% at 50% 0%, rgba(var(--cta-glow-rgb), var(--cta-glow-strength)), transparent 70%);
  --scroll-line: linear-gradient(180deg, var(--gold), transparent);
  --ghost-line: rgba(var(--cream-rgb), 0.45);
  --service-tint: rgba(var(--cream-rgb), 0.04);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --header-h: clamp(68px, 7vh, 80px);
  --maxw: 1240px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

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

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: var(--rust);
  color: var(--cream);
}

:focus-visible {
  outline: 1px solid var(--rust);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - (var(--pad) * 2), var(--maxw));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - (var(--pad) * 2), 1480px);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.1rem, 9vw, 7.6rem);
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

h3 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.15;
}

em,
.italic {
  font-style: italic;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rust-deep);
}

.eyebrow::before {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
}

.eyebrow--light {
  color: var(--gold);
}

.lede {
  font-size: clamp(1.08rem, 0.98rem + 0.45vw, 1.32rem);
  line-height: 1.7;
  color: var(--body);
  max-width: 58ch;
}

.muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 1.9rem;
  border: 1px solid currentColor;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 0.5s var(--ease), color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.btn::after {
  content: "→";
  font-size: 0.9rem;
  transition: transform 0.5s var(--ease);
}

.btn:hover::after {
  transform: translateX(0.35rem);
}

.btn--solid {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.btn--solid:hover {
  background: var(--rust-deep);
  border-color: var(--rust-deep);
  color: var(--cream);
}

.btn--ghost {
  color: var(--cream);
  border-color: var(--ghost-line);
}

.btn--ghost:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

/* Hero buttons. Over a photograph the filled primary read as a button stuck in
   its hover state, so both start as outlines; only the primary fills, and only
   while it is pointed at or focused. */
.hero__actions .btn--solid {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}

.hero__actions .btn--solid:hover,
.hero__actions .btn--solid:focus-visible {
  background: rgba(var(--cream-rgb), 0.14);
  border-color: var(--cream);
  color: var(--cream);
}

.hero__actions .btn--ghost:hover,
.hero__actions .btn--ghost:focus-visible {
  background: rgba(var(--cream-rgb), 0.14);
  border-color: var(--cream);
  color: var(--cream);
}

.btn--dark {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--dark:hover {
  background: var(--ink);
  color: var(--cream);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease);
}

.text-link:hover {
  color: var(--rust);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  color: var(--ink);
  /* Translucent so the hero photograph reads behind the bar, with a blur to
     keep the menu text crisp. Lower the alpha for more show-through. */
  background: rgba(var(--cream-2-rgb), 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.7s var(--ease), border-color 0.7s var(--ease),
    box-shadow 0.7s var(--ease), backdrop-filter 0.7s var(--ease);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.12);
}

.site-header.is-scrolled {
  background: rgba(var(--cream-2-rgb), 0.82);
  border-bottom-color: rgba(var(--ink-rgb), 0.16);
  box-shadow: 0 12px 32px rgba(var(--ink-rgb), 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header__inner {
  display: flex;
  align-items: center;
  /* The menu is centred on the bar. The logo is positioned absolutely, so it
     takes no space in this row and cannot pull the menu off-centre. */
  justify-content: center;
  gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand small {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust-deep);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.6rem);
}

.nav a {
  position: relative;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.9);
  transition: color 0.4s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.55rem;
  width: 100%;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}


.nav-toggle {
  display: none;
  /* The menu toggle is the only other thing in the bar on small screens, so
     this pins it to the right edge while the menu stays centred. */
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
}

.nav-toggle span {
  position: relative;
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease), background 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease);
}

.nav-toggle span::before {
  top: -8px;
}

.nav-toggle span::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  /* The band of linen left visible all the way round the photograph. Small on
     purpose: enough to see the print sits on the page, not enough to shrink it. */
  --hero-inset: clamp(1rem, 2vw, 1.75rem);

  position: relative;
  display: grid;
  place-items: center;
  min-height: 84svh;
  padding: 13rem 0 4rem;
  overflow: hidden;
  /* Linen mat around the print rather than a dark band. */
  background: var(--cream);
  color: var(--cream);
  isolation: isolate;
}

/* One photograph behind the headline, nearly the full width of the page, drawn
   with a hairline border and a narrow band of linen around it, so it reads as a
   mounted print rather than a full-bleed background. The panel carries the photo
   on show and the one it is about to fade to, so the pool can cycle without
   loading every picture at once. */
.hero__gallery {
  position: absolute;
  inset: var(--hero-inset);
  z-index: -2;
  overflow: hidden;
  /* Drawn in ink because the mat is linen now: a cream line would vanish. */
  border: 1px solid rgba(var(--ink-rgb), 0.28);
  background: var(--ink);
}

.hero__panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* A plain opacity crossfade, deliberately: photographs drifting and scaling on
   their own kept the compositor busy every frame across the whole hero, which is
   what made the page feel like it was dragging. */
.hero__frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}

.hero__frame.is-active {
  opacity: 1;
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(0.92) contrast(1.03) sepia(0.1);
}

.hero__scrim {
  position: absolute;
  inset: var(--hero-inset);
  z-index: -1;
  background: var(--hero-scrim);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 62rem;
  padding: 0 var(--pad);
}

.hero .eyebrow {
  justify-content: center;
  color: var(--gold);
}

.hero .eyebrow::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 0 0 1.6rem;
  text-shadow: 0 2px 40px rgba(var(--overlay-rgb), 0.35);
}

.hero h1 em {
  color: var(--gold);
}

.hero__sub {
  max-width: 34rem;
  margin: 0 auto 2.6rem;
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.18rem);
  line-height: 1.8;
  color: rgba(var(--cream-rgb), 0.82);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero__meta {
  position: absolute;
  right: calc(var(--hero-inset) + var(--pad));
  bottom: calc(var(--hero-inset) + clamp(0.75rem, 3vh, 1.5rem));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.7);
}

.hero__count {
  color: var(--gold);
}

.hero__dots {
  position: absolute;
  left: calc(var(--hero-inset) + var(--pad));
  bottom: calc(var(--hero-inset) + clamp(0.75rem, 3vh, 1.5rem));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hero__dot {
  width: 2.2rem;
  height: 1px;
  padding: 0;
  border: 0;
  background: rgba(var(--cream-rgb), 0.3);
  transition: background 0.4s var(--ease), width 0.4s var(--ease);
}

.hero__dot.is-active {
  width: 3.4rem;
  background: var(--gold);
}

.hero__caption {
  position: absolute;
  left: calc(var(--hero-inset) + var(--pad) * 0.5);
  top: 50%;
  z-index: 3;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 0.6rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.45);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hero-inset) + 0.6rem);
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.55);
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 2.6rem;
  background: var(--scroll-line);
  animation: drop 2.4s var(--ease) infinite;
}

@keyframes drop {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(4.5rem, 9vw, 8.5rem) 0;
}

.section--dark {
  background: var(--ink);
  color: var(--cream);
}

.section--dark .lede {
  color: rgba(var(--cream-rgb), 0.72);
}

.section--flush-top {
  padding-top: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.8rem, 5vw, 4.5rem);
}

.section-head h2 {
  margin-top: 0.4rem;
}

.section-head--center {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
  max-width: 46rem;
  margin-inline: auto;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head--center .eyebrow::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
}

.section-head__aside {
  justify-self: end;
  max-width: 32rem;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--ink-line);
}

.section--dark .rule {
  background: var(--ink-line);
}

/* --------------------------------------------------------------------------
   Intro / manifesto
   -------------------------------------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.intro__mark {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-style: italic;
  line-height: 0.9;
  color: var(--rust);
  opacity: 0.9;
}

.intro__body p {
  margin: 0 0 1.4rem;
}

.intro__body p:first-of-type::first-letter {
  float: left;
  margin: 0.15em 0.12em 0 0;
  font-family: var(--serif);
  font-size: 3.6em;
  line-height: 0.78;
  color: var(--rust);
}

.intro__sign {
  margin-top: 2.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Featured work
   -------------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
}

.work {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--cream-2);
}

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
}

.work:hover img {
  transform: scale(1.045);
  filter: brightness(0.92);
}

.work__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  color: var(--cream);
  background: var(--caption-grad);
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.work:hover .work__caption,
.work:focus-visible .work__caption {
  opacity: 1;
  transform: none;
}

.work__caption span {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.work__caption em {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.feature-grid .work:nth-child(1) {
  grid-column: 1 / span 7;
  aspect-ratio: 4 / 5;
}

.feature-grid .work:nth-child(2) {
  grid-column: 8 / span 5;
  aspect-ratio: 4 / 5;
  margin-top: clamp(2rem, 6vw, 6rem);
}

.feature-grid .work:nth-child(3) {
  grid-column: 1 / span 5;
  aspect-ratio: 4 / 5;
  margin-top: clamp(-6rem, -6vw, -2rem);
}

.feature-grid .work:nth-child(4) {
  grid-column: 6 / span 7;
  aspect-ratio: 4 / 5;
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border: 1px solid var(--ink-line);
  transition: background 0.6s var(--ease), transform 0.6s var(--ease);
}

.service:hover {
  background: var(--service-tint);
  transform: translateY(-4px);
}

.service__num {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.service h3 {
  margin: 1.2rem 0 0.9rem;
}

.service p {
  margin: 0 0 1.8rem;
  font-size: 0.95rem;
  color: rgba(var(--cream-rgb), 0.68);
}

.service .text-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--cream);
}

.service .text-link:hover {
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Quote
   -------------------------------------------------------------------------- */

.quote {
  max-width: 54rem;
  margin-inline: auto;
  text-align: center;
}

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}

.quote cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.quote__mark {
  display: block;
  margin: 0 auto 1.6rem;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--rust);
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7.5rem) 0;
  background: var(--ink-soft);
  color: var(--ink);
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cta-glow);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  max-width: 44rem;
  margin-inline: auto;
}

.cta h2 {
  margin-bottom: 1.2rem;
}

.cta p {
  margin: 0 auto 2.2rem;
  max-width: 34rem;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  background: var(--footer);
  color: var(--cream);
  border-top: 1px solid var(--ink-line);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer__brand .brand {
  font-size: 1.9rem;
}

.footer__brand p {
  max-width: 26rem;
  margin: 1.2rem 0 0;
  font-size: 0.92rem;
  color: rgba(var(--cream-rgb), 0.78);
}

.footer__col h4 {
  margin: 0 0 1.2rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.95);
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.footer__col a {
  font-size: 0.92rem;
  color: rgba(var(--cream-rgb), 0.72);
  transition: color 0.4s var(--ease);
}

.footer__col a:hover {
  color: var(--cream);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.social-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--ink-line);
  border-radius: 50%;
  color: inherit;
  line-height: 1;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}

.social-link:hover {
  transform: translateY(-2px);
}

.social-link__icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

.site-footer .social-link {
  color: rgba(var(--cream-rgb), 0.72);
  border-color: var(--ink-line);
}

.site-footer .social-link:hover {
  color: var(--cream);
  border-color: rgba(var(--cream-rgb), 0.4);
  background: rgba(var(--cream-rgb), 0.06);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--ink-line);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.72);
}

/* --------------------------------------------------------------------------
   Subpage header
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(14rem, 20vh, 18rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background: var(--cream-2);
  color: var(--ink);
}

.page-head h1 {
  font-size: clamp(2.9rem, 7vw, 6rem);
  margin-bottom: 1.4rem;
}

.page-head p {
  max-width: 40rem;
  margin: 0;
  color: rgba(var(--ink-rgb), 0.82);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.16rem);
}

.page-head .eyebrow {
  color: var(--rust-deep);
}

/* --------------------------------------------------------------------------
   Portfolio page
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.filters button {
  position: relative;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}

.filters button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.filters button:hover,
.filters button[aria-pressed="true"] {
  color: var(--ink);
}

.filters button[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.masonry .work {
  aspect-ratio: 4 / 5;
}

.masonry .work.is-tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.work.is-hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream-2);
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__portrait::after {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(var(--cream-rgb), 0.35);
  pointer-events: none;
}

.about__body h2 {
  margin-bottom: 1.6rem;
}

.about__body p {
  margin: 0 0 1.3rem;
}

.values {
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.14);
}

.values li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.14);
}

.values span {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--rust-deep);
}

.values strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.values p {
  margin: 0.15rem 0 0;
  font-size: 0.94rem;
  color: var(--body-soft);
}

/* --------------------------------------------------------------------------
   Services page
   -------------------------------------------------------------------------- */

.packages {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.package {
  display: grid;
  grid-template-columns: 0.5fr 1fr 0.7fr;
  gap: clamp(1.2rem, 4vw, 3rem);
  padding: clamp(1.8rem, 4vw, 3rem) 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.16);
  align-items: start;
}

.package:last-of-type {
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.16);
}

.package__num {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--rust-deep);
}

.package h3 {
  margin-bottom: 0.8rem;
}

.package p {
  margin: 0;
  color: var(--body-soft);
}

.package ul {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--body-soft);
}

.package ul li::before {
  content: "—";
  margin-right: 0.6rem;
  color: var(--rust);
}

.package__price {
  text-align: right;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.package__price small {
  display: block;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.4vw, 2rem);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 1.8rem;
  border-top: 1px solid var(--ink-line);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold);
}

.step h3 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.35rem;
}

.step p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(var(--cream-rgb), 0.65);
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.form {
  display: grid;
  gap: 1.6rem;
}

.form__fields {
  display: grid;
  gap: 1.6rem;
}

.form__turnstile {
  display: grid;
  justify-items: start;
}

.form__turnstile iframe {
  max-width: 100%;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.24);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  transition: border-color 0.4s var(--ease);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--rust);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}

.form__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.form__success {
  display: none;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--rust);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--rust-deep);
}

.form.is-sent .form__success {
  display: block;
}

.form.is-sent .form__fields,
.form.is-sent .form__turnstile,
.form.is-sent .form__note {
  display: none;
}

.contact__aside {
  display: grid;
  gap: 2.2rem;
  padding-top: 0.4rem;
}

.contact__block h4 {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rust-deep);
}

.contact__block p,
.contact__block a {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
}

.contact__block a:hover {
  color: var(--rust);
}

.contact__block .social-link {
  color: var(--ink);
  border-color: rgba(var(--ink-rgb), 0.18);
}

.contact__block .social-link:hover {
  color: var(--rust);
  border-color: var(--rust);
  background: rgba(var(--rust-rgb), 0.07);
}

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.16);
}

.faq details {
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.16);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq p {
  margin: 0.8rem 0 0;
  color: var(--body-soft);
  max-width: 55ch;
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .work__caption {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .section-head,
  .intro,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .section-head__aside {
    justify-self: start;
  }

  .feature-grid .work:nth-child(1),
  .feature-grid .work:nth-child(2),
  .feature-grid .work:nth-child(3),
  .feature-grid .work:nth-child(4) {
    grid-column: span 6;
    margin-top: 0;
  }

  .services,
  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .package {
    grid-template-columns: 3rem 1fr;
  }

  .package__price {
    grid-column: 2;
    text-align: left;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  /* The blur makes .site-header the containing block for positioned
     descendants, which would trap the fixed menu panel inside the 68px bar.
     Dropping it here lets the panel cover the screen properly. */
  .site-header,
  .site-header.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-toggle {
    display: inline-flex;
    /* Above the open panel so the close button stays reachable. */
    position: relative;
    z-index: 70;
    pointer-events: auto;
  }

  /* While the panel is open the icon sits on near-black ink, so it needs the
     light colour to be seen at all (it is dark ink over the sand by default). */
  .nav-toggle[aria-expanded="true"] {
    color: var(--cream);
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    padding: 6rem var(--pad);
    overflow-y: auto;
    background: rgba(var(--ink-rgb), 0.98);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.55s var(--ease), visibility 0.55s;
  }

  .nav.is-open {
    transform: none;
    visibility: visible;
  }

  /* Light links, because the panel itself is near-black ink. */
  .nav a {
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    color: rgba(var(--cream-rgb), 0.85);
  }

  .nav a:hover,
  .nav a:focus-visible,
  .nav a[aria-current="page"] {
    color: var(--cream);
  }

  .nav a::after {
    background: var(--cream-2);
  }

  .masonry {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry .work.is-tall {
    grid-row: span 1;
    aspect-ratio: 4 / 5;
  }

  .hero__caption {
    display: none;
  }

  .hero__meta {
    display: none;
  }
}

@media (max-width: 620px) {
  .services,
  .process,
  .footer__top,
  .form__row,
  .masonry {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .work:nth-child(1),
  .feature-grid .work:nth-child(2),
  .feature-grid .work:nth-child(3),
  .feature-grid .work:nth-child(4) {
    grid-column: 1 / -1;
  }

  .hero {
    padding-top: 9.5rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .brand {
    font-size: 1.25rem;
  }

  .footer__bottom {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   WordPress integration
   ========================================================================== */

/* Menus ------------------------------------------------------------------ */
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list li {
  display: block;
}

@media (max-width: 860px) {
  .nav__list {
    flex-direction: column;
    gap: 2.2rem;
  }
}

/* Admin bar offsets ------------------------------------------------------ */
body.admin-bar .site-header,
body.admin-bar .nav {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header,
  body.admin-bar .nav {
    top: 46px;
  }
}

/* Custom logo ------------------------------------------------------------ */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  width: auto;
  height: auto;
  display: block;
}

/* The header logo floats free of the nav bar, so its size is set here rather
   than by the height of the bar. Change the two heights below to taste. */
.site-header .custom-logo-link {
  position: absolute;
  left: var(--pad);
  /* Half of the 12px the mark gives up to the bar, so it sits centred. */
  top: 6px;
  z-index: 3;
  /* padding-top, not top, carries the growth on hover: the box keeps its top
     edge under the pointer, so the hover state cannot flicker off mid-way. */
  transition: top 0.5s var(--ease), padding-top 0.55s var(--ease),
    background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header .custom-logo {
  /* Sitting inside the bar rather than filling it edge to edge, so the mark
     never crops against the top or bottom of the sand. */
  height: calc(var(--header-h) - 12px);
  transition: height 0.55s var(--ease), filter 0.45s var(--ease);
}

/* On the home page the mark hangs below the bar, over the hero photograph:
   larger, and in white line art so it reads against the picture. White would
   vanish on the sand bar, which is why the tucked-in state below goes olive. */
.home .site-header .custom-logo-link {
  top: var(--header-h);
}

.home .site-header .custom-logo {
  height: 220px;
  filter: brightness(0) invert(1)
    drop-shadow(0 2px 10px rgba(var(--overlay-rgb), 0.55));
}

/* Past the hero the mark tucks into the bar at its own size, in olive, because
   white would vanish on the sand. */
.home .site-header.is-past-hero .custom-logo-link {
  top: 6px;
}

.home .site-header.is-past-hero .custom-logo {
  height: calc(var(--header-h) - 12px);
  filter: none;
}

/* Hovering or focusing the tucked-in mark expands it to the full size it has
   over the hero, on a tab of the bar's own sand so the olive line art stays
   readable against whatever is behind it. This applies wherever the mark is
   tucked in: home after the hero, and every other page at all times. */
.site-header.is-past-hero .custom-logo-link:hover,
.site-header.is-past-hero .custom-logo-link:focus-visible,
.site-header:not(.has-hero) .custom-logo-link:hover,
.site-header:not(.has-hero) .custom-logo-link:focus-visible {
  /* The image slides down to hang from the bar while the box grows downward
     from a fixed top edge, so the pointer never leaves the hover target. */
  padding: 0 1rem 0.85rem 0;
  padding-top: calc(var(--header-h) - 6px);
  background: rgba(var(--cream-2-rgb), 0.96);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 24px rgba(var(--ink-rgb), 0.12);
}

.site-header.is-past-hero .custom-logo-link:hover .custom-logo,
.site-header.is-past-hero .custom-logo-link:focus-visible .custom-logo,
.site-header:not(.has-hero) .custom-logo-link:hover .custom-logo,
.site-header:not(.has-hero) .custom-logo-link:focus-visible .custom-logo {
  height: 220px;
}

.footer__brand .custom-logo {
  height: 176px;
  /* Flatten the artwork to white lines so it reads on the Earth footer,
     whichever logo is in use. */
  filter: brightness(0) invert(1);
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .home .site-header .custom-logo {
    height: 140px;
  }

  .footer__brand .custom-logo {
    height: 128px;
  }
}

.site-footer .custom-logo-link {
  margin-bottom: 0.4rem;
}

/* Entry content ---------------------------------------------------------- */
.entry-content > * + * {
  margin-top: 1.3rem;
}

.entry-content h2 {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.entry-content h3 {
  margin-top: 2rem;
}

.entry-content p,
.entry-content li {
  color: var(--body);
}

.entry-content a {
  color: var(--rust-deep);
  border-bottom: 1px solid currentColor;
}

.entry-content a:hover {
  color: var(--rust);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.3rem;
}

.entry-content li + li {
  margin-top: 0.4rem;
}

.entry-content img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.entry-content blockquote {
  margin: 2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--rust);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
}

.entry-content figcaption,
.wp-caption-text {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.wp-caption {
  max-width: 100%;
}

.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.aligncenter {
  margin-inline: auto;
}

.alignwide {
  width: min(100%, 1200px);
  margin-inline: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.page-content {
  max-width: 52rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

/* Inquiry form ----------------------------------------------------------- */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__error {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--rust);
  color: var(--rust-deep);
  font-size: 0.9rem;
}

.form.is-sent .form__actions,
.form.is-sent .form__error {
  display: none;
}

/* Single work ------------------------------------------------------------ */
.single-work__media {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.single-work__media img {
  width: 100%;
  height: auto;
}

.single-work__body {
  max-width: 52rem;
  margin-bottom: 2rem;
}

/* Journal / archive ------------------------------------------------------ */
.post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}

.post-card__media {
  display: block;
  margin-bottom: 1.2rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--cream-2);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card h2 {
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

.post-card h2 a,
.post-card .text-link {
  border-bottom: 0;
}

.post-card .eyebrow {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .post-list {
    grid-template-columns: 1fr;
  }
}

.navigation.pagination,
.post-navigation,
.nav-links {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Core accessibility helper --------------------------------------------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed !important;
  top: 1rem;
  left: 1rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  clip: auto;
  background: var(--cream);
  color: var(--ink);
}
