/* ==========================================================================
   Fractal Technology — coastal & slate
   Pembrokeshire IT support. Hand-built, no framework.

   Contents
   1.  Tokens
   2.  Reset & base
   3.  Typography
   4.  Layout helpers
   5.  Buttons & links
   6.  Header / navigation
   7.  Hero
   8.  Sections & components
   9.  Footer
   10. Forms
   11. Motion & reveal
   12. Utilities & responsive
   ========================================================================== */

/* ------------------------------------------------------------- 1. Tokens -- */

:root {
  /* Coastal & slate. Deep sea-slate for weight, sea-glass green as the
     primary accent, warm sand used sparingly so it stays an accent. */
  --slate-900: #101a20;
  --slate-800: #1a262e;
  --slate-700: #233440;
  --slate-600: #334755;
  --slate-400: #6b7d88;
  --slate-300: #97a6ae;

  --paper:      #f7f6f2;  /* warm off-white page */
  --paper-dim:  #edece5;  /* alternating band */
  --mist:       #e3e7e4;  /* hairlines on paper */

  --sea:        #3f7365;  /* accent — text-safe on paper at >=18px */
  --sea-deep:   #2c5346;  /* hover + small text (AA on paper) */
  --sea-light:  #a8c6ba;
  --sea-wash:   #e7efeb;  /* tinted fill */

  --sand:       #b98d4e;  /* rare warm accent */
  --sand-light: #e6d3ae;

  --ink:        #1a2226;  /* body text on paper */
  --ink-soft:   #4b585f;  /* secondary text */

  --on-dark:      #f2f4f3;
  --on-dark-soft: #b3c0c6;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1.06rem, 1.02rem + 0.2vw, 1.13rem);
  --step-1:  clamp(1.26rem, 1.2rem + 0.3vw, 1.42rem);
  --step-2:  clamp(1.5rem, 1.38rem + 0.6vw, 1.85rem);
  --step-3:  clamp(1.85rem, 1.6rem + 1.2vw, 2.6rem);
  --step-4:  clamp(2.3rem, 1.85rem + 2.2vw, 3.7rem);
  --step-5:  clamp(2.6rem, 1.95rem + 2.9vw, 4.5rem);

  /* Space */
  --measure: 68ch;
  --container: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7.5rem);

  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgb(16 26 32 / 0.06);
  --shadow-md: 0 10px 30px -12px rgb(16 26 32 / 0.22);
  --shadow-lg: 0 24px 60px -24px rgb(16 26 32 / 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------ 2. Reset & base -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

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

img { height: auto; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }

hr {
  border: 0;
  border-top: 1px solid var(--mist);
  margin: 2.5rem 0;
}

::selection {
  background: var(--sea);
  color: #fff;
}

/* Visible, consistent focus for keyboard users. */
:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--slate-900);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

/* -------------------------------------------------------- 3. Typography -- */

.display,
h1, h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

/* Small caps-ish label used to open a section. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 1.1rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sea-deep);
}
.eyebrow::before {
  content: "";
  width: 1.9rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.eyebrow--plain::before { display: none; }

.on-dark .eyebrow { color: var(--sea-light); }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}

.section-head { max-width: 62ch; }
.section-head h2 { margin-bottom: 0.5em; }
.section-head p { color: var(--ink-soft); max-width: var(--measure); }

.on-dark .section-head p { color: var(--on-dark-soft); }

/* ---------------------------------------------- 4. Layout helpers ------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.section--dim { background: var(--paper-dim); }

.on-dark {
  background: var(--slate-800);
  color: var(--on-dark);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }

.section-head + * { margin-top: clamp(2.2rem, 4vw, 3.4rem); }

/* -------------------------------------------- 5. Buttons & links -------- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--sea-deep);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.35s var(--ease-out), gap 0.25s var(--ease);
}
.text-link:hover { background-size: 0 1px; gap: 0.75em; }
.text-link svg { width: 0.9em; height: 0.9em; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.6em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--step-0);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1em; height: 1em; flex: none; }

.btn--primary {
  background: var(--sea);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--sea-deep); box-shadow: var(--shadow-md); }

.btn--ghost {
  border-color: rgb(255 255 255 / 0.35);
  color: #fff;
  background: rgb(255 255 255 / 0.05);
  backdrop-filter: blur(2px);
}
.btn--ghost:hover {
  border-color: rgb(255 255 255 / 0.75);
  background: rgb(255 255 255 / 0.12);
}

.btn--outline {
  border-color: var(--slate-400);
  color: var(--ink);
}
.btn--outline:hover { border-color: var(--ink); background: rgb(0 0 0 / 0.03); }

.btn--lg { padding: 1em 2em; font-size: var(--step-1); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* ------------------------------------------------- 6. Header / nav ------ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  color: #fff;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease),
    box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

/* Solid once the page scrolls past the hero. */
.site-header.is-solid {
  background: rgb(247 246 242 / 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  color: var(--ink);
  border-bottom-color: var(--mist);
  box-shadow: 0 1px 0 rgb(16 26 32 / 0.03), var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--sea-light);
  transition: color 0.4s var(--ease);
}
.site-header.is-solid .brand__mark { color: var(--sea); }

