/* ==========================================================================
   Cicali Construction — site styles
   Brand: yellow #FFD21F + charcoal #1C1C1C + white, angular/hexagonal motif,
   condensed uppercase display type. Taken from the company's own print flyer.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */
:root {
  --yellow: #ffd21f;
  --yellow-dark: #e0b400;
  --yellow-soft: #fff6d4;

  --ink: #1c1c1c;
  --charcoal: #2b2b2b;
  --charcoal-light: #3a3a3a;

  --gray-700: #4a4a4a;
  --gray-500: #767676;
  --gray-300: #d6d4d0;
  --gray-200: #e7e5e1;
  --sand: #f6f5f3;
  --white: #ffffff;

  --danger: #b3261e;
  --success: #1d7a3e;

  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --header-h: 76px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.1), 0 32px 64px rgba(0, 0, 0, 0.12);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.06;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
}
h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}
h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

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

/* ------------------------------------------------------------- a11y/util -- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--sand {
  background: var(--sand);
}

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

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

/* Small uppercase kicker above a section heading, with a yellow rule. */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.9rem;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--yellow);
  flex: none;
}

.section--dark .kicker {
  color: var(--yellow);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

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

.lead {
  font-size: 1.15rem;
  color: var(--gray-700);
}

.section--dark .lead {
  color: var(--gray-300);
}

/* --------------------------------------------------------------- buttons -- */
.btn {
  --btn-bg: var(--yellow);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.75rem;
  border: 2px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  /* Angular notch on the bottom-right — echoes the flyer's cut-corner shapes. */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-2px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: currentColor;
}

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

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

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

.btn--lg {
  padding: 1.15rem 2.25rem;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* Text link that reveals an arrow on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
  transition: gap 0.18s var(--ease);
}

.link-arrow:hover {
  gap: 0.75rem;
}

.section--dark .link-arrow {
  color: var(--white);
}

/* ---------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--yellow);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Logo: traced from the company mark — open house outline + underlined wordmark. */
.logo {
  display: flex;
  align-items: flex-end;
  gap: 0.1rem;
  text-decoration: none;
  color: currentColor;
  flex: none;
}

.logo-mark {
  width: 34px;
  height: 38px;
  margin-right: -7px;
  flex: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid currentColor;
  padding-bottom: 3px;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
}

.logo-sub {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.31em;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  color: var(--yellow);
}

.site-header .logo-mark {
  color: var(--yellow);
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.main-nav a:hover {
  color: var(--white);
  border-bottom-color: rgba(255, 210, 31, 0.5);
}

.main-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--yellow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
}

.header-phone svg {
  width: 16px;
  height: 16px;
  color: var(--yellow);
}

.header-phone:hover {
  color: var(--yellow);
}

.header-actions .btn {
  padding: 0.7rem 1.3rem;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  flex: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 1040px) {
  .main-nav ul {
    gap: 1.2rem;
  }
  .header-phone {
    display: none;
  }
}

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

  .main-nav,
  .header-actions {
    display: none;
  }

  .site-header.is-open .main-nav,
  .site-header.is-open .header-actions {
    display: flex;
    order: 3;
    width: 100%;
  }

  .site-header.is-open .wrap {
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
  }

  .site-header.is-open .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .site-header.is-open .main-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-header.is-open .header-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1rem;
  }

  .site-header.is-open .header-phone {
    display: inline-flex;
    justify-content: center;
    font-size: 1.15rem;
  }
}

/* ------------------------------------------------------------------ hero -- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--ink);
  color: var(--gray-300);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 5.5rem) clamp(1.5rem, 4vw, 4rem);
  max-width: 720px;
  margin-left: auto;
  width: 100%;
}

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

.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1.1rem;
}

.hero p {
  font-size: 1.12rem;
  max-width: 46ch;
}

.hero-media {
  position: relative;
  min-height: 340px;
  background: var(--charcoal);

  /* Matches the cropped hero photo, which is 1600x1578. Because the frame and
     the photo are the same shape, `cover` below fills the panel edge to edge
     without discarding anything — no bars at the sides, and the crown moulding
     and the full desk both stay in frame. The crop itself is defined by HERO in
     scripts/photos.py; if you change it, change this. */
  aspect-ratio: 1 / 1;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  /* Safe because .hero-media is shaped to match the photo — see above. */
  object-fit: cover;
}

/* Yellow angled seam between copy and photo. */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: var(--yellow);
  z-index: 2;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    max-width: none;
    order: 2;
  }
  .hero-media {
    order: 1;
    min-height: 46vh;
  }
  .hero-media::before {
    inset: auto 0 0 0;
    width: auto;
    height: 10px;
  }
}

/* ------------------------------------------------------------ trust strip -- */
.trust-strip {
  background: var(--yellow);
  color: var(--ink);
}

.trust-strip ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-strip li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.15rem 1rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.12);
}

.trust-strip li:last-child {
  box-shadow: none;
}

.trust-strip svg {
  width: 19px;
  height: 19px;
  flex: none;
}

