/* L Pro Writing — site stylesheet (front end and block editor) */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --primary: #215268;
  --primary-dark: #193f50;
  --primary-deep: #112a35;
  --secondary: #4a698e;
  --accent: #74b6db;
  --accent-soft: #e8f3f9;
  --text: #3b3b3b;
  --muted: #5c6670;
  --border: #dde5ea;
  --bg: #ffffff;
  --bg-alt: #f4f8fa;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(17, 42, 53, 0.08);
  --container: 1140px;
  --font-heading: "Jost", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: var(--primary);
}

a:hover {
  color: var(--secondary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-deep);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 500; }
h4 { font-size: 1.2rem; font-weight: 500; }

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 90px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--primary);
  color: #fff;
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section--deep {
  background: var(--primary-deep);
}

.section-head--flush {
  margin-bottom: 0;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.section-head p {
  color: var(--muted);
}

.section--dark .section-head p {
  color: rgba(255, 255, 255, 0.85);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 10px 16px;
  z-index: 1000;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* Buttons */
.btn,
.wp-block-buttons > .wp-block-button > .wp-block-button__link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 30px;
  border-radius: 50px;
  border: 2px solid var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover,
.btn:focus-visible,
.wp-block-buttons > .wp-block-button > .wp-block-button__link:hover,
.wp-block-buttons > .wp-block-button > .wp-block-button__link:focus-visible {
  background: #000;
  border-color: #000;
  color: #fff;
}

.btn--light,
.wp-block-buttons > .wp-block-button.is-style-light > .wp-block-button__link {
  background: #fff;
  border-color: #fff;
  color: var(--primary-dark);
}

.btn--light:hover,
.btn--light:focus-visible,
.wp-block-buttons > .wp-block-button.is-style-light > .wp-block-button__link:hover,
.wp-block-buttons > .wp-block-button.is-style-light > .wp-block-button__link:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary-deep);
}

.btn--outline,
.wp-block-buttons > .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):not(.has-text-color) {
  background: transparent;
  color: var(--primary-dark);
}

.btn--outline:hover,
.btn--outline:focus-visible,
.wp-block-buttons > .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):not(.has-text-color):hover,
.wp-block-buttons > .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):not(.has-text-color):focus-visible {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 1em;
}

.wp-block-buttons:last-child {
  margin-bottom: 0;
}

.hero .wp-block-buttons,
.section-head .wp-block-buttons,
.wp-block-buttons.is-centered {
  justify-content: center;
}

.wp-block-buttons.is-centered {
  margin-top: 40px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  max-width: 1280px;
}

.logo img {
  height: 46px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_parent > a,
.main-nav .current-page-ancestor > a {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  background: var(--primary-deep) url("../images/banner-img-hero-1.png") center / cover no-repeat;
  color: #fff;
  padding: 140px 0 150px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 42, 53, 0.88), rgba(25, 63, 80, 0.9));
}

.hero .container {
  position: relative;
}

.hero h1 {
  color: #fff;
  margin-bottom: 10px;
}

.hero h2 {
  color: var(--accent);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.hero p {
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: 1.2rem;
}

/* Inner page banner */
.page-banner {
  background: var(--primary);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.page-banner h1 {
  color: #fff;
  margin: 0;
}

/* Split (image + text) rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split + .split {
  margin-top: 90px;
}

.split--reverse .split__media {
  order: 2;
}

.split__media img {
  border-radius: var(--radius);
}

.stacked-media {
  position: relative;
  padding-bottom: 60px;
}

.stacked-media > :first-child {
  width: 85%;
}

.stacked-media > :last-child {
  position: absolute;
  width: 55%;
  right: 0;
  bottom: 0;
}

.stacked-media > :last-child img {
  border: 6px solid #fff;
  box-shadow: var(--shadow);
}

/* Mission / values */
.mission {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.mission .lead {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--accent);
  font-weight: 400;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.value-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow:
    0 2px 6px rgba(17, 42, 53, 0.06),
    0 14px 36px rgba(17, 42, 53, 0.14);
}

.value-card h3 {
  color: var(--primary);
}

.value-card p:last-child {
  margin-bottom: 0;
}

.values-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.values-logo img {
  max-width: 220px;
}

/* Service grid (home) */
.service-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list a,
.service-list span {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  transition: background 0.2s, transform 0.2s;
}

.service-list a::after {
  content: "→";
  margin-left: auto;
  color: var(--accent);
  transition: transform 0.2s;
}

.service-list a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.service-list a:hover::after {
  transform: translateX(4px);
}

/* Service cards (services page) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17, 42, 53, 0.14);
}

.card__media {
  display: block;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card__media a {
  display: block;
  height: 100%;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card__media img {
  transform: scale(1.05);
}

.card__body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__body h2,
.card__body h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.card__body h2 a,
.card__body h3 a {
  color: var(--primary-deep);
  text-decoration: none;
}

.card__body h2 a:hover,
.card__body h3 a:hover {
  color: var(--primary);
}

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

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

.card__link {
  margin: auto 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  text-decoration: none;
}

.card__link a {
  text-decoration: none;
}

a.card__link::after,
.card__link a::after {
  content: " →";
}

/* Quotes */
.pull-quote {
  margin: 0;
  padding: 28px 34px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary-deep);
}

.pull-quote p:last-child {
  margin-bottom: 0;
}

.pull-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  font-style: normal;
  color: var(--secondary);
}

