/*
Theme Name: Maple Poolscape
Theme URI: https://www.maplepoolscape.ca
Author: Maple Poolscape Inc.
Description: Custom theme for Maple Poolscape Inc. Everything on the site (text, photos, services, projects, FAQs, reviews, service areas) is edited from the WordPress dashboard. Quote requests are saved under "Leads".
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: Proprietary
Text Domain: maplepoolscape
*/

/* ==========================================================================
   1. DESIGN TOKENS
   One place for every colour, size and space used on the site.
   ========================================================================== */
:root {
  /* Colour: brand greens (from the logo-era site), neutrals, feedback */
  --green-950: #0f2a1a;
  --green-900: #143a24;
  --green-800: #1a4a2e;   /* primary brand green */
  --green-700: #245c3a;
  --green-600: #2d6b45;
  --green-200: #cfe2d4;
  --green-100: #e6f0e8;
  --green-50:  #f2f7f3;
  --white: #ffffff;
  --ink: #17201a;         /* headings */
  --ink-2: #39443d;       /* body text */
  --muted: #5a645d;       /* secondary text, ≥ 4.5:1 on white and green-50 */
  --line: #dbe5dd;        /* borders and dividers */
  --star: #e8a020;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --success: #14532d;
  --success-bg: #e7f6ec;

  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .8125rem;      /* 13px: eyebrows, captions */
  --fs-sm: .9375rem;      /* 15px: card text, meta */
  --fs-base: 1rem;        /* 16px: body */
  --fs-lg: 1.125rem;      /* 18px: lead paragraphs */
  --fs-h4: 1.375rem;
  --fs-h3: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --fs-h2: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 4.6vw, 5.25rem);
  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.7;
  --tracking-caps: .14em;

  /* Spacing scale (4px base) */
  --s-1: .25rem;  --s-2: .5rem;  --s-3: .75rem; --s-4: 1rem;  --s-5: 1.5rem;
  --s-6: 2rem;    --s-7: 3rem;   --s-8: 4rem;   --s-9: 6rem;

  /* Layout */
  --container: 1240px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 3rem + 5vw, 7rem);
  --nav-h: 84px;

  /* Shape and depth */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 58, 36, .06), 0 2px 8px rgba(20, 58, 36, .05);
  --shadow-md: 0 4px 12px rgba(20, 58, 36, .07), 0 12px 32px rgba(20, 58, 36, .08);
  --shadow-lg: 0 10px 24px rgba(20, 58, 36, .08), 0 24px 60px rgba(20, 58, 36, .12);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: .2s;
  --t-med: .45s;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--s-4)); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--green-800); text-underline-offset: .2em; }
a:hover { color: var(--green-600); }
button, input, select, textarea { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--serif); font-weight: 500; line-height: var(--lh-tight); text-wrap: balance; }
p { text-wrap: pretty; }
em { font-style: italic; }
h1 em, h2 em, h3 em { color: var(--green-800); }

:focus-visible { outline: 3px solid var(--green-600); outline-offset: 3px; border-radius: 2px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: var(--s-2); left: var(--s-2); z-index: 2000; width: auto; height: auto; clip: auto;
  background: var(--white); color: var(--green-800); padding: var(--s-3) var(--s-4);
  border: 2px solid var(--green-800); border-radius: var(--r-sm); font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.container, .section-inner { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.section-inner { padding-block: var(--section-y); }
.section { position: relative; background: var(--white); }
/* Homepage rhythm: every other section gets the pale green background. */
main > .section:nth-of-type(odd) { background: var(--green-50); }

/* Section heading block */
.section-head { margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-5) var(--s-8); flex-wrap: wrap; }
.section-head.split > :first-child { max-width: 620px; }
.section-head.split .section-desc { max-width: 460px; }

.section-label, .eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4);
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--green-800);
}
.section-label::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.center .section-label::after { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-size: var(--fs-h2); font-weight: 400; margin-bottom: var(--s-4); }
.section-desc { font-size: var(--fs-lg); color: var(--muted); line-height: var(--lh-body); }
.center .section-desc { margin-inline: auto; max-width: 620px; }

/* Smaller heading inside a section, with a rule that fills the rest of the line */
.sub-label {
  display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5);
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--green-800);
}
.sub-label::after { content: ''; flex: 1; height: 1px; background: var(--green-200); }