@media (max-width: 840px) {
  .trust-strip ul {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-strip li {
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.12), 0 1px 0 rgba(0, 0, 0, 0.12);
    font-size: 0.8rem;
  }
}

/* -------------------------------------------------------------- services -- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.service-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 4px;
  background: var(--yellow);
  transition: width 0.28s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.service-card:hover::after {
  width: 100%;
}

.service-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 1.15rem;
  color: var(--ink);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.98rem;
  color: var(--gray-700);
  margin-bottom: 0;
}

.service-card .link-arrow {
  margin-top: 1.25rem;
  align-self: flex-start;
}

/* Detailed service rows on the Services page. */
.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--gray-200);
}

.service-detail:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.service-detail:nth-child(even) .service-detail-media {
  order: -1;
}

.service-detail-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--yellow-dark);
  margin-bottom: 0.6rem;
}

.check-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.99rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 11px;
  height: 6px;
  border-left: 2.5px solid var(--yellow-dark);
  border-bottom: 2.5px solid var(--yellow-dark);
  transform: rotate(-45deg);
}

@media (max-width: 820px) {
  .service-detail {
    grid-template-columns: 1fr;
  }
  .service-detail:nth-child(even) .service-detail-media {
    order: 0;
  }
}

/* ------------------------------------------------------------- portfolio -- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.15rem;
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

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

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--charcoal);
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s var(--ease), opacity 0.25s var(--ease);
}

.gallery-btn:hover img {
  transform: scale(1.05);
  opacity: 0.82;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
  padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  color: var(--white);
}

.gallery-caption strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gallery-caption span {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--yellow);
}

/* The rest of a project's photos. The lightbox reads these links and CSS hides
   them; the <noscript> block in each page overrides this so that with scripting
   off every photo is still reachable as an ordinary link. */
.project-shots {
  display: none;
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Lightbox.

   The base rule must NOT set a visible `display`. A <dialog> is hidden by the
   browser's own stylesheet only while it lacks the `open` attribute, and any
   author `display` value overrides that — so `display: flex` here would pin an
   opaque full-viewport panel over every page whether the dialog was open or
   not. Layout belongs in the [open] rule below. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 12, 12, 0.94);
  border: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.lightbox::backdrop {
  background: rgba(12, 12, 12, 0.94);
}

.lightbox[open] {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-height: 100%;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  object-fit: contain;
}

.lightbox-figure figcaption {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
}

.lightbox-close,
.lightbox-nav button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.lightbox-close:hover,
.lightbox-nav button:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
}

.lightbox-nav .lb-prev {
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav .lb-next {
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox svg {
  width: 22px;
  height: 22px;
}

/* ---------------------------------------------------------------- process -- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-top: 2.5rem;
  border-top: 3px solid rgba(255, 255, 255, 0.15);
  counter-increment: step;
}

.process-step::before {
  content: "0" counter(step);
  position: absolute;
  top: 1rem;
  left: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--yellow);
}

.process-step h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.97rem;
  margin: 0;
}

/* --------------------------------------------------------------- reasons -- */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.25rem;
}

.reason {
  display: flex;
  flex-direction: column;
}

.reason-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink);
  margin-bottom: 1.1rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.reason-icon svg {
  width: 26px;
  height: 26px;
}

/* --------------------------------------------------------------- split ---- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split-media img {
  width: 100%;
  object-fit: cover;
}

.split-media--framed {
  position: relative;
}

/* Offset yellow frame behind the photo. */
.split-media--framed::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 3px solid var(--yellow);
  z-index: -1;
}

@media (max-width: 820px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split-media--framed::before {
    inset: 12px -12px -12px 12px;
  }
}

/* ------------------------------------------------------------- referral --- */
.referral {
  position: relative;
  background: var(--yellow);
  color: var(--ink);
  overflow: hidden;
}

.referral .wrap {
  position: relative;
  z-index: 1;
}

.referral h2 {
  color: var(--ink);
}

.referral-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.75rem 0;
}

.referral-amount {
  background: var(--ink);
  color: var(--white);
  padding: 1.15rem 1.75rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.referral-amount strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--yellow);
}

.referral-amount span {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Faint hexagon watermark, matching the flyer's motif. */
.referral::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -40px;
  width: 340px;
  height: 340px;
  background: rgba(0, 0, 0, 0.05);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* ---------------------------------------------------------- testimonials -- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

/* With one review, auto-fit would stretch the single card the full width of the
   page and it would read as a banner rather than a quote. Hold it to a column
   and centre it. Drop this class once there are two or more. */
.testimonial-grid--single {
  max-width: 620px;
  margin: 0 auto;
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 1.85rem 1.6rem;
  display: flex;
  flex-direction: column;
}

.testimonial .stars {
  display: flex;
  gap: 2px;
  color: var(--yellow-dark);
  margin-bottom: 0.9rem;
}

.testimonial .stars svg {
  width: 17px;
  height: 17px;
}

.testimonial blockquote {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  color: var(--gray-700);
}

.testimonial cite {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: auto;
}

.testimonial cite span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray-500);
}

