/* ============================================================================
   SECTIONS.CSS  ·  Layout for the site header + every homepage section + footer
   Read top-to-bottom, it matches the order sections appear in index.html.
   Responsive media queries live at the very bottom.
   ========================================================================== */

/* ============================ SITE HEADER / NAV =========================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
/* Glassy background appears once the page is scrolled (added by JS) */
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav { width: 100%; max-width: var(--container); margin-inline: auto;
       padding-inline: var(--gutter); display: flex; align-items: center;
       justify-content: space-between; gap: var(--space-4); }

.brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500;
         color: var(--brand); letter-spacing: -0.02em; }
.brand span { color: var(--accent); }  /* the coral full-stop */

.nav-links { display: flex; align-items: center; gap: var(--space-5); }
.nav-links a { font-size: var(--fs-sm); color: var(--text); font-weight: 500;
               position: relative; padding: 0.25rem 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-pill);
  display: grid; place-items: center; color: var(--text);
  border: 1px solid var(--border); transition: background var(--dur-fast) var(--ease);
}
.theme-toggle:hover { background: var(--color-surface-alt); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hamburger (mobile only) */
.nav-toggle { display: none; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text);
                   margin: 4px auto; transition: transform var(--dur) var(--ease),
                   opacity var(--dur) var(--ease); }

/* ================================ HERO =================================== */
.hero { padding-top: calc(var(--nav-h) + var(--space-7));
        padding-bottom: var(--section-y); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr;
              gap: var(--space-7); align-items: center; }
.hero h1 { margin-bottom: var(--space-4); }
.hero h1 .em { color: var(--brand); font-style: italic; }
.hero-lead { font-size: var(--fs-lg); color: var(--text-muted);
             max-width: 46ch; margin-bottom: var(--space-5); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Portrait block — replace the .portrait-ph placeholder with a real <img> */
.hero-portrait { position: relative; }
.wp-block-image.portrait,
.wp-block-image.portrait img {
  border-radius: var(--radius-card);
  overflow: hidden;
  width: 100%;
}
.portrait-ph {
  aspect-ratio: 4 / 5; border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--color-surface-alt), #E9E3D8);
  border: 1px solid var(--border); overflow: hidden;
  display: grid; place-items: center;
}
.portrait-ph svg { width: 55%; height: 55%; color: #B4AB99; opacity: 0.9; }
/* floating chips over the portrait */
.hero-portrait .badge-available { position: absolute; left: var(--space-4);
  bottom: var(--space-4); box-shadow: var(--shadow-md); }
.stat-chip {
  position: absolute; right: calc(var(--space-4) * -0.5); top: var(--space-5);
  background: var(--brand); color: #fff; border-radius: var(--radius-media);
  padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-lg);
}
.stat-chip b { font-family: var(--font-display); font-size: 1.6rem; color: #fff; display: block; }
.stat-chip span { font-size: var(--fs-xs); color: var(--color-pine-light); }

/* ============================= TRUST STRIP =============================== */
.trust { border-block: 1px solid var(--border); padding-block: var(--space-6); }
.trust-label { font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
  text-align: center; margin-bottom: var(--space-4); }
.trust-logos { display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: var(--space-6); }
.trust-logos span { font-weight: 600; font-size: 1.05rem; color: var(--color-faint);
  filter: grayscale(1); transition: color var(--dur) var(--ease); }
.trust-logos span:hover { color: var(--text); }

/* ============================ SELECTED WORK ============================== */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4); }
.work-card { overflow: hidden; display: flex; flex-direction: column; }
.work-card--featured { grid-row: span 2; }
.work-cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.work-card--featured .work-cover { aspect-ratio: 16 / 10; }
.work-cover.cover-pine  { background: var(--color-pine); }
.work-cover.cover-sand  { background: #E9E3D8; }
.work-cover.cover-alt   { background: var(--color-surface-alt); }
/* simple decorative "chart line" motif for cover placeholders */
.work-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.work-body { padding: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-2); flex: 1; }
.work-body .tags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.work-body h3 { margin-top: var(--space-1); }
.work-result { font-family: var(--font-display); font-size: 1.5rem;
  color: var(--accent); font-weight: 500; }
.work-result small { font-family: var(--font-body); font-size: var(--fs-sm);
  color: var(--text-muted); font-weight: 400; margin-left: 0.4rem; }

