/* Abigail Yeates Architect — static rebuild
   One stylesheet. No Bootstrap, no jQuery UI, no Font Awesome, no Fancybox. */

:root {
  --ink: #333;
  --ink-light: #fff;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --fade-duration: 800ms;    /* crossfade length; build.js sets the real value */
  --slide-hold: 2200ms;      /* hold time; see HOLD/FADE in build.js */
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 0.85rem + 0.45vw, 1.2rem);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.012em;
  color: var(--ink);
  background-color: #cfcbc4; /* shown before the first image decodes */
}

/* ---------------------------------------------------------------- *
 *  Background slideshow
 * ---------------------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background-color: #cfcbc4;
}

.bg__layer {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity var(--fade-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.bg__layer.is-visible { opacity: 1; }

/* Slow drift. Applied only while a layer is the active one, so the motion
   restarts cleanly for each image instead of accumulating. */
.bg__layer.is-drifting {
  /* Slightly longer than one hold+fade cycle so the motion never visibly
     stops before the image is replaced. Keep in step with HOLD/FADE. */
  animation: drift 4s linear forwards;
}

@keyframes drift {
  from { transform: scale(1)    translate3d(0, 0, 0); }
  to   { transform: scale(1.02) translate3d(0, -0.3%, 0); }
}

/* A soft veil so body copy stays readable over dark photographs.
   The original site put #333 text straight onto the image. */
/* Interior pages: the photograph is atmosphere behind a page of text, so it
   is thrown out of focus. Average luminance is not enough to predict
   legibility — a bright window with dark glazing bars averages "light" but
   shreds body copy set over it. Defocusing removes the high-frequency detail
   that does the damage while keeping the colour and mood of the image.
   The container is scaled up because a blurred fixed layer would otherwise
   show translucent edges where the blur samples past the viewport. */
body.is-interior .bg {
  filter: blur(18px) saturate(0.85);
  transform: scale(1.09);
}

.bg__veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.44) 22%, rgba(255,255,255,0.34) 55%, rgba(255,255,255,0.34) 100%),
    radial-gradient(ellipse 66% 82% at 50% 46%, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0) 74%);
}

/* Home: a band behind the nav, plus a soft pool behind the wordmark. The
   photographs run from bright foliage to dark brick, and the two-tone
   wordmark has to hold up on both. */
body.is-home .bg__veil {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 26%),
    radial-gradient(ellipse 58% 34% at 50% 50%, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 70%);
}

/* ---------------------------------------------------------------- *
 *  Layout
 * ---------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.masthead {
  padding: 1.6rem var(--gutter) 0;
  text-align: center;
}

.masthead__nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 3vw, 1.9rem);
  justify-content: center;
}

.masthead__nav a {
  font-size: clamp(1.15rem, 0.9rem + 0.7vw, 1.6rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 16px rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, opacity 220ms ease;
}

.masthead__nav a:hover,
.masthead__nav a:focus-visible { border-bottom-color: currentColor; }

.masthead__nav [aria-current="page"] { border-bottom-color: currentColor; }

.page {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5rem) var(--gutter) 5rem;
}

.page p { margin: 0 0 1.35em; }
.page p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.1em;
  margin: 0;
}

.subnav {
  margin: 0 0 2.4rem;
  padding: 0;
  list-style: none;
}

.subnav li { margin-bottom: 0.12rem; }

.subnav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.subnav a:hover,
.subnav a:focus-visible { border-bottom-color: currentColor; }

.subnav a[aria-current="page"] {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  border-bottom-color: currentColor;
}

.strapline { margin-bottom: 2.4rem; }
.subnav--profile { margin: 2.4rem 0; }

.brandmark { white-space: nowrap; }
.brandmark--light { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3); }

/* Home / intro -------------------------------------------------- */

/* The original splash had no navigation on it — you watched the sequence,
   then arrived at the site. The nav stays in the markup for screen readers
   and crawlers but is not shown on the intro. */
body.is-home .masthead__nav { position: absolute; left: -9999px; }

