/* ============================================
   JES — Main stylesheet (deferred)
   ============================================ */

/* ----- Preloader ----- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
}

.preloader__bar {
  width: 240px;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.preloader__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: preload 1.1s var(--ease) forwards;
}

.preloader__brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 24px));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--primary);
  text-transform: uppercase;
}

@keyframes preload {
  to { transform: scaleX(1); }
}

/* ----- Navigation ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}

.nav.is-scrolled {
  background: rgba(246, 242, 234, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.nav__logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--paper);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
}

.nav__logo-svg {
  width: 100%;
  height: 100%;
  padding: 4px;
  color: var(--paper);
  display: block;
}

.nav__logo-svg .lk-frame,
.nav__logo-svg .lk-stroke {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
}

.nav__logo-svg .lk-node {
  opacity: 0;
}

.nav__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
  border-radius: 8px;
}

.nav__logo-fallback {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nav__text { display: grid; line-height: 1.1; }
.nav__text strong { font-size: 15px; }
.nav__text span { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  border-radius: 8px;
  transition: color 0.2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta {
  margin-left: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
}

.nav__burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.nav__burger span {
  position: relative;
  width: 22px;
  height: 1.5px;
  background: var(--primary);
  transition: transform 0.3s var(--ease);
}

.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  background: var(--primary);
  transition: transform 0.3s var(--ease);
}

.nav__burger span::before { top: -7px; }
.nav__burger span::after { top: 7px; }

.nav.is-open .nav__burger span { background: transparent; }
.nav.is-open .nav__burger span::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav__list {
    position: fixed;
    inset: 64px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav.is-open .nav__list {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__link { padding: 12px 14px; font-size: 15px; }
  .nav__link::after { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__cta { display: none; }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 20%, rgba(224, 122, 60, 0.10), transparent 70%),
              radial-gradient(ellipse 60% 50% at 20% 80%, rgba(42, 157, 143, 0.08), transparent 70%);
}

.hero__bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  min-height: 520px;
}

.hero__copy { max-width: 640px; }

.hero__title {
  margin-bottom: 24px;
}

.hero__title .word {
  display: inline-block;
  margin-right: 0.22em;
  will-change: transform, opacity;
  /* Warm paper-tone halo so words stay readable when the hero-pipe
     runs behind the title. The pipe is dark navy with orange/teal
     granules; a cream halo (--paper, not white) matches the brand
     palette and lifts the words without looking 'designed in'. */
  text-shadow:
    0 0 14px rgba(246, 242, 234, 0.75),
    0 0 28px rgba(246, 242, 234, 0.45);
}

.hero__title .word:last-child { color: var(--accent); }

/* Hero intro — pure CSS, replaces GSAP timeline.
   No inline-style writes per frame; the GPU handles it.
   Words slide up (translateY 110% → 0) with stagger via :nth-child. */