/* ============================= RESULTS BAND ============================== */
.results { background: var(--color-pine); color: #fff; }
:root[data-theme="dark"] .results { background: var(--color-surface); }
.results .eyebrow { color: var(--color-ochre); }
.results h2 { color: #fff; margin-bottom: var(--space-6); }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5); }
.stat { border-left: 2px solid rgba(255,255,255,0.18); padding-left: var(--space-4); }
.stat .num { font-family: var(--font-display); font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 500; color: #fff; line-height: 1; }
.stat .label { font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-pine-light); margin-top: var(--space-2); }
:root[data-theme="dark"] .stat .num { color: var(--text); }

/* =============================== SERVICES ================================ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4); }
.service-card { padding: var(--space-5); display: flex; flex-direction: column;
  gap: var(--space-3); }
.service-icon { width: 48px; height: 48px; border-radius: var(--radius-media);
  display: grid; place-items: center; background: var(--color-surface-alt);
  color: var(--brand); }
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: var(--fs-h3); }
.service-card p { color: var(--text-muted); font-size: var(--fs-sm); }
.service-card .tags { display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: auto; padding-top: var(--space-2); }

/* ============================ CERTIFIED BY =============================== */
/* Education feature card */
.edu-card { display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-5); margin-bottom: var(--space-5); }
.edu-logo { flex: 0 0 96px; width: 96px; height: 96px; border-radius: var(--radius-media);
  background: var(--color-pine); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.6rem; }
.edu-info { flex: 1; }
.edu-info .pill { background: #F6E7CF; color: #9A6E1F; margin-bottom: var(--space-2); }
:root[data-theme="dark"] .edu-info .pill { background: color-mix(in srgb, var(--color-ochre) 22%, transparent); color: var(--color-ochre); }
.edu-info h3 { margin-bottom: var(--space-1); }
.edu-info .edu-spec { color: var(--brand); font-weight: 600; font-size: var(--fs-sm); }
.edu-info .edu-meta { color: var(--text-muted); font-size: var(--fs-sm); }
.edu-card .link { margin-left: auto; align-self: flex-start; white-space: nowrap; }

/* Certificate grid */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.cert-card { padding: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-2); }
.cert-top { display: flex; align-items: flex-start; justify-content: space-between; }
.cert-card .logo-tile { width: 120px; height: 46px; font-size: var(--fs-sm); }
.cert-card h3 { font-size: 1.2rem; margin-top: var(--space-2); }
.cert-issuer { color: var(--text-muted); font-size: var(--fs-sm); }
.cert-id { font-family: var(--font-mono); font-size: 0.7rem; color: var(--color-faint); }
.cert-card .pill { background: var(--color-surface-alt); color: var(--text-muted);
  align-self: flex-start; margin-top: var(--space-1); }
.cert-actions { display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: var(--space-3); }
.cert-actions .view { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }

/* Logo wall */
.logo-wall { margin-top: var(--space-6); border-top: 1px solid var(--border);
  padding-top: var(--space-6); text-align: center; }
.logo-wall .trust-label { margin-bottom: var(--space-4); }
.logo-wall .row { display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: var(--space-6); }
.logo-wall .row span { font-weight: 600; color: var(--color-faint);
  filter: grayscale(1); transition: color var(--dur) var(--ease); }
.logo-wall .row span:hover { color: var(--text); }

/* =============================== ABOUT ================================== */
.about-inner { display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-7); align-items: center; }
.about-portrait .portrait-ph { aspect-ratio: 1 / 1; }
.about-text p { color: var(--text-muted); margin-bottom: var(--space-3); }
.about-text p strong { color: var(--text); font-weight: 600; }
/* "How I work" process strip */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3);
  margin-block: var(--space-5); }
.process-step { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-media); padding: var(--space-3); }
.process-step .n { font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--accent); }
.process-step b { display: block; font-family: var(--font-display); font-weight: 500;
  font-size: 1.1rem; margin-top: var(--space-1); }

/* ============================ TESTIMONIALS ============================== */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.testi-card { padding: var(--space-5); display: flex; flex-direction: column;
  gap: var(--space-3); }
.testi-card .quote-mark { font-family: var(--font-display); font-size: 3rem;
  line-height: 0.5; color: var(--color-ochre); height: 1.2rem; }
.testi-card blockquote { font-family: var(--font-display); font-style: italic;
  font-size: 1.2rem; line-height: 1.45; color: var(--text); }
.testi-who { display: flex; align-items: center; gap: var(--space-3);
  margin-top: auto; padding-top: var(--space-2); }
.testi-who .avatar { width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-surface-alt); flex: 0 0 40px; }
.testi-who .name { font-weight: 600; font-size: var(--fs-sm); }
.testi-who .role { color: var(--text-muted); font-size: var(--fs-xs); }