.hero__skip {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hero__skip:focus-visible { outline: 2px solid #fff; outline-offset: 12px; }


.hero {
  min-height: calc(100svh - 6rem);
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  text-align: center;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 0.4rem + 5.2vw, 4.4rem);
  font-weight: 200;
  letter-spacing: 0.16em;
  line-height: 1.25;
  text-transform: uppercase;
}

/* The dark half needs a faint light halo to survive dark brick; the light
   half needs a dark one to survive bright sky. Both are wide and low-opacity
   so they read as depth rather than as an outline. */
.hero__title .brandmark--dark {
  color: #141414;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.55),
    0 0 42px rgba(255, 255, 255, 0.35);
}

.hero__title .brandmark--light {
  color: #fff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.42),
    0 2px 26px rgba(0, 0, 0, 0.45);
}

/* Dark photograph behind the wordmark: the near-black half would disappear,
   so it becomes a warm off-white. The two halves stay distinct — one solid
   white, one softened — so the treatment still reads as deliberate. */
body.has-dark-bg .hero__title .brandmark--dark {
  color: rgba(255, 255, 255, 0.72);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 2px 26px rgba(0, 0, 0, 0.45);
}

body.is-home.has-dark-bg .masthead__nav a { color: #fff; }

/* On interior pages the veil is pale, so white nav links would vanish. */
body.is-interior .masthead__nav a {
  color: #2a2a2a;
  text-shadow: none;
}
body.is-interior .subnav a[aria-current="page"] {
  color: #000;
  text-shadow: none;
}

/* The interior veil lightens the photograph to keep #333 body copy legible;
   over a dark image it has to work harder. */
body.is-interior.has-dark-bg .bg__veil {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.74) 0%, rgba(255,255,255,0.60) 22%, rgba(255,255,255,0.52) 55%, rgba(255,255,255,0.52) 100%),
    radial-gradient(ellipse 66% 82% at 50% 46%, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0) 74%);
}

body.is-home.has-dark-bg .bg__veil {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.26) 0%, rgba(0,0,0,0) 26%),
    radial-gradient(ellipse 58% 34% at 50% 50%, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0) 70%);
}

/* The wordmark also appears inline in body copy, where it sits on the veil
   rather than the raw photograph and must stay dark. */
/* In body copy the wordmark sits on the pale veil, where white is invisible
   whatever shadow you give it. The two-tone is a hero device; inline it
   becomes a tonal shift instead, which keeps the word distinguished without
   making it unreadable. */
.page .brandmark--light {
  color: #6e6e6e;
  text-shadow: none;
}

/* Transition the colour change with the crossfade so it is not a snap. */
.hero__title .brandmark--dark,
.hero__title .brandmark--light,
.bg__veil {
  transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1),
              background 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.portfolio li { margin-bottom: 1.1rem; }

.portfolio a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(51, 51, 51, 0.35);
  transition: border-color 200ms ease;
}

.portfolio a:hover,
.portfolio a:focus-visible { border-bottom-color: currentColor; }

.portfolio a::after {
  content: " \2197";
  font-size: 0.8em;
  opacity: 0.55;
  border: 0;
}

.backlink {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(51, 51, 51, 0.35);
}
.backlink:hover, .backlink:focus-visible { border-bottom-color: currentColor; }

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

.contact-details { margin: 2rem 0 0; }

.contact-details div { margin-bottom: 1.1rem; }

.contact-details a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(51, 51, 51, 0.35);
}

.contact-details a:hover,
.contact-details a:focus-visible { border-bottom-color: currentColor; }

.contact-details address { font-style: normal; line-height: 1.5; }

/* Lists --------------------------------------------------------- */

.page ul.plain { margin: 0 0 1.35em; padding-left: 1.1rem; }
.page ul.plain li { margin-bottom: 0.3rem; }

/* ---------------------------------------------------------------- *
 *  Motion preferences
 * ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .bg__layer {
    transition-duration: 1ms;
    animation: none !important;
  }
  * { scroll-behavior: auto !important; }
}