@keyframes jes-hero-word {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.hero__title .word { animation: jes-hero-word 0.9s var(--ease) both; }
.hero__title .word:nth-child(1) { animation-delay: 0.10s; }
.hero__title .word:nth-child(2) { animation-delay: 0.16s; }
.hero__title .word:nth-child(3) { animation-delay: 0.22s; }
.hero__title .word:nth-child(4) { animation-delay: 0.28s; }
.hero__title .word:nth-child(5) { animation-delay: 0.34s; }
.hero__title .word:nth-child(6) { animation-delay: 0.40s; }

/* Hero lede, CTAs, meta — fade + rise in cascade after the words. */
@keyframes jes-hero-rise {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.hero__lede { animation: jes-hero-rise 0.7s var(--ease) 0.55s both; }
.hero__meta { animation: jes-hero-rise 0.6s var(--ease) 0.85s both; }
.hero__cta  > * { animation: jes-hero-rise 0.6s var(--ease) both; }
.hero__cta  > *:nth-child(1) { animation-delay: 0.70s; }
.hero__cta  > *:nth-child(2) { animation-delay: 0.80s; }

/* Visual on the right — core pops in (back ease), then cards stagger in. */
@keyframes jes-hero-core {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes jes-hero-card {
  from { transform: translateY(18px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.hero__visual-core { animation: jes-hero-core 0.8s var(--ease) 0.60s both;
                     animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.hero__visual-card { animation: jes-hero-card 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.hero__visual-card--1 { animation-delay: 0.95s; }
.hero__visual-card--2 { animation-delay: 1.05s; }
.hero__visual-card--3 { animation-delay: 1.15s; }

.hero__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--primary);
  margin-bottom: 36px;
  max-width: 56ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  font-size: 13px;
  color: var(--muted);
}

.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta-item svg { width: 16px; height: 16px; color: var(--accent); }

.hero__visual {
  position: relative;
  aspect-ratio: 1.05 / 1;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.hero__visual-card {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  will-change: transform;
}

.hero__visual-card .icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.hero__visual-card .icon-bubble svg { width: 20px; height: 20px; }

.hero__visual-card--1 { top: 6%; left: -4%; }
.hero__visual-card--2 { top: 42%; right: -2%; background: var(--primary); color: var(--paper); }
.hero__visual-card--2 .icon-bubble { background: rgba(255,255,255,0.10); color: var(--accent); }
.hero__visual-card--3 { bottom: 8%; left: 12%; }

.hero__visual-ring {
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed var(--line);
  position: relative;
  display: grid;
  place-items: center;
  animation: ring-spin 60s linear infinite;
}

.hero__visual-ring::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.hero__visual-core {
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  display: grid;
  place-items: center;
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3em;
  position: relative;
  z-index: 2;
  box-shadow: 0 30px 80px rgba(11, 37, 69, 0.25);
}

.hero__visual-core::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.3;
  animation: ring-pulse 2.8s var(--ease) infinite;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.6; }
}

@media (max-width: 880px) {
  .hero { padding: 120px 0 48px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { min-height: 280px; }
  .hero__visual-card--1 { left: 0; }
  .hero__visual-card--2 { right: 0; }
  /* On narrow screens the core circle is small; the "PVC · HDPE · PP"
     text with 0.3em letter-spacing would overflow horizontally and
     get clipped by the hero's overflow:hidden. Shrink font + tracking. */
  .hero__visual-core { font-size: 9px; letter-spacing: 0.18em; }
}

/* ----- Section common ----- */
.section__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: end;
}

.section__head p { font-size: 17px; color: var(--primary); opacity: 0.78; }

@media (max-width: 760px) {
  .section__head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
}

/* ----- About / Materials ----- */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about__visual {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--paper);
  box-shadow: var(--shadow-2);
}

.about__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(224,122,60,0.18), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(42,157,143,0.18), transparent 50%);
}

.about__visual svg { width: 70%; opacity: 0.85; }

.about__visual-tag {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 600;
}

.about__list {
  list-style: none;
  margin-top: 32px;
  display: grid;
  gap: 14px;
}

.about__list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--primary);
  font-weight: 500;
}

.about__list li svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--accent);
  margin-top: 2px;
}

@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ----- Materials grid ----- */
.materials {
  background: var(--paper-2);
}

.materials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.material-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  overflow: hidden;
  will-change: transform;
}

.material-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(224,122,60,0.06));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.material-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent);
}

.material-card:hover::before { opacity: 1; }

.material-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  color: var(--primary);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.material-card:hover .material-card__icon {
  background: var(--primary);
  color: var(--paper);
}

.material-card__icon svg { width: 28px; height: 28px; }

.material-card h3 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.material-card p { font-size: 14.5px; line-height: 1.55; }

.material-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper-2);
  color: var(--primary);
  border-radius: 999px;
}

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

@media (max-width: 560px) {
  .materials__grid { grid-template-columns: 1fr; }
}

/* ----- Services ----- */
.services {
  background: var(--primary);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../svg/polymer-bg.svg");
  background-size: 600px;
  background-repeat: repeat;
  opacity: 0.35;
  pointer-events: none;
}

.services .container { position: relative; z-index: 1; }

.services .eyebrow { color: var(--accent); }

.services h2 { color: var(--paper); }

.services .section__head p { color: rgba(246, 242, 234, 0.7); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(224, 122, 60, 0.15);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 56px;
}

.service-card__icon svg { width: 32px; height: 32px; }

.service-card h3 { color: var(--paper); font-size: 1.25rem; }

.service-card p { color: rgba(246, 242, 234, 0.65); font-size: 14.5px; }

.service-card__visual {
  margin-top: 8px;
  height: 80px;
  display: grid;
  place-items: center;
  color: var(--accent);
  position: relative;
}

