/* ============================================================
   Bay Greenery — GitHub Pages
   Design system + sections
   ============================================================ */

/* ----------------------------------------------------------
   FONTS — self-hosted (no CDN dependency)
   ---------------------------------------------------------- */
@font-face {
  font-family: 'Harabara';
  src: url('fonts/Harabara.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ----------------------------------------------------------
   COLOR + BRAND TOKENS — change these to retheme the whole site
   ---------------------------------------------------------- */
:root {
  /* Brand colors (match the bay greenery logotype) */
  --color-bg-main: #f2ece1;            /* Warm cream — body bg + section bg */
  --color-brand-slate: #3c4a55;        /* Logo dark wordmark */
  --color-brand-lime: #a4cf3f;         /* Logo bright green + leaf */
  --color-accent-green: #7b8c68;       /* Sage — primary CTA */
  --color-accent-green-dark: #62724f;  /* Darker sage for hover */
  --color-accent-gold: #c9a04a;        /* List bullets, review stars */
  --color-bay-light: #c9d8d3;          /* Soft secondary */

  --color-card-bg: #ffffff;
  --color-card-glass: rgba(255, 255, 255, 0.55);
  --color-card-glass-border: rgba(255, 255, 255, 0.6);

  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-text-light: #ffffff;

  --color-hero-overlay: rgba(20, 28, 36, 0.18);  /* Slight cool slate tint — keeps the photo legible */

  --color-footer-bg: #3c4a55;                    /* Logotype slate */
  --color-footer-text: rgba(255, 255, 255, 0.88);

  /* Type */
  --font-title: 'Harabara', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 900px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-main);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

p { margin: 0 0 1rem 0; }

a {
  color: var(--color-accent-green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--color-accent-green-dark); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-green);
  outline-offset: 3px;
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  background: var(--color-bg-main);
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-brand-slate);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ----------------------------------------------------------
   HERO / SPLASH
   - Photo background with cream wash so the colored logo reads
   - Logo native colors, license under, CTA near bottom
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/gallery-01.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 240, 232, 0) 35%,
    rgba(245, 240, 232, 0.15) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 60vh;
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  max-width: 540px;
  width: 88%;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.30));
}

.hero-license {
  color: var(--color-text-light);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--color-text-light);
  background: var(--color-accent-green);
  padding: 1.1rem 2.4rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(60, 74, 85, 0.25);
  transition: transform 0.15s ease, background 0.2s ease;
  margin-top: 3rem;
}

.hero-cta:hover {
  background: var(--color-accent-green-dark);
  color: var(--color-text-light);
  transform: translateY(-2px);
}

.hero-cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--color-accent-gold);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .hero { min-height: 100vh; }
  .hero-logo { max-width: 340px; }
  .hero-cta { font-size: 1.2rem; padding: 0.9rem 1.85rem; }
  .hero-license { font-size: 1rem; }
}

/* ----------------------------------------------------------
   SERVICES CAROUSEL (homepage)
   - 6 cards total, 3 visible at a time on desktop
   - Whole card is a link to the booking form
   ---------------------------------------------------------- */
.services-section { background: var(--color-bg-main); }

.carousel { position: relative; }

.carousel-viewport {
  overflow: hidden;
  padding: 0.5rem 0;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s ease;
  will-change: transform;
}

.service-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(60, 74, 85, 0.15);
  color: inherit;
}

.service-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bay-light);
}

.service-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-title {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-brand-slate);
  margin: 0 0 0.6rem 0;
}

.service-card-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 1rem 0;
}

.service-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-card-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.service-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--color-accent-gold);
  border-radius: 50%;
}

/* Carousel arrow controls */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-green);
  background: #fff;
  color: var(--color-accent-green);
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.carousel-btn:hover {
  background: var(--color-accent-green);
  color: #fff;
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .service-card { flex: 0 0 calc((100% - 1.5rem) / 2); }
}

@media (max-width: 600px) {
  .service-card { flex: 0 0 100%; }
}

/* ----------------------------------------------------------
   REVIEWS — auto-scrolling glassy carousel
   ---------------------------------------------------------- */
.reviews-section {
  background: var(--color-bg-main);
  position: relative;
}

.reviews-frame {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(164, 207, 63, 0.18) 0%,
    rgba(60, 74, 85, 0.20) 100%
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1rem;
  box-shadow: 0 8px 32px rgba(60, 74, 85, 0.15);
  overflow: hidden;
}

