/* Header & Mobile Navigation */
.wb-header {
  background: var(--wb-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.wb-header-inner {
  max-width: var(--wb-inner-max, 1100px);
  margin: 0 auto;
  padding: 0.8em 1.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wb-header-brand {
  font-family: var(--wb-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wb-dark);
  text-decoration: none;
}
.wb-header-logo { text-decoration: none; }
.wb-header-logo img { max-height: 40px; width: auto; }

/* Clear Commercial brand lockup — hex mark + bicolor wordmark */
.wb-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: inherit;
}
.wb-brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex-shrink: 0;
}
.wb-brand-wordmark {
  font-family: 'Bai Jamjuree', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.wb-brand-word-1 { color: var(--wb-secondary); margin-right: 0.22em; }
.wb-brand-word-2 { color: var(--wb-primary); }

/* Footer also gets the lockup treatment when used. The dark navy footer needs the
   "Commercial" half of the wordmark in white (navy on navy would otherwise vanish). */
.wb-footer-logo .wb-brand-wordmark { font-size: 1.2rem; }
.wb-footer-logo .wb-brand-mark { width: 36px; height: 36px; }
.wb-footer-logo .wb-brand-word-2 { color: var(--wb-white); }

@media (max-width: 480px) {
  .wb-brand-wordmark { font-size: 1.15rem; }
  .wb-brand-mark { width: 34px; height: 34px; }
}
.wb-header-nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.wb-header-nav a {
  position: relative;
  display: inline-block;
  color: var(--wb-text);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.45em 0.2em 0.45em 0.85em;
  /* Inset shadow as a left bar — avoids layout shift when thickness changes. */
  box-shadow: inset 2px 0 0 rgba(0, 144, 192, 0.30);
  transition: color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.wb-header-nav a:hover {
  color: var(--wb-primary);
  box-shadow: inset 4px 0 0 var(--wb-secondary);
  transform: translateX(2px);
}
.wb-header-nav a.active {
  color: var(--wb-primary);
  box-shadow: inset 4px 0 0 var(--wb-secondary);
}
.wb-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--wb-text);
  cursor: pointer;
}

/* Blog card extras */
.blog-card { overflow: hidden; padding: 0; }
.blog-card-image { display: block; height: 200px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-body { padding: 1.5em; }
.blog-card-meta { font-size: 0.85rem; color: var(--wb-text-muted); margin-bottom: 0.5em; }
.blog-card-cat { color: var(--wb-primary); margin-left: 0.3em; }
.blog-card h3 { margin: 0.3em 0; }
.blog-card h3 a { color: var(--wb-text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--wb-primary); }
.blog-card p { color: var(--wb-text-light); font-size: 0.95rem; line-height: 1.6; margin: 0.5em 0; }
.blog-card-link { font-weight: 600; font-size: 0.9rem; color: var(--wb-primary); text-decoration: none; }

/* Blog post styles */
.blog-post-meta { color: var(--wb-text-muted); font-size: 0.9rem; }
.blog-post-meta a { color: var(--wb-primary); text-decoration: none; }
.blog-post-content { line-height: 1.8; font-size: 1.05rem; }
.blog-post-content h2 { margin-top: 2em; }
.blog-post-content img { border-radius: var(--wb-radius-md); margin: 1.5em 0; }
.blog-post-tags a { margin-right: 0.3em; }
.blog-post-nav a { color: var(--wb-primary); text-decoration: none; font-size: 0.9rem; }

/* ── Hero Slideshow ── */
.hero-slideshow {
  position: relative;
  width: 100%;
  min-height: 85vh;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }

/* Ken Burns is driven by GSAP in main.js — bg keeps its last transform on slide-out so there's no snap-back shrink. */
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide-bg { transform: scale(1.04) !important; }
}

/* Cyan accent word — echoes the wordmark. Applies on every hero (homepage
   slides AND static page heroes) since the span sits anywhere a hero title does. */
.slide-accent {
  color: var(--wb-secondary);
  display: inline-block;
  animation: slide-accent-in 1.4s 0.25s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes slide-accent-in {
  0%   { opacity: 0; transform: translateY(0.3em); letter-spacing: -0.04em; }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); letter-spacing: -0.02em; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-accent { animation: none; }
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,23,42,0.75) 0%,
    rgba(15,23,42,0.15) 50%,
    rgba(15,23,42,0) 100%
  );
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 85vh;
  padding: 2em 1.5em 4em;
  text-align: center;
}
.hero-slide-content .wb-h1 {
  color: var(--wb-white);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.4em;
}
.hero-slide-content .wb-subtitle {
  color: var(--wb-white);
  max-width: 700px;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  opacity: 0.92;
}
.slide-cta { margin-top: 2em; }