.service-card__visual svg { width: 100%; height: 100%; max-height: 80px; }

@media (max-width: 760px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ----- Industries ----- */
.industries__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.industry-tile {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  overflow: hidden;
}

.industry-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-2);
}

.industry-tile__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  color: var(--primary);
  transition: transform 0.6s var(--ease);
}

.industry-tile:hover .industry-tile__icon {
  transform: rotate(-6deg) scale(1.05);
  color: var(--accent);
}

.industry-tile__icon svg { width: 26px; height: 26px; }

.industry-tile h3 { font-size: 1.1rem; }

.industry-tile p { font-size: 14px; }

@media (max-width: 880px) { .industries__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .industries__grid { grid-template-columns: 1fr; } }

/* ----- Why us ----- */
.why {
  background: var(--paper-2);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}

.why-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
}

.why-stat__num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.why-stat__num .unit { color: var(--accent); }

.why-stat__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.why__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
}

.why__list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.why__list .why-bullet {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--paper);
  display: grid;
  place-items: center;
  flex: 0 0 44px;
}

.why__list .why-bullet svg { width: 22px; height: 22px; }

.why__list h4 { font-size: 1.05rem; color: var(--primary); margin-bottom: 4px; }
.why__list p { font-size: 14.5px; }

@media (max-width: 880px) { .why__grid { grid-template-columns: repeat(2, 1fr); } .why__list { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .why__grid { grid-template-columns: 1fr; } }

/* ----- Testimonials ----- */
.testimonials {
  background: var(--paper);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}

.testimonial:hover {
  transform: translateY(-4px) rotateX(0);
  box-shadow: var(--shadow-2);
}

.testimonial__quote-mark {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 38px;
  height: 38px;
  color: var(--accent);
  opacity: 0.18;
}

.testimonial__quote-mark svg { width: 100%; height: 100%; }

.testimonial__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--paper-2);
  overflow: hidden;
  flex: 0 0 64px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

.testimonial__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial blockquote {
  font-size: 15px;
  line-height: 1.6;
  color: var(--primary);
  font-style: italic;
  flex: 1;
}

.testimonial__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.testimonial__name { font-weight: 700; color: var(--primary); font-size: 14.5px; }
.testimonial__role { font-size: 13px; color: var(--muted); }
.testimonial__company { font-size: 12.5px; color: var(--accent-deep); font-weight: 600; letter-spacing: 0.04em; }

.testimonial__hint {
  font-size: 11px;
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(224, 122, 60, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}

@media (max-width: 880px) { .testimonials__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* ----- Contact ----- */
.contact {
  background: var(--primary);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 80% 30%, rgba(224,122,60,0.18), transparent 60%);
  pointer-events: none;
}

.contact .container { position: relative; z-index: 1; }

.contact .eyebrow { color: var(--accent); }
.contact h2 { color: var(--paper); }
.contact .section__head p { color: rgba(246, 242, 234, 0.7); }

.contact__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact__list {
  display: grid;
  gap: 20px;
  list-style: none;
  margin-top: 32px;
}

.contact__item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  color: var(--paper);
  text-decoration: none;
}

.contact__item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent);
  transform: translateX(4px);
}

.contact__item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(224, 122, 60, 0.15);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}

.contact__item-icon svg { width: 22px; height: 22px; }

.contact__item-label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; font-weight: 600; }
.contact__item-value { font-size: 16px; font-weight: 600; }

.contact__map {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(0.92) hue-rotate(180deg);
}

.contact__map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 2;
  pointer-events: none;
}

.contact__map-pin svg { width: 36px; height: 36px; color: var(--accent); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); }

.contact__map-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(11, 37, 69, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.contact__map-overlay svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 16px; }

@media (max-width: 880px) {
  .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .contact__map { aspect-ratio: 4/3; }
}

/* ----- Footer ----- */
.footer {
  background: var(--ink);
  color: rgba(246, 242, 234, 0.7);
  padding: 40px 0 32px;
  font-size: 13.5px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--paper); }
.footer__brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 800;
}