/* Native horizontal scroll on the viewport so wheel/drag/swipe work;
   JS still drives scrollLeft for the auto-scroll, so manual + auto
   coexist. Scrollbar hidden for cleanliness. */
.reviews-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  /* Reserve 8px below the cards so the scrollbar appearing on hover
     doesn't shift layout. Cards' visual size unchanged. */
  padding-bottom: 8px;
  /* Hidden by default — appears on hover via .reviews-frame:hover below. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reviews-viewport::-webkit-scrollbar {
  height: 8px;
  background: transparent;
}
.reviews-viewport::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  transition: background 0.18s;
}
.reviews-viewport::-webkit-scrollbar-track {
  background: transparent;
  transition: background 0.18s;
}

/* When the mouse is over the review strip, reveal the scrollbar so the
   user knows they can scroll manually. Auto-rotation pauses (JS handles). */
.reviews-frame:hover .reviews-viewport {
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 74, 85, 0.55) rgba(60, 74, 85, 0.10);
}
.reviews-frame:hover .reviews-viewport::-webkit-scrollbar-thumb {
  background: rgba(60, 74, 85, 0.55);
}
.reviews-frame:hover .reviews-viewport::-webkit-scrollbar-track {
  background: rgba(60, 74, 85, 0.10);
}

.reviews-track {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem;
  width: max-content;
}

.review-card {
  flex: 0 0 320px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.review-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  pointer-events: none;
}

.review-stars {
  color: var(--color-accent-gold);
  font-size: 1rem;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #1a2a22;
  margin: 0;
  position: relative;
  z-index: 1;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--color-brand-slate);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.reviews-cta-wrap {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.reviews-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent-green);
  color: var(--color-text-light);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.reviews-cta:hover {
  background: var(--color-accent-green-dark);
  color: var(--color-text-light);
}

.leave-review-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  color: var(--color-brand-slate);
  padding: 0.85rem 1.4rem 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(60, 74, 85, 0.18);
  box-shadow: 0 2px 10px rgba(60, 74, 85, 0.08);
  transition: box-shadow 0.2s, transform 0.15s;
}

.leave-review-cta:hover {
  color: var(--color-brand-slate);
  box-shadow: 0 4px 16px rgba(60, 74, 85, 0.15);
  transform: translateY(-1px);
}

.leave-review-google-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .review-card { flex: 0 0 270px; padding: 1.25rem; }
  .reviews-frame { padding: 1.5rem 0.5rem; }
}

/* ----------------------------------------------------------
   PROJECT GALLERY — homepage teaser + full grid on portfolio
   ---------------------------------------------------------- */
.gallery-section { background: var(--color-bg-main); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 0;
  padding: 0;
  background-color: var(--color-bay-light);
}

.gallery-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(60, 74, 85, 0.18);
}

.gallery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 65%,
    rgba(0,0,0,0.35) 100%
  );
  opacity: 0;
  transition: opacity 0.25s;
}

.gallery-tile:hover::after { opacity: 1; }

.gallery-cta-wrap { text-align: center; }

.gallery-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent-green);
  color: var(--color-text-light);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
}

.gallery-cta:hover {
  background: var(--color-accent-green-dark);
  color: var(--color-text-light);
}

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

/* Gallery lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.is-open { display: flex; }

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev { left: 1.5rem; padding-right: 4px; }
.lightbox-next { right: 1.5rem; padding-left: 4px; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

@media (max-width: 600px) {
  .lightbox-nav { width: 48px; height: 48px; font-size: 1.8rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

/* ----------------------------------------------------------
   ABOUT
   ---------------------------------------------------------- */
.about-section { background: var(--color-bg-main); }

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  max-width: var(--container-narrow);
  margin: 0 auto;
  align-items: center;
}

.about-portrait {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(60, 74, 85, 0.18);
  background-color: var(--color-bay-light);
}

.about-content p {
  color: var(--color-text);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; gap: 1.75rem; }
  .about-portrait { margin: 0 auto; width: 220px; height: 220px; }
}

/* ----------------------------------------------------------
   CONTACT FOOTER
   ---------------------------------------------------------- */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 4rem 0 2rem;
}

.footer .section-title { color: var(--color-text-light); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-block h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin: 0 0 0.75rem 0;
}