/* ── Overlapping Collage ── */
.collage-section { padding: 6em 1.5em; overflow: visible; position: relative; }
.collage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}
.collage-images {
  position: relative;
  height: 450px;
}
.collage-img {
  position: absolute;
  overflow: hidden;
  border-radius: var(--wb-radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.collage-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage-img:nth-child(1) {
  width: 65%;
  height: 320px;
  top: 0;
  left: 0;
  z-index: 1;
  transform: rotate(-2deg);
}
.collage-img:nth-child(2) {
  width: 55%;
  height: 260px;
  top: 40px;
  right: 0;
  z-index: 2;
  transform: rotate(1.5deg);
}
.collage-img:nth-child(3) {
  width: 45%;
  height: 200px;
  bottom: 0;
  left: 15%;
  z-index: 3;
  transform: rotate(-1deg);
}
.collage-text {
  padding: 2em 0;
}
.collage-text h2 { margin-bottom: 0.5em; }
.collage-text p { color: var(--wb-text-light); line-height: 1.7; }

/* ── Showcase Carousel ── */
.carousel-section { padding: 5em 0; overflow: hidden; }
.carousel-track {
  display: flex;
  gap: 2em;
  padding: 1em 1.5em;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 1200px;
  margin: 0 auto;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  background: var(--wb-white);
  border-radius: var(--wb-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.carousel-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.carousel-card-img { height: 200px; overflow: hidden; }
.carousel-card-img img { width: 100%; height: 100%; object-fit: cover; }
.carousel-card-body { padding: 1.5em; }
.carousel-card-body h3 { font-family: var(--wb-font-heading); margin-bottom: 0.5em; }
.carousel-card-body p { color: var(--wb-text-light); font-size: 0.95rem; line-height: 1.6; }
.carousel-nav {
  text-align: center;
  margin-top: 1.5em;
}
.carousel-nav button {
  background: none;
  border: 2px solid var(--wb-primary);
  color: var(--wb-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin: 0 0.5em;
  font-size: 1rem;
  transition: all 0.3s ease;
}
.carousel-nav button:hover { background: var(--wb-primary); color: var(--wb-white); }

/* ── Counters ── */
.counters-section {
  background: var(--wb-dark);
  padding: 4em 1.5em;
}
.counters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.counter-item .counter {
  font-family: var(--wb-font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--wb-secondary);
  line-height: 1;
}
.counter-item .counter-suffix {
  font-family: var(--wb-font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--wb-secondary);
}
.counter-item .counter-label {
  color: #8892a6;
  font-size: 0.95rem;
  margin-top: 0.5em;
}

/* ── Full-screen Statement ── */
.statement-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
/* iOS doesn't support background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
  .statement-section { background-attachment: scroll; }
}
.statement-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.75) 100%);
}
.statement-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2em 1.5em;
}
.statement-text {
  font-family: var(--wb-font-heading);
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 700;
  color: var(--wb-white);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5em;
}
.statement-text em {
  font-style: normal;
  color: var(--wb-secondary);
}
.statement-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #8892a6;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ── CTA Block ── */
.cta-block {
  padding: 6em 1.5em;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(78,205,196,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-block::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0,122,204,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--wb-font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--wb-white);
  margin-bottom: 0.5em;
}
.cta-text {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #b8c0d0;
  line-height: 1.6;
  margin-bottom: 0;
}
.cta-action { margin-top: 2em; }
.cta-action .wb-btn {
  padding: 1em 2.5em;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(78,205,196,0.3);
  transition: all 0.3s ease;
}
.cta-action .wb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(78,205,196,0.4);
}

/* ── Form Styles ── */
.wb-form input,
.wb-form textarea,
.wb-form select {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid #e2e8f0;
  border-radius: var(--wb-radius-sm);
  font-family: var(--wb-font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: var(--wb-white);
}
.wb-form input:focus,
.wb-form textarea:focus {
  outline: none;
  border-color: var(--wb-primary);
  box-shadow: 0 0 0 3px rgba(0,122,204,0.1);
}
.wb-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.3em;
  color: var(--wb-text);
}
.wb-form .form-group { margin-bottom: 1.5em; }
.wb-form-honeypot { position: absolute; left: -9999px; }
.wb-form .form-status {
  padding: 1em;
  border-radius: var(--wb-radius-sm);
  margin-top: 1em;
  display: none;
}
.wb-form .form-status.success { display: block; background: #ecfdf5; color: #065f46; }
.wb-form .form-status.error { display: block; background: #fef2f2; color: #991b1b; }

/* ── Text Reveal ── */
.reveal-text {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.reveal-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--wb-primary);
  transform-origin: left;
}

/* ── Parallax container ── */
.parallax-wrap { overflow: hidden; }
.parallax-img { will-change: transform; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .collage-img:nth-child(1) { transform: rotate(-1deg); margin-right: -1em; }
  .collage-img:nth-child(2) { transform: rotate(1deg) translateY(2em); margin-left: -1.5em; }
  .collage-img:nth-child(3) { transform: rotate(0deg) translateY(-1em); margin-left: -1em; }
}

@media (max-width: 767px) {
  .wb-menu-toggle { display: block; }
  .wb-header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wb-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1em;
  }
  .wb-header-nav.open { display: block; }
  .wb-header-nav ul { flex-direction: column; gap: 0; text-align: center; }
  .wb-header-nav ul li { padding: 0.75em 0; }

  /* Mobile drops the left-bar treatment (centered text would look misaligned);
     use a thicker cyan accent underline that scales in on hover/active instead.
     Vertical padding bumped to ~38px tap target (WCAG 2.5.5 / iOS 44pt guidance). */
  .wb-header-nav a {
    display: inline-block;
    padding: 0.85em 0.75em;
    box-shadow: none;
    transform: none;
    font-size: 1rem;
  }
  .wb-header-nav a:hover,
  .wb-header-nav a.active {
    box-shadow: inset 0 -3px 0 var(--wb-secondary);
    transform: none;
  }

  .hero-slideshow { min-height: 70vh; }
  .hero-slide-content { min-height: 70vh; }

  .collage-grid { grid-template-columns: 1fr; }
  .collage-images { height: 300px; }
  .collage-img:nth-child(1) { width: 60%; height: 220px; transform: rotate(-1deg); }
  .collage-img:nth-child(2) { width: 50%; height: 180px; top: 30px; transform: rotate(1deg); }
  .collage-img:nth-child(3) { width: 40%; height: 150px; transform: rotate(0deg); }
  .collage-text { padding: 1em 0; text-align: center; }

  .counters-grid { grid-template-columns: 1fr; gap: 1.5em; }
  .carousel-card { flex: 0 0 280px; }
}

/* ── Project galleries ── */
.cc-gallery {
  display: grid;
  gap: 0.8em;
  margin: 2em 0;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.cc-gallery-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.cc-gallery-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.cc-gallery-item {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--wb-dark);
  cursor: zoom-in;
}
.cc-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}
.cc-gallery-item:hover img {
  transform: scale(1.04);
}
/* Click opens the image direct — browser handles full-size view. JS lightbox can come later if needed. */

/* Category card on the projects index */
.cc-category-grid {
  display: grid;
  gap: 1.4em;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin: 2em 0 1em;
}
.cc-category-card {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  text-decoration: none;
  color: var(--wb-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cc-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.cc-category-card-img {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.cc-category-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.cc-category-card:hover .cc-category-card-img img {
  transform: scale(1.05);
}
.cc-category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15, 23, 42, 0.15) 0%,
    rgba(15, 23, 42, 0.35) 55%,
    rgba(15, 23, 42, 0.85) 100%);
  z-index: 2;
}
.cc-category-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 1.4em 1.4em 1.2em;
}
.cc-category-card h3 {
  margin: 0 0 0.2em;
  color: var(--wb-white);
  font-size: 1.35rem;
  font-weight: 700;
}
.cc-category-card p {
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ── Lightbox ── */
.cc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2em;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.cc-lightbox.open {
  display: flex;
  opacity: 1;
}
body.cc-lightbox-locked {
  overflow: hidden;
}
.cc-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
}
.cc-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.5);
}
.cc-lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  text-align: center;
  max-width: 700px;
  line-height: 1.4;
}
.cc-lightbox-close,
.cc-lightbox-prev,
.cc-lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--wb-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  user-select: none;
}
.cc-lightbox-close:hover,
.cc-lightbox-prev:hover,
.cc-lightbox-next:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.05);
}
.cc-lightbox-close {
  top: 1.2em;
  right: 1.2em;
  font-size: 1.8rem;
}
.cc-lightbox-prev {
  left: 1.2em;
  top: 50%;
  transform: translateY(-50%);
}
.cc-lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.cc-lightbox-next {
  right: 1.2em;
  top: 50%;
  transform: translateY(-50%);
}
.cc-lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

@media (max-width: 600px) {
  .cc-lightbox { padding: 1em; }
  .cc-lightbox-img { max-width: 96vw; max-height: 75vh; }
  .cc-lightbox-close { top: 0.8em; right: 0.8em; }
  .cc-lightbox-prev { left: 0.6em; }
  .cc-lightbox-next { right: 0.6em; }
}