/* Scroll-in animation (content stays visible without JavaScript) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible, .no-js .reveal { opacity: 1; transform: none; }
.fade-up { animation: fadeUp .8s var(--ease) both; }
.fade-up.d1 { animation-delay: .1s; } .fade-up.d2 { animation-delay: .2s; } .fade-up.d3 { animation-delay: .3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */

/* Buttons: one shape, four looks. Minimum 48px tall for easy tapping. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 1.75rem; border-radius: var(--r-sm); border: 1.5px solid transparent;
  font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-800); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-700); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }
.btn-secondary { background: var(--white); color: var(--green-800); border-color: var(--green-800); }
.btn-secondary:hover { background: var(--green-800); color: var(--white); }
.btn-light { background: var(--white); color: var(--green-800); }
.btn-light:hover { background: var(--green-100); color: var(--green-900); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .6); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: var(--white); border-color: var(--white); }
.btn-sm { min-height: 44px; padding: 0 1.25rem; font-size: .8125rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-group.center { justify-content: center; }

/* Round icon badge used by services, reasons and contact details */
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%; background: var(--green-100); color: var(--green-800);
}
.icon-badge svg { width: 22px; height: 22px; }

/* Small rounded label */
.tag, .chip {
  display: inline-flex; align-items: center; min-height: 28px; padding: .2rem .75rem; border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 600; letter-spacing: .04em; line-height: 1.3;
  background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-200);
}

/* Card shell */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }

/* Photo tile with label (homepage gallery, projects page, related projects) */
.project-tile {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3;
  border-radius: var(--r-md); background: var(--green-100); color: inherit; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--t-med) var(--ease);
}
.project-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.project-tile:hover { box-shadow: var(--shadow-md); }
.project-tile:hover img { transform: scale(1.04); }
.project-tile .card-label {
  position: absolute; inset: auto 0 0 0; padding: 3rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .85) 55%, rgba(255, 255, 255, 0) 100%);
}
.card-service { display: block; margin-bottom: .2rem; font-size: .75rem; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--green-800); }
.card-title { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.2; color: var(--ink); }

.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.project-grid.count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-grid.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-grid.count-1 { grid-template-columns: minmax(0, 1fr); }