.page-content .pull-quote:not(.split > *) {
  max-width: 860px;
  margin: 0 auto 50px;
}

.page-content .pull-quote:not(.split > *):last-child {
  margin-bottom: 0;
}

/* Testimonials */
.testimonials {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.testimonial-track {
  overflow: hidden;
}

.testimonial-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial {
  flex: 0 0 100%;
  padding: 10px 20px;
  text-align: center;
}

.testimonial h3 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.testimonial blockquote {
  margin: 0 0 20px;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.testimonial blockquote p {
  margin: 0 0 14px;
}

.stars {
  color: #f5c34b;
  font-size: 1.3rem;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.testimonial cite {
  display: block;
  font-style: normal;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent);
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.slider-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
}

.slider-dots {
  display: flex;
  gap: 10px;
}

.slider-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.slider-dots button[aria-current="true"] {
  background: var(--accent);
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-grid--leaders {
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
}

.team-grid--single {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.team-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s;
}

.team-card:hover,
.team-card:focus-visible {
  transform: translateY(-4px);
}

.team-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--accent-soft);
}

.team-card__plus {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  line-height: 38px;
}

.team-card__info {
  display: block;
  padding: 20px;
}

.team-card__name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary-deep);
}

.team-card__role {
  display: block;
  color: var(--secondary);
}

.team-bios {
  display: none;
}

.values-strip {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--primary);
  font-weight: 500;
  margin: 50px 0;
}

/* Gallery block with the "gallery" class: 4-across photo grid.
   Selectors are long to outrank the Gallery block's own layout rules. */
.wp-block-gallery.gallery.has-nested-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
}

.wp-block-gallery.gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: auto;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
}

.wp-block-gallery.gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s;
}

.wp-block-gallery.gallery.has-nested-images figure.wp-block-image:hover img {
  transform: scale(1.05);
}

/* Modal (team bios) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 25, 32, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__dialog {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.bio {
  display: grid;
  grid-template-columns: 2fr 3fr;
}

/* Photos come in any shape, so show the whole photo rather than cropping it
   to the column. */
.bio figure {
  align-self: start;
  margin: 0;
  padding: 40px 0 40px 40px;
}

.bio figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.bio__text {
  padding: 40px;
}

.bio__text h2 {
  margin-bottom: 4px;
}

.bio__text h4 {
  color: var(--secondary);
  font-family: var(--font-body);
  font-weight: 400;
  margin-bottom: 20px;
}

/* Accordion (FAQ) */
.accordion {
  max-width: 900px;
  margin: 0 auto;
}

.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 16px;
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 60px 22px 26px;
  position: relative;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-deep);
}

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

.accordion summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--primary);
}

.accordion details[open] summary::after {
  content: "−";
}

.accordion details > :not(summary) {
  margin-left: 26px;
  margin-right: 26px;
}

.accordion details > ul,
.accordion details > ol {
  padding-left: 1.2em;
}

.accordion details > :last-child {
  margin-bottom: 0;
  padding-bottom: 22px;
}

/* Pricing models */
.models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.models h3 {
  margin: 0;
  padding: 24px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
}

/* Service detail */
.service-detail {
  max-width: 860px;
  margin: 0 auto;
}

.feature-image {
  margin: 0 auto 40px;
}

.feature-image img {
  border-radius: var(--radius);
  margin: 0 auto;
}

.service-hero {
  margin: 0 0 36px;
}

.service-hero img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
}

.service-detail .subtitle {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary);
}

.feature-list {
  counter-reset: feature;
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.feature-list li {
  counter-increment: feature;
  position: relative;
  padding: 18px 20px 18px 74px;
  margin-bottom: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.feature-list li::before {
  content: counter(feature);
  position: absolute;
  left: 20px;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  text-align: center;
  line-height: 36px;
}

.service-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}

/* Blog layout */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 50px;
  align-items: start;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.sidebar {
  position: sticky;
  top: 110px;
}

.widget {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 26px;
}

.widget h2 {
  font-size: 1.3rem;
}

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

.widget li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.widget a {
  text-decoration: none;
}

.search-form {
  display: flex;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border-radius: 50px 0 0 50px;
}

.search-form button {
  border-radius: 0 50px 50px 0;
  padding: 0 18px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 50px 0 0;
}

.pagination a,
.pagination li > span {
  display: block;
  min-width: 44px;
  padding: 10px 14px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
}

.pagination li > span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.no-results {
  padding: 30px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

/* Single post */
.post-hero img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 26px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--secondary);
  margin-bottom: 14px;
}