.footer__meta { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.footer__meta a { color: rgba(246, 242, 234, 0.85); transition: color 0.2s var(--ease); }
.footer__meta a:hover { color: var(--accent); }

/* ----- Reveal helpers (initial state for animation) ----- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
  transition:
    opacity   0.75s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 0.75s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.reveal.is-in,
.reveal.no-js {
  opacity: 1;
  transform: none;
}

/* Per-category reveal variants (replace the GSAP per-element tweens) */
.industry-tile.reveal {
  transform: translateY(28px) rotateX(-10deg);
  transform-origin: 50% 0%;
  transition:
    opacity   0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.industry-tile.reveal.is-in { transform: translateY(0) rotateX(0); }

.service-card.reveal {
  transform: translateY(32px) scale(0.97);
  transition:
    opacity   0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.service-card.reveal.is-in { transform: translateY(0) scale(1); }

.testimonial.reveal {
  transform: translateY(30px);
  transition:
    opacity   0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 0.9s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
.testimonial.reveal.is-in { transform: translateY(0); }

.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }
.reveal--delay-5 { transition-delay: 0.40s; }

/* path drawing for SVG icons inside cards (initial state) */
.draw-stroke {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

/* ============================================
   CHAIN DIVIDER (manim-style polymer chain)
   ============================================ */
.chain-divider {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--paper) 0%, var(--paper-2) 100%);
  margin-top: -1px;
}

.chain-divider::before,
.chain-divider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.chain-divider::before { left: 0;  background: linear-gradient(to right, var(--paper),    transparent); }
.chain-divider::after  { right: 0; background: linear-gradient(to left,  var(--paper-2), transparent); }

.chain-divider svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chain-divider .chain-bonds line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.chain-divider .chain-atoms circle {
  opacity: 0;
  transform-origin: center;
  transform: scale(0.3);
}

/* ============================================
   SCENE-LIKE SECTION HEADERS
   ============================================ */
.section__head h2 {
  position: relative;
}

.section__head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 56px;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s var(--ease);
}

.section__head.in-view h2::after {
  transform: scaleX(1);
}

.services .section__head h2::after { background: var(--accent); }
.contact .section__head h2::after { background: var(--accent); }

/* ============================================
   INDICATE PULSE (manim's Indicate animation)
   ============================================ */
@keyframes indicate {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); filter: brightness(1.05); }
}

.indicate-pulse {
  animation: indicate 1.6s var(--ease) infinite;
}

/* ============================================
   ICON "WRITE" ON HOVER
   ============================================ */
.industry-tile .industry-tile__icon svg,
.material-card .material-card__icon svg {
  transition: transform 0.4s var(--ease);
}

.industry-tile:hover .industry-tile__icon svg {
  transform: rotate(-8deg) scale(1.08);
}

/* ============================================
   JS-driven CSS-only animations
   (replaces GSAP per-element ScrollTriggers)
   ============================================ */