/* Placeholder styling — see PLACEHOLDERS.md. Remove class once real reviews land. */
.testimonial--placeholder {
  border-style: dashed;
  border-color: var(--gray-300);
  background: var(--sand);
}

.testimonial--placeholder blockquote {
  color: var(--gray-500);
  font-style: italic;
}

/* ------------------------------------------------------------- CTA band --- */
.cta-band {
  background: var(--ink);
  color: var(--gray-300);
}

.cta-band .split {
  align-items: center;
}

.cta-band h2 {
  color: var(--white);
}

/* ----------------------------------------------------------------- form --- */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.field label .req {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 0;
  font-size: 1rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a4a4a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px;
  padding-right: 2.4rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 210, 31, 0.45);
}

.field .hint {
  font-size: 0.82rem;
  color: var(--gray-500);
}

.field-error {
  font-size: 0.85rem;
  color: var(--danger);
  min-height: 0;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

/* Honeypot — hidden from people, visible to naive bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  border-left: 4px solid var(--gray-300);
  background: var(--sand);
}

.form-status[hidden] {
  display: none;
}

.form-status--error {
  border-left-color: var(--danger);
  background: #fdf1f0;
  color: var(--danger);
}

/* Injected by the server above the page when a no-JavaScript submission fails.
   See sendContactWithError in server.js. */
.form-alert {
  margin: 1.5rem 0 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  border-left: 4px solid var(--danger);
  background: #fdf1f0;
  color: var(--danger);
}

.form-status--ok {
  border-left-color: var(--success);
  background: #f0f8f2;
  color: var(--success);
}

.form-footnote {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact inline form used in the homepage CTA band. */
.form-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-inline .field label {
  color: var(--white);
}

.form-inline input,
.form-inline select {
  background: var(--charcoal);
  border-color: var(--charcoal-light);
  color: var(--white);
}

.form-inline input::placeholder {
  color: var(--gray-500);
}

.form-inline input:focus,
.form-inline select:focus {
  border-color: var(--yellow);
}

.form-inline select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d6d4d0' stroke-width='1.6'/%3E%3C/svg%3E");
}

.form-inline .form-status {
  background: var(--charcoal);
  border-left-color: var(--charcoal-light);
  color: var(--gray-300);
}

/* --------------------------------------------------------------- contact -- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
}

.contact-list .ci {
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink);
}

.contact-list .ci svg {
  width: 20px;
  height: 20px;
}

.contact-list dt,
.contact-list h3 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 0.15rem;
}

.contact-list a,
.contact-list p {
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}

.contact-list a:hover {
  color: var(--yellow-dark);
}

/* -------------------------------------------------------------- page head -- */
.page-head {
  background: var(--ink);
  color: var(--gray-300);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  border-bottom: 3px solid var(--yellow);
}

.page-head h1 {
  color: var(--white);
  margin-bottom: 0.4rem;
}

.page-head p {
  max-width: 58ch;
  font-size: 1.1rem;
  margin: 0;
}

.breadcrumb {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: var(--yellow);
  text-decoration: none;
}

/* ------------------------------------------------------------------ misc -- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.section--dark .stat strong {
  color: var(--yellow);
}

.stat span {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.area-list li {
  font-size: 0.88rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.section--dark .area-list li {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--gray-300);
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq details {
  border: 1px solid var(--gray-200);
  background: var(--white);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.4rem;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--yellow-dark);
  border-bottom: 2px solid var(--yellow-dark);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 1.75rem;
}

.faq .faq-body {
  padding: 0 1.25rem 1.3rem;
  font-size: 0.99rem;
}

/* ---------------------------------------------------------------- footer -- */
.site-footer {
  background: var(--ink);
  color: var(--gray-500);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 3px solid var(--yellow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.site-footer .logo {
  color: var(--white);
  margin-bottom: 1.1rem;
}

.site-footer .logo-mark {
  color: var(--yellow);
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  margin-bottom: 1.1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.site-footer a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s var(--ease);
}

.site-footer a:hover {
  color: var(--yellow);
}

.site-footer p {
  font-size: 0.95rem;
  color: var(--gray-500);
}

.social-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.social-row a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gray-300);
  transition: all 0.15s var(--ease);
}

.social-row a:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.social-row svg {
  width: 19px;
  height: 19px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ------------------------------------------------------------- 404 / misc -- */
.center-page {
  text-align: center;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.center-page .btn-row {
  justify-content: center;
}

.big-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 0.85;
  color: var(--yellow);
  margin-bottom: 1rem;
}

.success-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.success-mark svg {
  width: 38px;
  height: 38px;
}

.next-steps {
  list-style: none;
  margin: 2.5rem auto 0;
  padding: 0;
  max-width: 520px;
  text-align: left;
  display: grid;
  gap: 1rem;
  counter-reset: ns;
}

.next-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  counter-increment: ns;
}

.next-steps li::before {
  content: counter(ns);
  flex: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

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

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .btn {
    display: none !important;
  }
}
