:root {
  --bg: #0f0f0f;
  --ink: #f3f0ea;
  --paper: #f5f2ec;
  --paper-2: #ebe6dc;
  --text: #1d1b18;
  --muted: #6f665d;
  --line: rgba(29, 27, 24, .14);
  --line-dark: rgba(243, 240, 234, .2);
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-size: 14.5px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 999;
}
.skip-link:focus { left: 8px; }

.wrap,
.cs-section > .wp-block-group__inner-container,
.site-header .wrap,
.site-footer .wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 15, 15, .92);
  color: var(--ink);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: .02em; }
.brand-role { color: rgba(243, 240, 234, .72); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-top: 5px; }
.site-nav { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.primary-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 16px; }
.primary-menu li { margin: 0; padding: 0; }
.primary-menu a { color: rgba(243, 240, 234, .9); text-decoration: none; }
.primary-menu a:hover { color: #fff; }
.primary-menu li:last-child a { border-left: 1px solid var(--line-dark); padding-left: 18px; color: #fff; }
.site-nav a { color: rgba(243, 240, 234, .9); text-decoration: none; }
.site-nav a:hover { color: #fff; }
.nav-secondary { border-left: 1px solid var(--line-dark); padding-left: 18px; color: #fff !important; }

.cs-section {
  padding: clamp(72px, 9vw, 132px) 0;
}
.section-dark {
  background: var(--bg);
  color: var(--ink);
}
.section-muted { background: var(--paper-2); }
.cs-section:first-child { padding-top: clamp(64px, 8vw, 110px); }

.cs-hero-grid {
  gap: clamp(32px, 6vw, 80px) !important;
  align-items: center !important;
}
.cs-hero h1,
.cs-section h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5.2vw, 58px);
  line-height: .96;
  letter-spacing: -.04em;
  margin: 0 0 24px;
}
.cs-section h2 {
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 20px;
}
.cs-section p { margin-top: 0; }
.kicker,
.section-label {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 18px;
}
.section-dark .kicker,
.section-dark .section-label { color: rgba(243, 240, 234, .65); }
.hero-intro {
  font-size: clamp(15.5px, 1.45vw, 18px);
  color: rgba(243, 240, 234, .82);
  max-width: 680px;
}
.wp-block-buttons.button-row { margin-top: 28px; gap: 10px; }
.wp-block-button.button .wp-block-button__link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  padding: 10px 15px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  box-shadow: none;
}
.wp-block-button.button-ghost .wp-block-button__link,
.button-ghost {
  background: transparent !important;
  color: var(--ink) !important;
  border-color: var(--line-dark) !important;
}

.cs-hero-cover {
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #252525, #111);
  min-height: 520px;
}
.cs-hero-cover img { object-fit: cover; }
.hero-placeholder {
  color: rgba(243, 240, 234, .72);
  font-size: 13px;
}

.two-col,
.contact-grid {
  gap: clamp(30px, 6vw, 90px) !important;
  align-items: flex-start !important;
}
.copy-large {
  font-size: clamp(14.5px, 1.35vw, 16.5px);
}
.copy-large p { color: rgba(29, 27, 24, .82); }
.section-dark .copy-large p { color: rgba(243, 240, 234, .82); }
.plain-list {
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.plain-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.section-dark .plain-list { border-top-color: var(--line-dark); }
.section-dark .plain-list li { border-bottom-color: var(--line-dark); }

.section-work > .wp-block-group__inner-container > p:not(.section-label) { max-width: 720px; color: var(--muted); }
.cs-work-gallery {
  margin-top: 38px !important;
  gap: 16px !important;
}
.cs-work-gallery figure.wp-block-image,
.wp-block-gallery figure.wp-block-image {
  background: rgba(15, 15, 15, .08);
}
.cs-work-gallery img,
.wp-block-gallery img {
  width: 100% !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(.92);
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,0));
  font-size: 12px;
  padding-top: 34px;
}

.contact-card {
  background: var(--bg);
  color: var(--ink);
  padding: clamp(24px, 4vw, 42px);
  border-radius: 4px;
}
.contact-card p {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-dark);
}
.contact-card p:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.contact-card strong,
.contact-card span {
  display: block;
  color: rgba(243, 240, 234, .62);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 4px;
}

