/* Vijetha Fab Engineerings — redesigned site stylesheet */
:root {
  --color-bg: #f6f5f2;
  --color-bg-elevated: #ffffff;
  --color-text: #1e241d;
  --color-text-muted: #4f5d4f;
  --color-primary: #14532d;
  --color-primary-hover: #0f3f22;
  --color-accent: #b8860b;
  --color-accent-soft: rgba(184, 134, 11, 0.12);
  --color-border: rgba(20, 83, 45, 0.12);
  --color-topbar: #0c2817;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(12, 40, 23, 0.06);
  --shadow-md: 0 8px 30px rgba(12, 40, 23, 0.08);
  --shadow-lg: 0 20px 50px rgba(12, 40, 23, 0.12);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.75rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  /** Home / global section rhythm (tighter than legacy 5rem blocks) */
  --section-py: clamp(1.25rem, 2.75vw, 2rem);
  --max-width: 1160px;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-primary);
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

.topbar {
  background: var(--color-topbar);
  color: #e8ebe9;
  font-size: 0.875rem;
}

/* Contact strip: desktop only — mobile keeps logo + main nav row */
@media (max-width: 991px) {
  .topbar {
    display: none;
  }
}

.topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  justify-content: space-between;
}

.topbar a {
  color: inherit;
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
  color: #fff;
}

.topbar__phones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.topbar__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
}

.topbar .topbar__mailto {
  padding: 0.15rem 0;
  opacity: 0.95;
  white-space: nowrap;
}

.topbar__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.topbar__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #c8e6d5;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.topbar__social-link:hover {
  background: rgba(0, 194, 79, 0.25);
  color: #b6f7cf;
  transform: translateY(-1px);
}

.topbar__social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 640px) {
  .topbar__inner {
    justify-content: center;
    text-align: center;
  }

  .topbar__lead {
    justify-content: center;
  }

  .topbar__social {
    justify-content: center;
    width: 100%;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text);
}