/* ============================= BLOG / INSIGHTS ========================== */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.post { overflow: hidden; display: flex; flex-direction: column; }
.post-cover { aspect-ratio: 16 / 10; }
.post-cover.c1 { background: linear-gradient(150deg, var(--color-pine), #2E5A4C); }
.post-cover.c2 { background: linear-gradient(150deg, #E9E3D8, #D8CFBF); }
.post-cover.c3 { background: linear-gradient(150deg, var(--color-coral), #E0A44A); }
.post-body { padding: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-2); flex: 1; }
.post .pill { background: var(--color-surface-alt); color: var(--text-muted);
  align-self: flex-start; }
.post h3 { font-size: 1.25rem; }
.post p { color: var(--text-muted); font-size: var(--fs-sm); }
.post-meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em;
  color: var(--color-faint); text-transform: uppercase; margin-top: auto;
  padding-top: var(--space-2); }

/* =============================== FINAL CTA ============================== */
.cta { background: var(--color-pine); color: #fff; text-align: center; }
:root[data-theme="dark"] .cta { background: var(--color-surface); }
.cta .eyebrow { color: var(--color-ochre); }
.cta h2 { color: #fff; max-width: 20ch; margin-inline: auto; margin-bottom: var(--space-4); }
:root[data-theme="dark"] .cta h2 { color: var(--text); }
.cta p { color: rgba(255,255,255,0.75); max-width: 46ch; margin-inline: auto;
  margin-bottom: var(--space-5); }
:root[data-theme="dark"] .cta p { color: var(--text-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center;
  align-items: center; }
.cta-email { color: #fff; font-family: var(--font-mono); font-size: var(--fs-sm);
  display: inline-flex; align-items: center; gap: 0.5rem; }
:root[data-theme="dark"] .cta-email { color: var(--text); }
.cta-email:hover { color: var(--color-ochre); }

/* ================================ FOOTER =============================== */
.site-footer { background: var(--color-pine); color: rgba(255,255,255,0.75);
  padding-block: var(--space-7) var(--space-5); }
:root[data-theme="dark"] .site-footer { background: #100F0C; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-5); padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-brand .brand { color: #fff; }
.footer-brand .brand span { color: var(--color-coral); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: var(--fs-sm);
  max-width: 32ch; margin-top: var(--space-3); }
.footer-col h4 { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-pine-light);
  margin-bottom: var(--space-3); }
.footer-col a { display: block; color: rgba(255,255,255,0.78); font-size: var(--fs-sm);
  padding: 0.3rem 0; transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: var(--space-3); padding-top: var(--space-4); font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5); }

/* ================================ TOAST ================================ */
/* Small confirmation that pops when the email is copied */
.toast { position: fixed; left: 50%; bottom: var(--space-5);
  transform: translate(-50%, 200%); background: var(--color-ink); color: #fff;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-btn);
  font-size: var(--fs-sm); box-shadow: var(--shadow-lg); z-index: 200;
  transition: transform var(--dur) var(--ease); }
.toast.is-visible { transform: translate(-50%, 0); }

/* ============================================================================
   RESPONSIVE  ·  breakpoints: 960px (tablet) and 640px (mobile)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero-portrait { max-width: 420px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card--featured { grid-row: auto; }
  .services-grid,
  .cert-grid,
  .blog-grid,
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
  .about-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .about-portrait { max-width: 360px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer-brand { grid-column: 1 / -1; }

  /* Mobile nav — handled natively by the core Navigation block overlay.
     Force the hamburger below 960px (core's own breakpoint is 600px). */
  .nav { gap: var(--space-3); }
  .brand { font-size: 1.2rem; white-space: nowrap; }
  .nav-links .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none;
  }
  .nav-links .wp-block-navigation__responsive-container-open {
    display: flex !important; color: var(--text);
  }
  .nav-links .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--bg); color: var(--text);
    padding: calc(var(--nav-h) + var(--space-4)) var(--gutter) var(--space-5);
  }
  .nav-links .wp-block-navigation__responsive-container.is-menu-open a {
    font-size: var(--fs-lg); padding: var(--space-2) 0;
  }
  .nav-links .wp-block-navigation__responsive-container.is-menu-open a::after {
    display: none;
  }
  .nav-actions .wp-block-button__link {
    padding: 0.55rem 1rem; font-size: var(--fs-sm);
  }
}

@media (max-width: 640px) {
  /* Keep the header on one uncramped row on small phones */
  .brand { font-size: 1.05rem; }
  .theme-toggle { width: 34px; height: 34px; }
  .nav-actions .wp-block-button__link { padding: 0.5rem 0.8rem; font-size: var(--fs-xs); }
  .services-grid,
  .cert-grid,
  .blog-grid,
  .testi-grid,
  .results-grid,
  .process { grid-template-columns: 1fr; }
  .edu-card { flex-direction: column; align-items: flex-start; }
  .edu-card .link { margin-left: 0; }
  .stat-chip { right: var(--space-3); }
  .blog-head { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-5); }
}