/* Forms (quote forms) */
.form-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.form-title { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.form-subtitle { margin: var(--s-1) 0 var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
.form-group { margin-bottom: var(--s-4); }
.form-group label { display: block; margin-bottom: .4rem; font-size: .8125rem; font-weight: 600; color: var(--ink); }
.form-group label .opt { font-weight: 400; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-height: 48px; padding: .75rem .9rem; border-radius: var(--r-sm);
  background: var(--white); border: 1.5px solid #c9d6cc; color: var(--ink); font-size: var(--fs-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast); -webkit-appearance: none; appearance: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #8a948d; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231a4a2e' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.5rem;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #a8bdae; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(45, 107, 69, .18); }
.form-group textarea { min-height: 96px; resize: vertical; }
.form-group [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.form-consent { display: flex; gap: var(--s-3); align-items: flex-start; margin: var(--s-1) 0 var(--s-4); font-size: .8125rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.form-consent input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--green-800); }
.form-submit { width: 100%; }
.form-note { margin-top: var(--s-3); text-align: center; font-size: .8125rem; color: var(--muted); }
.form-status { display: none; margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.form-status.is-success { display: block; background: var(--success-bg); color: var(--success); border: 1px solid #9fd5b1; }
.form-status.is-error { display: block; background: var(--danger-bg); color: var(--danger); border: 1px solid #f3b5ad; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   5. HEADER
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); transition: box-shadow var(--t-med);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: var(--s-6); height: var(--nav-h); }
.nav-logo { display: flex; align-items: center; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.nav-logo img { width: auto; height: 60px; }
.nav-logo .site-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.site-nav { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: var(--s-1); }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-sm);
  font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--green-800); background: var(--green-50); }
.nav-links .nav-cta, .nav-links .nav-phone { display: none; }
.header-actions { display: flex; align-items: center; gap: var(--s-4); }
.header-phone {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.header-phone svg { width: 18px; height: 18px; color: var(--green-800); }
.header-phone:hover { color: var(--green-800); }
.nav-toggle {
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  width: 48px; height: 48px; margin-left: auto; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer;
}
.nav-toggle:hover { background: var(--green-50); }
.nav-toggle span:not(.screen-reader-text) { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--green-800); transition: transform var(--t-fast), opacity var(--t-fast); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Logged-in toolbar: keep the header below it (and pinned on phones). */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { html #wpadminbar { position: fixed; } }

/* ==========================================================================
   6. HOMEPAGE SECTIONS
   ========================================================================== */

/* Hero */
.hero { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--green-50); }
.hero-media, .hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .86) 45%, rgba(255, 255, 255, .7) 100%); }
.hero-content {
  position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 5vw, 4rem)); padding-bottom: clamp(3rem, 6vw, 5rem);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-5); padding: .4rem 1rem;
  border-radius: var(--r-pill); border: 1px solid var(--green-200); background: rgba(255, 255, 255, .8);
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green-800);
}
.hero-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-600); }
.hero h1 { margin-bottom: var(--s-5); font-size: var(--fs-h1); font-weight: 400; letter-spacing: -.01em; }
.hero-sub { max-width: 560px; margin-bottom: var(--s-6); font-size: var(--fs-lg); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: var(--s-6); margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--green-200); }
.stat-num { font-family: var(--serif); font-size: 2.5rem; font-weight: 600; line-height: 1; color: var(--green-800); }
.stat-label { margin-top: var(--s-2); font-size: .8125rem; font-weight: 500; color: var(--muted); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.service-card {
  display: flex; flex-direction: column; padding: var(--s-6); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.service-card:hover { border-color: var(--green-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-icon { width: 56px; height: 56px; padding: 12px; margin-bottom: var(--s-5); border-radius: 50%; background: var(--green-100); color: var(--green-800); }
.service-card h3 { margin-bottom: var(--s-3); font-size: 1.5rem; font-weight: 600; line-height: var(--lh-snug); }
.service-card p { flex: 1; font-size: var(--fs-sm); color: var(--muted); }
.service-card .tag { align-self: flex-start; margin-top: var(--s-5); }

/* Our Work: story → result → gallery → closing call to action */
.story { margin-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }
.story-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-bottom: var(--s-5); }
.story-step { position: relative; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.story-step-photo { display: block; aspect-ratio: 2 / 1; overflow: hidden; background: var(--green-100); }
.story-step-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.story-step:hover .story-step-photo img { transform: scale(1.04); }
.story-step-text { display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-5) var(--s-6) var(--s-6); }
.story-num { flex-shrink: 0; font-family: var(--serif); font-size: 2.75rem; font-weight: 600; line-height: .9; color: var(--green-800); }
.story-step h4 { margin-bottom: var(--s-1); font-size: 1.5rem; font-weight: 600; line-height: var(--lh-snug); }
.story-step h4 a { color: var(--ink); text-decoration: none; }
.story-step h4 a:hover { color: var(--green-800); }
/* The whole card is clickable (bigger tap target), the title link stretches over it. */
.story-step h4 a::after { content: ''; position: absolute; inset: 0; }
.story-step p { font-size: var(--fs-sm); color: var(--muted); }
.story-result {
  position: relative; display: block; overflow: hidden; aspect-ratio: 21 / 9; border-radius: var(--r-lg);
  background: var(--green-100); color: inherit; text-decoration: none; box-shadow: var(--shadow-lg);
}
.story-result img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.story-result:hover img { transform: scale(1.03); }
.story-result .caption {
  position: absolute; inset: auto 0 0 0; padding: 6rem clamp(1.25rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2.5rem);
  background: linear-gradient(to top, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .8) 45%, rgba(255, 255, 255, 0) 100%);
}
.caption-kicker { margin-bottom: var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--green-800); }
.caption-title { font-family: var(--serif); font-size: clamp(1.5rem, 1rem + 1.8vw, 2.5rem); font-weight: 600; line-height: 1.15; color: var(--ink); }
.caption-meta { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); }
.portfolio-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-6);
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem) clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.portfolio-cta-title { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; line-height: 1.2; color: var(--ink); }
.portfolio-cta-text { margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--muted); }
.portfolio-cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Why us */
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); align-items: center; }
.why-features { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
.why-feature { display: flex; align-items: flex-start; gap: var(--s-4); }
.why-feature-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--green-100); color: var(--green-800); }
.why-feature h3 { margin-bottom: var(--s-1); font-size: 1.375rem; font-weight: 600; line-height: var(--lh-snug); }
.why-feature p { font-size: var(--fs-sm); color: var(--muted); }
.why-visual { position: relative; aspect-ratio: 4 / 5; max-height: 640px; }
.why-visual-main { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--green-100); box-shadow: var(--shadow-lg); }
.why-visual-main img { width: 100%; height: 100%; object-fit: cover; }
.why-accent { position: absolute; left: -1.5rem; bottom: 2rem; max-width: 220px; padding: var(--s-5); border-radius: var(--r-md); background: var(--green-800); color: var(--white); box-shadow: var(--shadow-lg); }
.why-accent-num { font-family: var(--serif); font-size: 2.75rem; font-weight: 700; line-height: 1; }
.why-accent-text { margin-top: var(--s-2); font-size: .8125rem; font-weight: 600; line-height: 1.4; }