.brand img {
  height: 58px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand__tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown-wrap > .nav-megabtn {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown-wrap > .nav-megabtn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-wrap:hover > .nav-megabtn,
.nav-dropdown-wrap:focus-within > .nav-megabtn {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}

.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-dropdown a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(14, 30, 20, 0.45);
  backdrop-filter: blur(4px);
  padding: clamp(5.5rem, 12vw, 6rem) var(--space-md) var(--space-md);
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

@media (min-width: 992px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav-panel {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.mobile-nav-panel a {
  display: block;
  padding: var(--space-md);
  text-decoration: none;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-panel a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.mobile-nav-sub {
  padding-left: var(--space-md);
  font-weight: 500;
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.35rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

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

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(20, 83, 45, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--large {
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-py);
}

.section--muted {
  background: linear-gradient(180deg, #eef1eb 0%, var(--color-bg) 100%);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

.section__subtitle {
  max-width: 56ch;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  font-size: 1.08rem;
}

.section-head {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-head .section__subtitle {
  margin-inline: auto;
  margin-bottom: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(82vh, 720px);
  display: grid;
  align-items: end;
}

.hero__slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(8, 22, 12, 0.92) 0%,
    rgba(8, 22, 12, 0.45) 45%,
    rgba(8, 22, 12, 0.2) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 3;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding-block: var(--space-xl);
  padding-top: clamp(6.25rem, 15vh, 9.25rem);
  color: #fff;
}

/* Home: tighter stacking between bands (approx. −60% vs previous roomy defaults) */
body.page-home .section {
  padding-block: clamp(1rem, 2vw, 1.5rem);
}

body.page-home .cta-band {
  padding-block: clamp(0.75rem, 1.8vw, 1.2rem);
}

body.page-home .hero__content {
  padding-block: var(--space-lg);
  padding-top: clamp(5.25rem, 13vh, 7.75rem);
}

body.page-home .site-footer {
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
  max-width: 15ch;
}

.hero p.lead {
  font-size: 1.2rem;
  max-width: 42ch;
  opacity: 0.92;
  margin-bottom: var(--space-lg);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.hero .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.2);
}

.hero .btn--ghost:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero .hero__cta-enquiry {
  border-width: 2px;
}

.header-cta {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .header-cta {
    display: none;
  }
}

.mobile-panel-enquiry {
  width: 100%;
  margin-block: var(--space-sm);
  justify-content: center;
  box-sizing: border-box;
}

.hero__dots {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.hero__dots button[aria-current="true"] {
  background: #fff;
  transform: scale(1.25);
}

/* Grid cards */
.cards-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: stretch;
  }

  /* When one column is mostly media, keep columns visually aligned */
  .split--media {
    align-items: center;
  }
}

.quote-panel {
  background: linear-gradient(180deg, #fff 0%, #f7faf7 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.media-accent {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.media-accent img {
  width: 100%;
  max-height: min(220px, 28vh);
  object-fit: cover;
  display: block;
}

.media-accent figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: #f4f8f5;
}

.split__visual {
  align-self: center;
}

.split__visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-height: 0;
  max-height: min(280px, 38vh);
  object-fit: contain;
}

@media (min-width: 960px) {
  .split:not(.split--media) .split__visual img {
    min-height: 260px;
    max-height: 420px;
    object-fit: cover;
  }
}

@media (min-width: 960px) {
  .split--media .split__visual img {
    max-height: min(340px, 40vh);
    min-height: 0;
    width: 100%;
    object-fit: contain;
  }

  /* Map + form: similar visual weight */
  .split.split--reach .embed-map iframe {
    min-height: 440px;
  }

  .split.split--reach .quote-panel {
    min-height: 440px;
  }
}

.card {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.card__body {
  padding: var(--space-lg);
}

.card__body h3 {
  font-family: var(--font-display);
  margin: 0 0 var(--space-sm);
  font-size: 1.25rem;
}

.card__body p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

/* Mission / pillars */
.icon-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, #0f3f22 100%);
  border-radius: var(--radius-lg);
  color: #fff;
}

.icon-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.icon-card h3 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-card p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.95rem;
}

/* Home: tighter mission / vision row */
.icon-card--compact {
  padding: var(--space-md) var(--space-lg);
}

.icon-card--compact img {
  width: 44px;
  height: 44px;
}

.icon-card--compact h3 {
  font-size: 0.92rem;
}

.icon-card--compact p {
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (min-width: 960px) {
  .mission-vision-row {
    max-width: 900px;
    margin-inline: auto;
  }
}

.pillar-box {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff 0%, #f0f4ef 100%);
  border: 1px solid var(--color-border);
}

.pillar-box h3 {
  font-family: var(--font-display);
  margin-top: 0;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.pillar-box p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

/* Forms */
.form-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .form-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

.form-status {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status--ok {
  background: #e6f4ea;
  color: #14532d;
}

.form-status--err {
  background: #fce8e6;
  color: #8b1f12;
}

/* Gallery */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-tab {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.filter-tab:hover,
.filter-tab[aria-selected="true"] {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-lg);
}

.gallery-grid > figure.gallery-item {
  margin: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.gallery-grid > figure.gallery-item figcaption {
  padding: var(--space-md);
  font-weight: 600;
  font-size: 0.92rem;
}

.gallery-item__link {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.gallery-item__link:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.gallery-grid .gallery-item img {
  transition: transform 0.35s var(--ease-out), filter 0.35s ease;
}

.gallery-item__link:is(:hover, :focus-visible) img {
  transform: scale(1.03);
  filter: brightness(1.03);
}

.gallery-item__caplink {
  display: inline;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.gallery-item__caplink:hover {
  text-decoration: underline;
}

/* Home teaser grid (narrower gutters, matches gallery polish) */
.home-gallery-teaser .gallery-item img {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.gallery-item[data-hidden="true"] {
  display: none;
}

.gallery-item figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: var(--space-md);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quote-card {
  overflow: auto;
  background: var(--color-bg-elevated);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.quote-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: var(--space-md);
  float: left;
}

.quote-card__author {
  font-weight: 700;
}

.quote-card blockquote {
  margin: var(--space-md) 0 0;
  clear: both;
  font-style: normal;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-topbar);
  color: #c5cdc7;
  padding-block: var(--section-py);
  margin-top: var(--space-xl);
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.3fr 0.85fr 0.85fr 1fr;
  }
}

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

.site-footer ul li + li {
  margin-top: var(--space-sm);
}

.site-footer a {
  color: #dbe3dd;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-qr {
  max-width: 160px;
  border-radius: var(--radius-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
}

/* Page hero inner */
.page-hero {
  background: linear-gradient(120deg, #0c2817 0%, #14532d 55%, #1a6b3a 100%);
  color: #fff;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 var(--space-sm);
}

.breadcrumb {
  font-size: 0.9rem;
  opacity: 0.85;
}

.breadcrumb a {
  color: #fff;
}

/* Product layout */
.product-layout {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 960px) {
  .product-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
  }
}

.sidebar-nav {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow: auto;
}

.sidebar-nav h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
}

.sidebar-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a[aria-current="page"] {
  background: var(--color-bg);
  color: var(--color-primary);
}

/* Product pages — mobile drawer for "Implement type" */
.product-submenu-toggle {
  display: none;
}

.product-submenu-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
}

.product-submenu-toggle__icon span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--color-primary);
}

.product-submenu-toggle__label {
  font-weight: 700;
  font-size: 0.95rem;
}

.product-submenu-backdrop {
  display: none;
}

@media (max-width: 959px) {
  .product-submenu-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    justify-content: flex-start;
    margin: 0 0 var(--space-md);
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fff, #f8fbf8);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font: inherit;
    color: var(--color-text);
    text-align: left;
  }

  .product-submenu-toggle:active {
    background: var(--color-bg);
  }

  .product-submenu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(6, 18, 12, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.22s var(--ease-out),
      visibility 0.22s;
  }

  .product-submenu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .product-layout .sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(308px, 90vw);
    max-height: none;
    margin: 0;
    z-index: 10050;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition:
      transform 0.3s var(--ease-out),
      opacity 0.25s,
      visibility 0.25s;
  }

  .product-layout .sidebar-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }

  body.sidebar-drawer-lock {
    overflow: hidden;
    touch-action: none;
  }
}

.product-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .product-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: #fafcfa;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  min-height: 0;
}

.product-gallery img {
  border-radius: 0;
  border: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  display: block;
}

.feature-list li {
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

/* Map */
.embed-map iframe {
  width: 100%;
  height: 360px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-cards {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .contact-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  font-family: var(--font-display);
  margin-top: 0;
}

/* Modal — visibility via class only (avoid [hidden] / display:flex conflicts) */
body.modal-scroll-lock {
  overflow: hidden;
  touch-action: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  padding-inline: clamp(var(--space-md), 4vw, 2rem);
  background: rgba(6, 18, 10, 0.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s var(--ease-out), visibility 0.28s;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: min(100%, 760px);
  max-height: min(92vh, 720px);
  overflow: hidden auto;
  background: linear-gradient(180deg, #fff 0%, #f9fcf9 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 4px 6px rgba(12, 40, 23, 0.04),
    0 28px 60px rgba(12, 40, 23, 0.22),
    inset 0 1px 0 #fff;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.32s var(--ease-out);
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-dialog--enquiry .modal-close {
  z-index: 4;
}

.modal-enquiry__grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .modal-dialog--enquiry .modal-enquiry__grid {
    grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  }
}

.modal-enquiry__visual {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    linear-gradient(155deg, #0f3920 0%, #14532d 45%, #0c2817 100%);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-sm);
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.modal-enquiry__visual::before {
  content: "";
  position: absolute;
  inset: -20% -40% auto auto;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.modal-enquiry__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(260px, 38vh);
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  border-radius: var(--radius-md);
}

.modal-enquiry__caption {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
}

.modal-enquiry__body {
  padding: var(--space-lg);
}

.modal-enquiry__head {
  margin-bottom: var(--space-md);
  padding-right: 2.5rem;
}

.modal-enquiry__eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-primary);
}

.modal-enquiry__head h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--color-text);
}

.modal-enquiry__product-label {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

.modal-enquiry__product-label strong {
  color: var(--color-text);
  font-weight: 700;
}

.modal-enquiry__hint {
  margin: var(--space-md) 0 0;
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.modal-dialog .form-grid {
  gap: var(--space-md);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.2s ease;
}

.modal-close:hover {
  background: #fff;
  transform: rotate(90deg);
}

/* Toast feedback */
.site-toast {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10100;
  max-width: min(480px, 92vw);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-topbar);
  color: #e8ebe9;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s var(--ease-out);
  pointer-events: none;
}

.site-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

.modal-wrap {
  position: relative;
}

/* Homepage product cards polish */
.card--product .card__img {
  transition: transform 0.35s var(--ease-out);
}

@media (hover: hover) {
  .card--product:hover .card__img {
    transform: scale(1.04);
  }
}

.page-hero--photo {
  position: relative;
  overflow: hidden;
  background-color: var(--color-topbar);
  background-image:
    linear-gradient(105deg, rgba(8, 24, 14, 0.92) 0%, rgba(20, 83, 45, 0.78) 45%, rgba(8, 20, 14, 0.9) 100%),
    url("../img/bg7.jpg");
  background-size: cover;
  background-position: center;
}

.section--grain {
  position: relative;
}

.section--grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(20, 83, 45, 0.08) 1px, transparent 1px);
  background-size: 14px 14px;
}

.section--grain > * {
  position: relative;
  z-index: 1;
}

.mosaic-strip {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 200px;
  max-height: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
  .mosaic-strip {
    min-height: 220px;
    max-height: 280px;
  }
}

/* Home: one row, three equal thumbnails */
.mosaic-strip--even {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  min-height: 140px;
  max-height: min(200px, 22vw);
}

@media (min-width: 720px) {
  .mosaic-strip--even {
    min-height: 160px;
    max-height: 220px;
  }
}

.mosaic-strip__cell {
  position: relative;
  overflow: hidden;
}

.mosaic-strip__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

@media (hover: hover) {
  .mosaic-strip__cell:hover img {
    transform: scale(1.06);
  }
}

.mosaic-strip__cell--lg {
  grid-row: span 2;
}

.stars-inline {
  color: var(--color-accent);
  letter-spacing: 2px;
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(90deg, var(--color-primary), #1a7a42);
  color: #fff;
  padding-block: var(--space-lg);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.cta-band h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.cta-band .btn--ghost {
  border-color: #fff;
  color: #fff;
}

.cta-band .btn--ghost:hover {
  background: #fff;
  color: var(--color-primary);
}

/* Implements catalogue — carousel: fitted columns via container queries */
.implements-viewport {
  container-type: inline-size;
  container-name: implcat;
  width: 100%;
  --impl-gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  padding-block: var(--space-sm) var(--space-md);
  margin-inline: calc(-0.5 * var(--space-md));
  padding-inline: calc(0.5 * var(--space-md));
}

.implements-viewport .h-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100cqi - var(--impl-gap)) / 2);
  gap: var(--impl-gap);
  width: max-content;
  min-width: 100%;
  padding: 0;
}

@container implcat (min-width: 640px) {
  .implements-viewport .h-scroll {
    grid-auto-columns: calc((100cqi - 2 * var(--impl-gap)) / 3);
  }
}

@container implcat (min-width: 960px) {
  .implements-viewport .h-scroll {
    grid-auto-columns: calc((100cqi - 3 * var(--impl-gap)) / 4);
  }

  .implements-viewport .h-scroll .card--product .card__img {
    max-height: 200px;
  }
}

.implements-viewport .h-scroll .card {
  scroll-snap-align: start;
}

.implements-viewport .h-scroll .card--product {
  min-width: 0;
}

.implements-viewport .h-scroll .card--product .card__img {
  aspect-ratio: 4 / 3;
  max-height: 176px;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  padding: var(--space-sm);
  box-sizing: border-box;
  background: linear-gradient(180deg, #f4f8f5 0%, #fff 100%);
}

.implements-viewport .h-scroll .card--product .card__body {
  padding: var(--space-md);
}

.implements-viewport .h-scroll .card--product .card__body h3 {
  font-size: 1.08rem;
}

.implements-viewport .h-scroll .card--product .card__body p {
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

@supports not (container-type: inline-size) {
  .implements-viewport .h-scroll {
    grid-auto-columns: calc((100% - var(--impl-gap)) / 2);
  }

  @media (min-width: 640px) {
    .implements-viewport .h-scroll {
      grid-auto-columns: calc((100% - 2 * var(--impl-gap)) / 3);
    }
  }

  @media (min-width: 960px) {
    .implements-viewport .h-scroll {
      grid-auto-columns: calc((100% - 3 * var(--impl-gap)) / 4);
    }

    .implements-viewport .h-scroll .card--product .card__img {
      max-height: 200px;
    }
  }
}

.trust-strip {
  text-align: center;
  padding: var(--space-md);
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.trust-strip strong {
  color: var(--color-primary);
}