.post-content h2 { font-size: 1.75rem; margin-top: 1.6em; }
.post-content h3 { font-size: 1.4rem; margin-top: 1.4em; }
.post-content h4 { margin-top: 1.2em; }

.post-content ul,
.post-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

.post-content li {
  margin-bottom: 0.4em;
}

.post-content figure {
  margin: 30px 0;
}

.post-content figure img,
.post-content > img,
.post-content p img {
  border-radius: 8px;
}

.post-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

.post-content blockquote {
  margin: 24px 0;
  padding: 18px 26px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

.post-content pre {
  font-family: var(--font-body);
  white-space: pre-wrap;
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  padding: 12px 18px;
  margin: 0 0 12px;
  border-radius: 0 6px 6px 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.post-nav a {
  max-width: 48%;
  text-decoration: none;
  font-family: var(--font-heading);
}

.post-nav small {
  display: block;
  color: var(--muted);
  font-family: var(--font-body);
}

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

/* Contact info */
.contact-info {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  margin-top: 26px;
  max-width: 420px;
}

.contact-info figure {
  flex: none;
  margin: 0;
}

.contact-info img {
  width: 54px;
}

.contact-info h3 {
  margin: 0;
  font-size: 1.15rem;
}

.contact-info p {
  margin: 0;
}

/* Block content */
.wp-block-image {
  margin: 0;
}

.page-content .wp-block-image:not(:last-child):not(.split__media):not(.card__media) {
  margin-bottom: 1em;
}

/* Blocks placed directly on a page, outside a section, get the content width */
.page-content > :not(.section):not(.hero):not(.page-banner) {
  width: min(100% - 40px, var(--container) - 40px);
  margin-left: auto;
  margin-right: auto;
}

.page-content:not(:has(> .section, > .hero)) {
  padding: 70px 0 50px;
}

/* Forms */
input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-status {
  margin: 14px 0 0;
  font-weight: 600;
  min-height: 1.5em;
}

.form-status.is-error {
  color: #ffb4a8;
}

.form-status.is-success {
  color: #b9f0c5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.honeypot {
  position: absolute;
  left: -5000px;
}

/* Newsletter */
.newsletter {
  background: var(--accent-soft);
  padding: 60px 0;
}

.newsletter .container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: center;
}

.newsletter h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.newsletter form {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 12px;
}

.newsletter .form-status.is-error { color: #b3261e; }
.newsletter .form-status.is-success { color: #1b6e35; }

/* Footer / contact block */
.site-footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
}

.footer-contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  padding-top: 90px;
  padding-bottom: 90px;
}

.footer-contact h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
}

.footer-contact h3 {
  color: var(--accent);
}

.footer-contact input,
.footer-contact textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.footer-contact ::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 0;
  font-size: 0.95rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Back to top */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--primary-deep);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Reveal-on-scroll. Only applies once main.js can run (the "js" class is
   set in <head>); keep the selectors in sync with REVEAL_SELECTOR in main.js. */
.js :is(
  .page-content .section-head,
  .page-content .split > *,
  .page-content .mission,
  .page-content .value-card,
  .page-content .values-logo,
  .page-content .service-list,
  .page-content .models,
  .page-content .pull-quote,
  .page-content .values-strip,
  .page-content .accordion > *,
  .page-content .service-detail > *,
  .card,
  .team-card
) {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js :is(
  .page-content .section-head,
  .page-content .split > *,
  .page-content .mission,
  .page-content .value-card,
  .page-content .values-logo,
  .page-content .service-list,
  .page-content .models,
  .page-content .pull-quote,
  .page-content .values-strip,
  .page-content .accordion > *,
  .page-content .service-detail > *,
  .card,
  .team-card
):not(.is-visible) {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js :is(.page-content *, .card, .team-card) { opacity: 1 !important; transform: none !important; }
  * { transition-duration: 0.01ms !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .card-grid,
  .team-grid,
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .wp-block-gallery.gallery.has-nested-images {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 10px 20px 20px;
    gap: 0;
  }

  .split,
  .footer-contact,
  .newsletter .container,
  .bio {
    grid-template-columns: 1fr;
  }

  .split {
    gap: 36px;
  }

  .split--reverse .split__media {
    order: 0;
  }

  .bio figure {
    padding: 40px 40px 0;
  }

  .bio figure img {
    width: auto;
    max-width: 100%;
    max-height: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 100px 0;
  }

  .card-grid,
  .team-grid,
  .team-grid--leaders,
  .team-grid--single,
  .service-list,
  .post-list,
  .models,
  .form-grid,
  .newsletter form {
    grid-template-columns: 1fr;
  }

  .wp-block-gallery.gallery.has-nested-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .bio figure {
    padding: 28px 22px 0;
  }

  .bio__text {
    padding: 28px 22px;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
  }
}