/* Service areas */
.areas-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.area-card { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-5); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.area-card svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: .35rem; color: var(--green-700); }
.area-name { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.area-sub { margin-top: .15rem; font-size: .875rem; color: var(--muted); }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.review-card { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.review-stars { font-size: 1.1rem; letter-spacing: 2px; color: var(--star); }
.review-text { flex: 1; color: var(--ink-2); }
.review-author { display: flex; align-items: center; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.review-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--green-800); color: var(--white); font-size: .8125rem; font-weight: 700; }
.review-name { font-weight: 600; color: var(--ink); }
.review-location { font-size: .875rem; color: var(--muted); }
.section-cta { margin-top: var(--s-7); text-align: center; }

/* FAQ */
.faq-wrap { max-width: 860px; margin-inline: auto; }
.faq-list { display: grid; gap: var(--s-3); }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); transition: box-shadow var(--t-fast), border-color var(--t-fast); }
.faq-item[open] { border-color: var(--green-200); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 64px; padding: var(--s-4) var(--s-5); cursor: pointer; list-style: none;
  font-weight: 600; line-height: 1.45; color: var(--ink); border-radius: var(--r-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--green-800); }
.faq-item summary::after {
  content: ''; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--green-100)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%231a4a2e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat;
  transition: transform var(--t-fast);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 var(--s-5) var(--s-5); color: var(--muted); }
.faq-answer p + p { margin-top: var(--s-3); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(3rem, 6vw, 5rem); align-items: start; }
.contact-items { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.contact-item { position: relative; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.contact-item-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--green-100); color: var(--green-800); }
.contact-item-label { font-size: .75rem; font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); }
.contact-item-value { font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }
a.contact-item-value:hover { color: var(--green-800); text-decoration: underline; }
a.contact-item-value::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-md); }
.contact-item:has(a:hover) { border-color: var(--green-200); }

/* ==========================================================================
   7. INNER PAGES (projects, single project, privacy, 404)
   ========================================================================== */
.page-hero { padding-top: calc(var(--nav-h) + clamp(2.5rem, 2rem + 3vw, 4.5rem)); padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); background: var(--green-50); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.5rem, 1.8rem + 3vw, 4rem); font-weight: 400; }
.page-hero .lead { max-width: 640px; margin-top: var(--s-4); font-size: var(--fs-lg); color: var(--muted); }
.page-hero.center { text-align: center; }
.page-hero.center .lead { margin-inline: auto; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); font-size: .875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; margin-right: var(--s-2); color: #a3ada6; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--green-800); text-decoration: underline; }
.page-body { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--section-y); }

/* Long text (privacy policy, project descriptions) */
.prose { max-width: var(--container-narrow); color: var(--ink-2); font-size: 1.0625rem; }
.container-narrow .prose { margin-inline: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 2rem; font-weight: 500; }
.prose h3 { margin-top: 1.6em; font-size: 1.5rem; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose a { font-weight: 500; }
.prose img { border-radius: var(--r-md); }
.prose .gallery, .prose .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); }
.prose .gallery-item { margin: 0; }
.prose .gallery img, .prose .wp-block-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }

/* Projects page */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter-bar .chip { min-height: 44px; padding: 0 1.1rem; font-size: .875rem; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.filter-bar .chip:hover { background: var(--green-100); }
.filter-bar .chip[aria-current="true"] { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.results-count { margin-bottom: var(--s-5); font-size: .875rem; color: var(--muted); }
.project-archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.empty-state { padding: var(--s-8) var(--s-5); text-align: center; color: var(--muted); background: var(--green-50); border-radius: var(--r-md); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-7); }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); }
.pagination .page-numbers:hover { border-color: var(--green-800); color: var(--green-800); }
.pagination .current { background: var(--green-800); border-color: var(--green-800); color: var(--white); }