.footer-block a,
.footer-block p {
  color: var(--color-footer-text);
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.footer-block a:hover {
  color: var(--color-brand-lime);
  text-decoration: underline;
}

.footer-block h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin: 1.5rem 0 0.45rem 0;
}

.footer-mailing-address {
  font-style: normal;
  color: var(--color-footer-text);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.footer-license {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

.footer-bonded {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}

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

/* ----------------------------------------------------------
   SECONDARY PAGE HEADER (portfolio)
   ---------------------------------------------------------- */
.page-header {
  background: var(--color-bg-main);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(60, 74, 85, 0.08);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-logo img { height: 44px; width: auto; }

.page-back {
  font-size: 0.95rem;
  color: var(--color-accent-green);
  font-weight: 600;
}

.page-back:hover { text-decoration: underline; }

.page-intro {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.page-intro h1 {
  font-family: var(--font-title);
  font-size: 2.6rem;
  margin: 0 0 0.5rem;
  color: var(--color-brand-slate);
}

.page-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   PORTFOLIO LAYOUT — sidebar + content
   ---------------------------------------------------------- */
.portfolio-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  min-height: 70vh;
}

.portfolio-sidebar {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.portfolio-sidebar-toggle {
  display: none;
}

.portfolio-nav-header {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 1.25rem 0 0.5rem;
}

/* Second-and-later nav groups get a visible divider so the two
   project sets read as distinct groups. */
.portfolio-nav-header ~ .portfolio-nav-header {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(60, 74, 85, 0.12);
}

.portfolio-nav-link {
  display: block;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
  color: var(--color-brand-slate);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  line-height: 1.35;
}

.portfolio-nav-link:hover {
  background: rgba(60, 74, 85, 0.05);
  color: var(--color-brand-slate);
}

.portfolio-nav-link.is-active {
  background: rgba(90, 124, 58, 0.10);
  color: var(--color-accent-green);
  border-left-color: var(--color-accent-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.portfolio-section {
  display: none;
}

.portfolio-section.is-active {
  display: block;
}

.portfolio-section-head {
  margin-bottom: 2rem;
}

.portfolio-section-head h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  margin: 0 0 0.4rem;
  color: var(--color-brand-slate);
}

.portfolio-section-head .portfolio-section-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

.portfolio-section-head .portfolio-section-meta span + span::before {
  content: " • ";
  margin: 0 0.35rem;
}

.portfolio-section-head .portfolio-section-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 1rem;
}

@media (max-width: 900px) {
  .portfolio-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
  }
  .portfolio-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    overflow-y: visible;
    border-bottom: 1px solid rgba(60, 74, 85, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }
  .portfolio-sidebar-list {
    display: none;
  }
  .portfolio-layout.sidebar-open .portfolio-sidebar-list {
    display: block;
  }
  .portfolio-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--color-brand-slate);
    border: 1.5px solid rgba(60, 74, 85, 0.15);
    border-radius: var(--radius-pill);
    padding: 0.55rem 1rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
  }
}

/* ----------------------------------------------------------
   FEATURED PROJECTS — case-study card grid
   ---------------------------------------------------------- */
.projects-section {
  background: var(--color-bg-main);
  padding-top: 1rem;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(60, 74, 85, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(60, 74, 85, 0.16);
  color: inherit;
}

.project-card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bay-light);
}

.project-card-body {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-card-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-brand-slate);
}

.project-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.project-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.project-card-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-green);
  background: rgba(90, 124, 58, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
}

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

/* ----------------------------------------------------------
   PROJECT PHOTO GRID — shared by /portfolio/ sections
   ---------------------------------------------------------- */
.project-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-photo-grid .gallery-tile {
  aspect-ratio: 4 / 3;
}

/* Tile bubble — used both inside .project-photo-grid (Before/During/After)
   and on the homepage .gallery-grid for project-type labels. */
.gallery-tile-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(60, 74, 85, 0.85);    /* slate default */
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  z-index: 2;
}

.gallery-tile-label.is-after {
  background: rgba(90, 124, 58, 0.92);   /* accent green */
}

/* Project-type bubble (homepage featured gallery). Same shape, distinct
   slate tone so it doesn't compete with Before/After semantics. */
.gallery-tile-label.is-project-type {
  background: rgba(60, 74, 85, 0.85);
}

.project-photo-grid .gallery-tile-label.is-during {
  background: rgba(201, 160, 74, 0.92);
}

@media (max-width: 700px) {
  .project-photo-grid { grid-template-columns: 1fr; }
}