.site-footer {
  background: var(--bg);
  color: rgba(243, 240, 234, .72);
  padding: 30px 0;
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
}
.footer-inner p { margin: 0; }
.footer-left { text-align: left; }
.footer-centre { text-align: center; }
.footer-right { text-align: right; }
.site-footer a {
  color: rgba(243, 240, 234, .88);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 240, 234, .35);
}
.site-footer a:hover { color: #fff; border-bottom-color: #fff; }

.footer-social {
  display: inline-flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-vain { line-height: 1.55; }



.entry-content > * { margin-block-start: 0; }
.entry-content .cs-section { margin-block-start: 0; }

@media (max-width: 860px) {
  .site-header { position: static; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .site-nav, .primary-menu { flex-wrap: wrap; gap: 12px 16px; }
  .nav-secondary { border-left: 0; padding-left: 0; width: 100%; }
  .primary-menu li:last-child a { border-left: 0; padding-left: 0; }
  .cs-section { padding: 64px 0; }
  .cs-hero-cover { min-height: 360px !important; }
}

@media (max-width: 600px) {
  :root { --gutter: 18px; }
  .wp-block-buttons.button-row { align-items: stretch; }
  .wp-block-button.button,
  .wp-block-button.button .wp-block-button__link { width: 100%; }
}
.cs-gallery-placeholder {
  margin-top: 38px;
  border: 1px dashed var(--line);
  padding: 34px;
  color: var(--muted);
  background: rgba(255,255,255,.26);
}


/* v1.0.9 tighter type scale */
.editable-homepage .cs-section h1 { font-size: clamp(32px, 5.2vw, 58px); }
.editable-homepage .cs-section h2 { font-size: clamp(23px, 3vw, 34px); }
.editable-homepage .hero-intro { font-size: clamp(15.5px, 1.45vw, 18px); }
.editable-homepage .copy-large { font-size: clamp(14.5px, 1.35vw, 16.5px); }
.editable-homepage p, .editable-homepage li { font-size: 0.98rem; }

/* Hero carousel: add class "cs-hero-carousel" to the Gallery block used in the hero image area.
   The selectors deliberately cover both modern WP gallery markup and older gallery markup. */
.wp-block-gallery.cs-hero-carousel,
.cs-hero-carousel {
  position: relative !important;
  display: block !important;
  min-height: 520px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  gap: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(243, 240, 234, .08);
}
.wp-block-gallery.cs-hero-carousel.has-nested-images,
.wp-block-gallery.cs-hero-carousel.columns-default,
.wp-block-gallery.cs-hero-carousel.columns-1,
.wp-block-gallery.cs-hero-carousel.columns-2,
.wp-block-gallery.cs-hero-carousel.columns-3 {
  display: block !important;
}
.wp-block-gallery.cs-hero-carousel .blocks-gallery-grid,
.cs-hero-carousel .blocks-gallery-grid {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wp-block-gallery.cs-hero-carousel > figure,
.wp-block-gallery.cs-hero-carousel figure.wp-block-image,
.cs-hero-carousel .blocks-gallery-grid > li,
.cs-hero-carousel .blocks-gallery-item,
.cs-hero-carousel .wp-block-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transition: opacity 900ms ease;
  z-index: 1;
}
.wp-block-gallery.cs-hero-carousel > figure.is-active,
.wp-block-gallery.cs-hero-carousel figure.wp-block-image.is-active,
.cs-hero-carousel .blocks-gallery-grid > li.is-active,
.cs-hero-carousel .blocks-gallery-item.is-active,
.cs-hero-carousel .wp-block-image.is-active {
  opacity: 1;
  z-index: 2;
}
.wp-block-gallery.cs-hero-carousel img,
.cs-hero-carousel img {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  margin: 0 !important;
}

/* Optional fit-frame mode: add this as a second Gallery class when you want the hero frame
   to follow each image's own aspect ratio instead of using a fixed-height frame.
   Use with: cs-hero-carousel cs-hero-carousel-fit-frame */
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-fit-frame,
.cs-hero-carousel.cs-hero-carousel-fit-frame {
  min-height: 0;
  height: auto;
  aspect-ratio: 3 / 2;
  transition: aspect-ratio 350ms ease;
}

/* Fixed ratio alternatives. These avoid cropping while keeping a stable frame height.
   Add one as a second class: cs-hero-carousel-ratio-3-2, -4-3, -16-9, or -1-1. */
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-ratio-3-2,
.cs-hero-carousel.cs-hero-carousel-ratio-3-2 { min-height: 0; aspect-ratio: 3 / 2; }
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-ratio-4-3,
.cs-hero-carousel.cs-hero-carousel-ratio-4-3 { min-height: 0; aspect-ratio: 4 / 3; }
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-ratio-16-9,
.cs-hero-carousel.cs-hero-carousel-ratio-16-9 { min-height: 0; aspect-ratio: 16 / 9; }
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-ratio-1-1,
.cs-hero-carousel.cs-hero-carousel-ratio-1-1 { min-height: 0; aspect-ratio: 1 / 1; }

/* Optional: add cs-hero-carousel-crop as a second class if you later want a cropped full-bleed hero again. */
.wp-block-gallery.cs-hero-carousel.cs-hero-carousel-crop img,
.cs-hero-carousel.cs-hero-carousel-crop img {
  object-fit: cover !important;
}

.wp-block-gallery.cs-hero-carousel figcaption,
.cs-hero-carousel figcaption {
  display: none !important;
}
.wp-block-gallery.cs-hero-carousel::after,
.cs-hero-carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
  pointer-events: none;
  z-index: 3;
}
@media (max-width: 720px) {
  .wp-block-gallery.cs-hero-carousel:not(.cs-hero-carousel-fit-frame):not(.cs-hero-carousel-ratio-3-2):not(.cs-hero-carousel-ratio-4-3):not(.cs-hero-carousel-ratio-16-9):not(.cs-hero-carousel-ratio-1-1),
  .cs-hero-carousel:not(.cs-hero-carousel-fit-frame):not(.cs-hero-carousel-ratio-3-2):not(.cs-hero-carousel-ratio-4-3):not(.cs-hero-carousel-ratio-16-9):not(.cs-hero-carousel-ratio-1-1) { min-height: 360px; }
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .footer-left,
  .footer-centre,
  .footer-right {
    text-align: center;
  }
  .footer-social {
    justify-content: center;
  }
}