/* Map pin: drop in with a bounce when .is-in is added */
@keyframes jes-pin-drop {
  0%   { transform: translate(-50%, -160%); opacity: 0; }
  60%  { transform: translate(-50%,  -85%); opacity: 1; }
  78%  { transform: translate(-50%, -105%); }
  90%  { transform: translate(-50%,  -95%); }
  100% { transform: translate(-50%, -100%); opacity: 1; }
}
.contact__map-pin            { will-change: transform, opacity; }
.contact__map-pin.is-in      { animation: jes-pin-drop 1.1s cubic-bezier(.2,.7,.3,1.2) both; }
.contact__map-pin.is-in svg  { animation: jes-pin-bob 2.4s ease-in-out 1.1s infinite; }
@keyframes jes-pin-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Industry tile icon: indicate pulse when .is-pulsed is added (manim Indicate) */
@keyframes jes-indicate {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.industry-tile__icon            { will-change: transform; }
.industry-tile__icon.is-pulsed   { animation: jes-indicate 0.7s ease-out both; }

/* ============================================
   NAV LOGO DRAW (manim Create)
   Pure CSS — strokes draw via stroke-dashoffset,
   nodes fade in after, all staggered via :nth-child.
   ============================================ */
.nav__logo-svg .lk-frame,
.nav__logo-svg .lk-stroke {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: jes-logo-stroke 1.1s cubic-bezier(0.5, 0, 0.5, 1) 0.2s forwards;
}
.nav__logo-svg .lk-stroke:nth-of-type(2) { animation-delay: 0.26s; }
.nav__logo-svg .lk-stroke:nth-of-type(3) { animation-delay: 0.32s; }
.nav__logo-svg .lk-stroke:nth-of-type(4) { animation-delay: 0.38s; }
.nav__logo-svg .lk-stroke:nth-of-type(5) { animation-delay: 0.44s; }
.nav__logo-svg .lk-stroke:nth-of-type(6) { animation-delay: 0.50s; }
@keyframes jes-logo-stroke {
  to { stroke-dashoffset: 0; }
}
.nav__logo-svg .lk-node {
  opacity: 0;
  animation: jes-logo-node 0.4s var(--ease) forwards;
  transform-origin: center;
}
.nav__logo-svg .lk-node:nth-of-type(1) { animation-delay: 0.85s; }
.nav__logo-svg .lk-node:nth-of-type(2) { animation-delay: 0.95s; }
.nav__logo-svg .lk-node:nth-of-type(3) { animation-delay: 1.05s; }
.nav__logo-svg .lk-node:nth-of-type(4) { animation-delay: 1.15s; }
.nav__logo-svg .lk-node:nth-of-type(5) { animation-delay: 1.25s; }
@keyframes jes-logo-node {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   STAT COUNTERS — CSS @property + counter()
   The custom property --n is typed as <integer> and
   interpolated by the browser. counter() renders it.
   Plays once when .is-in is added by the IO.
   ============================================ */
@property --n-200 { syntax: '<integer>'; initial-value: 0; inherits: false; }
@property --n-25  { syntax: '<integer>'; initial-value: 0; inherits: false; }
@property --n-48  { syntax: '<integer>'; initial-value: 0; inherits: false; }
@property --n-100 { syntax: '<integer>'; initial-value: 0; inherits: false; }

.why-stat__num {
  counter-reset: n var(--n, 0);
  font-variant-numeric: tabular-nums;
}
.why-stat__num::after { content: counter(n) attr(data-suffix); }
.why-stat__num::after {
  content: counter(n) attr(data-suffix);
}
.why-stat__num[data-count="200"] { --n: 0; --n-200: 0; }
.why-stat__num[data-count="25"]  { --n: 0; --n-25:  0; }
.why-stat__num[data-count="48"]  { --n: 0; --n-48:  0; }
.why-stat__num[data-count="100"] { --n: 0; --n-100: 0; }

.why-stat__num[data-count="200"].is-in { animation: jes-count-200 1.8s var(--ease) forwards; }
.why-stat__num[data-count="25"].is-in  { animation: jes-count-25  1.8s var(--ease) forwards; }
.why-stat__num[data-count="48"].is-in  { animation: jes-count-48  1.8s var(--ease) forwards; }
.why-stat__num[data-count="100"].is-in { animation: jes-count-100 1.8s var(--ease) forwards; }

@keyframes jes-count-200 { to { --n-200: 200; --n: 200; } }
@keyframes jes-count-25  { to { --n-25:  25;  --n: 25;  } }
@keyframes jes-count-48  { to { --n-48:  48;  --n: 48;  } }
@keyframes jes-count-100 { to { --n-100: 100; --n: 100; } }

/* ============================================
   SECTION HEADS — staggered kids reveal
   The IO in animations.js adds .in-view to the
   .section__head; CSS handles the rest.
   ============================================ */
.section__head { display: block; }
.section__head .eyebrow,
.section__head h2,
.section__head p { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.section__head.in-view .eyebrow { opacity: 1; transform: translateY(0); transition-delay: 0.00s; }
.section__head.in-view h2      { opacity: 1; transform: translateY(0); transition-delay: 0.10s; }
.section__head.in-view p       { opacity: 1; transform: translateY(0); transition-delay: 0.20s; }

/* ============================================
   BUTT-FUSION (services card)
   .is-in triggers a one-shot timeline. The .bf-flash
   is sequenced by relative animation-delay.
   ============================================ */
@keyframes jes-bf-left  { from { transform: translateX(60px);  } to { transform: translateX(0); } }
@keyframes jes-bf-right { from { transform: translateX(-60px); } to { transform: translateX(0); } }
@keyframes jes-bf-flash-in  { from { opacity: 1; transform: scale(0.4); } to { opacity: 1; transform: scale(1);   } }
@keyframes jes-bf-flash-out { from { opacity: 1; transform: scale(1);   } to { opacity: 0; transform: scale(1.4); } }

.service-card__visual .bf-left,
.service-card__visual .bf-right,
.service-card__visual .bf-flash { will-change: transform, opacity; }
.service-card__visual .bf-left  { transform: translateX(60px);  }
.service-card__visual .bf-right { transform: translateX(-60px); }
.service-card__visual .bf-flash { opacity: 0; transform: scale(0.4); }

.service-card__visual.is-in .bf-left  { animation: jes-bf-left  1.0s cubic-bezier(0.5, 0, 0.5, 1) forwards; }
.service-card__visual.is-in .bf-right { animation: jes-bf-right 1.0s cubic-bezier(0.5, 0, 0.5, 1) forwards; }
.service-card__visual.is-in .bf-flash { animation: jes-bf-flash-in 0.18s var(--ease) 0.95s forwards,
                                                 jes-bf-flash-out 0.45s ease-in 1.13s forwards; }

/* ============================================
   CHAIN DIVIDER (manim-style draw + atom pop)
   .is-in triggers a one-shot draw, then atoms
   drift up and down forever (stagger via :nth-child).
   ============================================ */
@keyframes jes-chain-stroke { to { stroke-dashoffset: 0; } }
@keyframes jes-chain-pop   { from { opacity: 0; transform: scale(0.3); }
                             to   { opacity: 1; transform: scale(1);   } }
@keyframes jes-chain-float { 0%, 100% { transform: translateY(0); }
                             50%      { transform: translateY(-4px); } }

.chain-divider .chain-bonds line {
  animation: jes-chain-stroke 0.8s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}
.chain-divider.is-in .chain-bonds line { animation-delay: 0s; }
/* stagger the bonds via nth-child */
.chain-divider .chain-bonds line:nth-of-type(1)  { animation-delay: 0.00s; }
.chain-divider .chain-bonds line:nth-of-type(2)  { animation-delay: 0.06s; }
.chain-divider .chain-bonds line:nth-of-type(3)  { animation-delay: 0.12s; }
.chain-divider .chain-bonds line:nth-of-type(4)  { animation-delay: 0.18s; }
.chain-divider .chain-bonds line:nth-of-type(5)  { animation-delay: 0.24s; }
.chain-divider .chain-bonds line:nth-of-type(6)  { animation-delay: 0.30s; }
.chain-divider .chain-bonds line:nth-of-type(7)  { animation-delay: 0.36s; }
.chain-divider .chain-bonds line:nth-of-type(8)  { animation-delay: 0.42s; }
.chain-divider .chain-bonds line:nth-of-type(9)  { animation-delay: 0.48s; }
.chain-divider .chain-bonds line:nth-of-type(10) { animation-delay: 0.54s; }
.chain-divider .chain-bonds line:nth-of-type(11) { animation-delay: 0.60s; }
.chain-divider .chain-bonds line:nth-of-type(12) { animation-delay: 0.66s; }
.chain-divider .chain-bonds line:nth-of-type(13) { animation-delay: 0.72s; }
.chain-divider .chain-bonds line:nth-of-type(14) { animation-delay: 0.78s; }

.chain-divider .chain-atoms circle {
  animation: jes-chain-pop 0.5s var(--ease) forwards,
             jes-chain-float 1.2s ease-in-out infinite;
  animation-delay: 0.6s, 1.4s;
}
.chain-divider .chain-atoms circle:nth-of-type(2n)     { animation-delay: 0.68s, 1.55s; }
.chain-divider .chain-atoms circle:nth-of-type(3n)     { animation-delay: 0.76s, 1.7s;  }
.chain-divider .chain-atoms circle:nth-of-type(4n)     { animation-delay: 0.84s, 1.85s; }
.chain-divider .chain-atoms circle:nth-of-type(5n)     { animation-delay: 0.92s, 1.45s; }
.chain-divider .chain-atoms circle:nth-of-type(6n)     { animation-delay: 1.00s, 1.6s;  }
.chain-divider .chain-atoms circle:nth-of-type(7n)     { animation-delay: 1.08s, 1.75s; }

/* Section head underline color: kept from existing .in-view rule, but make sure
   the kids' opacity transition is smooth when GSAP isn't driving it */
.section__head > * { transition: opacity 0.6s var(--ease, ease), transform 0.6s var(--ease, ease); }