/* The fiddlehead unrolls as the page loads. */
.brand__mark path {
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
  animation: draw-mark 1.4s var(--ease-out) 0.15s forwards;
}
@keyframes draw-mark { to { stroke-dashoffset: 0; } }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__name {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.brand__tag {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 0.18rem;
}

.nav { display: flex; align-items: center; gap: clamp(0.4rem, 2vw, 1.6rem); }

.nav__link {
  position: relative;
  padding: 0.45rem 0.1rem;
  color: inherit;
  font-size: 0.97rem;
  font-weight: 450;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { opacity: 1; font-weight: 500; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta { margin-left: 0.4rem; }
.site-header:not(.is-solid) .nav__cta {
  border-color: rgb(255 255 255 / 0.4);
  color: #fff;
}
.site-header:not(.is-solid) .nav__cta:hover { background: rgb(255 255 255 / 0.14); }
.site-header.is-solid .nav__cta { background: var(--sea); color: #fff; }
.site-header.is-solid .nav__cta:hover { background: var(--sea-deep); }

/* Mobile toggle — hidden on wide screens. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.2rem;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-toggle__bars {
  position: relative;
  width: 22px;
  height: 12px;
  flex: none;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(5.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-5.25px) rotate(-45deg);
}

/* ------------------------------------------------------------- 7. Hero -- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(92svh, 860px);
  padding-block: clamp(7rem, 16vh, 11rem) clamp(3.5rem, 9vh, 6rem);
  background: var(--slate-800);
  color: var(--on-dark);
  overflow: hidden;
}

/* Subpages get a shorter band with no photo. */
.hero--page {
  min-height: min(58svh, 520px);
  padding-block: clamp(7rem, 14vh, 9.5rem) clamp(3rem, 7vh, 4.5rem);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

/* Scrim: darkens the photo enough for AA text, weighted to the bottom-left
   where the copy sits. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(16 26 32 / 0.95) 6%, rgb(16 26 32 / 0.78) 45%,
      rgb(16 26 32 / 0.48) 100%),
    linear-gradient(to right, rgb(16 26 32 / 0.82) 0%, rgb(16 26 32 / 0.5) 38%,
      rgb(16 26 32 / 0.12) 72%);
}

/* The sky behind the eyebrow is bright, so lift the tint above the
   `--sea-light` used for decorative marks. */
.hero .eyebrow { color: #d8e8e0; }
.hero .eyebrow::before { opacity: 0.85; }

.hero__inner { position: relative; width: 100%; }

/* NOTE: do not size these in `ch`. The hero container carries the body font,
   so `ch` resolves against Inter at 16px rather than the display font, and a
   "21ch" measure comes out at ~185px. Rem keeps it predictable. */
.hero__content { max-width: min(100%, 37rem); }
.hero--page .hero__content { max-width: min(100%, 44rem); }

.hero h1 {
  color: #fff;
  margin-bottom: 0.42em;
  text-wrap: balance;
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--on-dark);
  max-width: 34ch;
  margin-bottom: 2rem;
  text-wrap: pretty;
}

.hero .btn-row { margin-top: 0.5rem; }

/* Decorative fern, bleeding off the right edge. */
.hero__fern {
  position: absolute;
  right: clamp(-6rem, -4vw, 0rem);
  bottom: -3rem;
  z-index: -1;
  width: clamp(220px, 30vw, 430px);
  color: #fff;
  opacity: 0.13;
  pointer-events: none;
  transform: rotate(-4deg);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
  font-size: var(--step--1);
  color: var(--on-dark-soft);
  max-width: 56ch;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__meta svg { width: 0.95em; height: 0.95em; color: var(--sea-light); }

/* ------------------------------------------- 8. Sections & components --- */

/* Trust strip ---------------------------------------------------------- */

.trust {
  background: var(--slate-900);
  color: var(--on-dark);
  border-block: 1px solid rgb(255 255 255 / 0.07);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.trust__item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
  border-left: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.95rem;
  color: var(--on-dark-soft);
}
.trust__item:first-child { border-left: 0; }
.trust__num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: 1.55rem;
  font-weight: 500;
  color: #fff;
  line-height: 1;
}
.trust__item strong { color: #fff; font-weight: 500; }

/* Split layout (image beside copy) -------------------------------------- */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
.split--wide-left { grid-template-columns: 1.05fr 0.95fr; }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
}

.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.split__body > * + * { margin-top: 1.4rem; }

/* Small fern tucked behind a photo. */
.split__media .fern-accent {
  position: absolute;
  z-index: -1;
  width: 55%;
  color: var(--sea);
  opacity: 0.16;
  pointer-events: none;
}
.fern-accent--bl { left: -1.5rem; bottom: -2rem; transform: rotate(12deg); }
.fern-accent--tr { right: -1.5rem; top: -2rem; transform: rotate(-168deg); }

/* Card grid ------------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* Five cards in a three-across grid would leave a gap in row two, so the
   last card widens to fill it. The nth-child guard means this stops
   applying automatically if a sixth card is ever added. */
@media (min-width: 900px) {
  .grid > .card:last-child:nth-child(3n + 2) { grid-column: span 2; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.4vw, 2.1rem);
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sea-light);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }
.card .text-link { margin-top: auto; padding-top: 1.1rem; align-self: flex-start; }

.card__icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1.1rem;
  border-radius: 9px;
  background: var(--sea-wash);
  color: var(--sea-deep);
}
.card__icon svg { width: 1.45rem; height: 1.45rem; }

/* Feature list (the "why choose me" points) ----------------------------- */

.features {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.8rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature__rule {
  width: 2.2rem;
  height: 2px;
  margin-bottom: 1.1rem;
  background: var(--sea);
  border-radius: 2px;
}
.on-dark .feature__rule { background: var(--sea-light); }
.feature h3 { margin-bottom: 0.45rem; font-size: var(--step-1); }
.feature p { color: var(--ink-soft); font-size: 0.98rem; }
.on-dark .feature p { color: var(--on-dark-soft); }

/* Checklist ------------------------------------------------------------- */

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.checklist li {
  position: relative;
  padding-left: 1.85rem;
  font-size: 0.99rem;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.62rem;
  height: 0.34rem;
  border-left: 1.5px solid var(--sea);
  border-bottom: 1.5px solid var(--sea);
  transform: rotate(-45deg);
}
.checklist--cols { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.on-dark .checklist li { color: var(--on-dark-soft); }
.on-dark .checklist li::before { border-color: var(--sea-light); }

/* Service detail block -------------------------------------------------- */

.service {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: clamp(2.6rem, 5vw, 4rem);
  border-top: 1px solid var(--mist);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .service { grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); }
  .service__intro { position: sticky; top: 7rem; }
}
.service:first-of-type { border-top: 0; }
.service__intro h2 { font-size: var(--step-3); margin-bottom: 0.5rem; }
.service__intro p { color: var(--ink-soft); }
.service__num {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--sea);
  margin-bottom: 0.9rem;
}

/* Pull quote ------------------------------------------------------------ */

.pull {
  padding: clamp(1.8rem, 3vw, 2.6rem);
  background: var(--sea-wash);
  border-left: 3px solid var(--sea);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.pull p {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-size: var(--step-2);
  line-height: 1.32;
  color: var(--slate-800);
  margin: 0;
}

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

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--slate-800);
  color: var(--on-dark);
}
.cta__inner {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .cta__inner { grid-template-columns: 1.25fr auto; }
}
.cta h2 { color: #fff; margin-bottom: 0.4em; }
.cta p { color: var(--on-dark-soft); max-width: 48ch; }
.cta__fern {
  position: absolute;
  right: -3rem;
  top: 50%;
  z-index: -1;
  width: clamp(240px, 34vw, 480px);
  color: #fff;
  opacity: 0.08;
  transform: translateY(-50%) rotate(-6deg);
  pointer-events: none;
}

/* Areas served ---------------------------------------------------------- */

.areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.areas li {
  padding: 0.42rem 0.9rem;
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.areas li:hover { border-color: var(--sea-light); color: var(--sea-deep); }

/* Portrait -------------------------------------------------------------- */

.portrait {
  position: relative;
}
.portrait img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.portrait__caption {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ------------------------------------------------------------- 9. Footer */

.site-footer {
  background: var(--slate-900);
  color: var(--on-dark-soft);
  padding-block: clamp(3.2rem, 6vw, 4.8rem) 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

.footer-brand .brand { color: #fff; margin-bottom: 1.1rem; }
.footer-brand .brand__mark { color: var(--sea-light); }
.footer-brand p { max-width: 34ch; font-size: 0.95rem; }

.footer-welsh {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.3rem;
  padding: 0.4rem 0.85rem;
  background: rgb(168 198 186 / 0.12);
  border: 1px solid rgb(168 198 186 / 0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--sea-light);
}
.footer-welsh svg { width: 1em; height: 1em; }

.footer-col h4 {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer-col li { line-height: 1.5; }

.footer-contact li { display: flex; gap: 0.65rem; align-items: flex-start; }
.footer-contact svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.35rem;
  flex: none;
  color: var(--sea-light);
}
.footer-contact a { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.8rem);
  padding-top: 1.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.85rem;
  color: var(--slate-400);
}

/* ------------------------------------------------------------ 10. Forms - */

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

.field { display: grid; gap: 0.45rem; }
.field--half { grid-column: span 1; }

@media (min-width: 620px) {
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
}

.field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.field .req { color: var(--sea-deep); }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: #fff;
  border: 1px solid #cfd6d3;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgb(63 115 101 / 0.16);
}

.field input::placeholder,
.field textarea::placeholder { color: #98a3a0; }

.field__hint { font-size: 0.83rem; color: var(--ink-soft); }

.form__status {
  display: none;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.form__status.is-visible { display: block; }
.form__status--error {
  background: #fbeaea;
  border: 1px solid #e6b8b8;
  color: #7d2b2b;
}

/* Direct contact — deliberately prominent, since a static form needs a
   service behind it. */
.direct {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
}
.direct__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s var(--ease);
}
.direct__item:hover { background: var(--sea-wash); }
.direct__icon {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  border-radius: 50%;
  background: var(--sea);
  color: #fff;
}
.direct__icon svg { width: 1.25rem; height: 1.25rem; }
.direct__label { font-size: 0.82rem; color: var(--ink-soft); }
.direct__value { font-size: 1.05rem; font-weight: 500; color: var(--ink); }

/* ------------------------------------------------- 11. Motion & reveal -- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* No-JS safety net: if IntersectionObserver never runs, show everything. */
.no-js .reveal { opacity: 1; transform: none; }

@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;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .brand__mark path { stroke-dashoffset: 0; animation: none; }
}

/* --------------------------------------------------- 12. Responsive ----- */

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(20rem, 84vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6rem 1.75rem 2rem;
    background: var(--slate-800);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s var(--ease-out), visibility 0.4s;
  }
  .nav.is-open { transform: none; visibility: visible; }

  /* The drawer must not swallow the toggle, or the Close button is
     unreachable once the menu is open. Keep it floating above the panel. */
  .nav-toggle { position: relative; z-index: 3; }
  .nav { z-index: 2; }
  .nav-scrim { z-index: 1; }

  .nav__link {
    padding: 0.95rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
    opacity: 1;
  }
  .nav__link::after { display: none; }
  .nav__cta {
    margin: 1.6rem 0 0;
    justify-content: center;
    background: var(--sea);
    border-color: transparent;
    color: #fff;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgb(16 26 32 / 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }

  .hero__content { max-width: 30ch; }
  .trust__item { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.08); }
  .trust__item:first-child { border-top: 0; }
}

@media (max-width: 560px) {
  .brand__tag { display: none; }
  .hero { min-height: 88svh; }
  .hero .btn { width: 100%; }
  .btn-row { gap: 0.7rem; }
  .footer-bottom { justify-content: flex-start; }

  /* Subpage heroes carry no photo, so a tall band is just dead space. */
  .hero--page { min-height: auto; padding-block: 6.5rem 3rem; }
}

/* Print — a contact page people actually print. */
@media print {
  .site-header, .site-footer, .hero__fern, .cta__fern,
  .nav-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { min-height: 0; padding: 0 0 1.5rem; background: none; color: #000; }
  .hero h1 { color: #000; font-size: 22pt; }
  .hero__media, .hero::before { display: none; }
  .section { padding-block: 1.2rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