/* Single project */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.project-photo { overflow: hidden; border-radius: var(--r-lg); background: var(--green-100); box-shadow: var(--shadow-md); }
.project-photo img { width: 100%; max-height: 760px; object-fit: cover; }
.project-content { margin-top: var(--s-6); }
.project-aside { position: sticky; top: calc(var(--nav-h) + var(--s-5)); padding: var(--s-6); }
.project-facts { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }
.project-facts dt { font-size: .75rem; font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); }
.project-facts dd { font-weight: 600; color: var(--ink); }
.project-aside .summary { margin-bottom: var(--s-5); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.project-aside .btn { width: 100%; }
.project-aside .btn + .btn { margin-top: var(--s-3); }
.related { margin-top: var(--section-y); }
.related .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 404 */
.notfound-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); max-width: 900px; margin: var(--s-7) auto 0; }
.notfound-links li { display: flex; }
.notfound-links a { flex: 1; display: block; padding: var(--s-5); text-decoration: none; color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.notfound-links a:hover { border-color: var(--green-200); box-shadow: var(--shadow-md); }
.notfound-links strong { display: block; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--ink); }
.notfound-links span { font-size: var(--fs-sm); color: var(--muted); }

/* Call-to-action band shown above the footer on inner pages */
.cta-band { padding-block: clamp(3rem, 2rem + 4vw, 5rem); background: var(--green-50); border-top: 1px solid var(--line); }
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); }
.cta-band h2 { font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem); font-weight: 400; }
.cta-band p { margin-top: var(--s-2); color: var(--muted); }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, .78); font-size: var(--fs-sm); }
.site-footer :focus-visible { outline-color: var(--white); }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-7) var(--s-6); padding-block: clamp(3.5rem, 3rem + 3vw, 5rem); }
.footer-logo { display: inline-block; padding: var(--s-3) var(--s-4); background: var(--white); border-radius: var(--r-md); }
.footer-logo img { width: auto; height: 64px; }
.footer-about { max-width: 320px; margin-top: var(--s-5); line-height: 1.7; }
.footer-col h2 { margin-bottom: var(--s-4); font-family: var(--sans); font-size: .8125rem; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--white); }
.footer-list { display: grid; gap: var(--s-1); }
.footer-list a, .footer-contact a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer-list a:hover, .footer-contact a:hover { color: var(--white); text-decoration: underline; }
.footer-contact { display: grid; gap: var(--s-2); }
.footer-contact li { display: flex; align-items: center; gap: var(--s-2); min-height: 36px; }
.footer-contact svg { flex-shrink: 0; width: 18px; height: 18px; color: #9cc9aa; }
.footer-social { display: flex; gap: var(--s-2); margin-top: var(--s-4); }
.footer-social a { min-height: 40px; padding: 0 var(--s-4); border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--r-pill); }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); padding-block: var(--s-5); font-size: .8125rem; color: rgba(255, 255, 255, .65); }
.footer-bottom::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgba(255, 255, 255, .12); }
.footer-bottom a { color: rgba(255, 255, 255, .8); }
.footer-bottom a:hover { color: var(--white); }

/* Floating call button: phones only (desktop has the number in the header) */
.floating-cta {
  position: fixed; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 999;
  display: none; align-items: center; justify-content: center; gap: var(--s-2); min-height: 52px;
  border-radius: var(--r-sm); background: var(--green-800); color: var(--white); box-shadow: var(--shadow-lg);
  font-size: .875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med);
}
.floating-cta:hover { color: var(--white); background: var(--green-700); }
.floating-cta svg { width: 18px; height: 18px; }
.floating-cta.is-hidden { opacity: 0; transform: translateY(150%); pointer-events: none; }

/* ==========================================================================
   9. RESPONSIVE
   Breakpoints: 1180 (small laptop) · 960 (tablet landscape / menu collapses)
                768 (tablet portrait) · 600 (phone)
   ========================================================================== */
@media (max-width: 1180px) {
  .header-phone .label { display: none; }
  .hero-content { grid-template-columns: minmax(0, 1fr) 400px; }
  .hero-stats { grid-template-columns: repeat(2, auto); gap: var(--s-5) var(--s-7); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .project-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 960px) {
  /* Header: menu collapses into a panel */
  /* (The blur effect is dropped here: it would trap the fixed menu panel inside the header.) */
  .site-header { backdrop-filter: none; background: var(--white); }
  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: static; margin-left: 0; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 999;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-4) var(--gutter) var(--s-7); overflow-y: auto; background: var(--white); border-top: 1px solid var(--line);
  }
  .admin-bar .nav-links { top: calc(var(--nav-h) + 46px); }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { width: 100%; min-height: 56px; padding: 0 var(--s-2); font-size: .9375rem; border-radius: 0; }
  .nav-links .nav-cta, .nav-links .nav-phone { display: block; border-bottom: 0; }
  .nav-links .nav-cta { margin-top: var(--s-5); }
  .nav-links .nav-cta a { justify-content: center; border-radius: var(--r-sm); background: var(--green-800); color: var(--white); }
  .nav-links .nav-phone a { justify-content: center; margin-top: var(--s-3); border: 1.5px solid var(--green-800); border-radius: var(--r-sm); color: var(--green-800); }
  body.menu-open { overflow: hidden; }

  .hero-content { grid-template-columns: minmax(0, 1fr); }
  .hero .form-card { max-width: 600px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .why-visual { order: -1; aspect-ratio: 16 / 10; max-height: none; }
  .why-accent { left: auto; right: var(--s-5); bottom: var(--s-5); }
  .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-archive-grid, .related .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-layout { grid-template-columns: minmax(0, 1fr); }
  .project-aside { position: static; }
  .story-result { aspect-ratio: 16 / 9; }
  .project-grid, .project-grid.count-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid.count-3 .project-tile:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
}

@media (max-width: 768px) {
  :root { --nav-h: 68px; }
  .nav-logo img { height: 48px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); margin-top: var(--s-6); }
  .stat-num { font-size: 2.1rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .section-head.split { display: block; }
  .section-head.split .section-desc { margin-top: var(--s-2); }
  .services-grid, .reviews-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card { padding: var(--s-5); }
  .story-step-text { padding: var(--s-4) var(--s-5) var(--s-5); }
  .story-num { font-size: 2.25rem; }
  .story-step h4 { font-size: 1.3rem; }
  .notfound-links { grid-template-columns: minmax(0, 1fr); }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .footer-list.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
  .footer-bottom { padding-bottom: calc(var(--s-5) + 72px); } /* room for the floating call button */
  .floating-cta { display: flex; }
}

@media (max-width: 600px) {
  .story-steps { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-bottom: var(--s-4); }
  .story-step-photo { aspect-ratio: 16 / 10; }
  .story-result { aspect-ratio: 4 / 3; }
  .story-result .caption { padding-top: 4rem; }
  .project-grid { gap: var(--s-3); }
  .project-grid.count-3, .project-grid.count-2 { grid-template-columns: minmax(0, 1fr); }
  .project-grid.count-3 .project-tile:last-child { aspect-ratio: 4 / 3; }
  .project-archive-grid, .related .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-tile .card-label { padding: 2.5rem 1rem 1rem; }
  .card-title { font-size: 1.15rem; }
  .portfolio-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .portfolio-cta-actions { flex-direction: column-reverse; }
  .portfolio-cta-actions .btn, .cta-band .btn { width: 100%; }
  .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .area-card { flex-direction: column; gap: var(--s-2); padding: var(--s-4); }
  .area-card svg { margin-top: 0; }
  .area-name { font-size: 1.2rem; }
  .area-sub { font-size: .8125rem; }
  .why-accent { right: var(--s-3); bottom: var(--s-3); padding: var(--s-4); max-width: 180px; }
  .why-accent-num { font-size: 2.1rem; }
  .faq-item summary { padding: var(--s-4); }
  .faq-answer { padding: 0 var(--s-4) var(--s-4); }
  .contact-item { padding: var(--s-3); }
  .cta-band-inner .btn-group { width: 100%; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .filter-bar .chip { flex-shrink: 0; }
}

/* Touch screens: every footer link gets a full-size (44px) tap area. */
@media (pointer: coarse) {
  .footer-list a, .footer-contact a { min-height: 44px; }
  .footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
}
