/* ===========================================================
   LATEXFOAM TECHNOLOGY — redesign v2
   Palette grounded in the client's own equipment: the steel-blue
   of the RF machines and factory ironwork in the real photos.
   Type: Space Grotesk (display) / IBM Plex Sans (body + labels)
   =========================================================== */

:root{
  --ink:        #161b1f;
  --paper:      #ffffff;
  --paper-dim:  #f1f1ee;
  --line:       #b9c2c8;
  --line-soft:  rgba(43,74,102,0.16);

  --blue:       #2b5580;
  --blue-dim:   #1f3f61;
  --blue-deep:  #122438;
  --blue-pale:  #e7edf2;

  --steel:      #5b6670;

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
}

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

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ color: inherit; }
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

h1,h2,h3,h4{
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow{
  font-family: var(--body);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before{
  content: "";
  width: 26px; height: 2px;
  background: var(--blue);
  display: inline-block;
}

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

/* ---------------- header ---------------- */
header{
  position: sticky; top:0; z-index: 50;
  background: rgba(18,36,56,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav{
  display:flex; align-items:center; justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  color: var(--paper);
}
.brand{ display:flex; align-items:center; gap: 12px; text-decoration:none; min-width:0; flex: 1 1 auto; }
.brand-mark{ width: 36px; height: 36px; object-fit: contain; flex: none; }
.brand-text{ display:flex; flex-direction:column; gap: 2px; min-width:0; }
.wordmark{
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.wordmark span{ color: #7fa8cc; }
.tagline{
  font-family: var(--body); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap; overflow:hidden; text-overflow:ellipsis;
}
@media (max-width: 560px){ .tagline{ display:none; } }
@media (max-width: 420px){
  .brand-mark{ width: 26px; height: 26px; }
  .wordmark{ font-size: 14px; letter-spacing: 0.01em; }
  .brand{ gap: 8px; }
}
.navlinks{
  display:flex; gap: 28px; list-style:none; margin:0; padding:0;
  font-size: 14.5px;
}
.navlinks a{
  text-decoration:none; color: rgba(255,255,255,0.75);
  transition: color .15s ease;
}
.navlinks a:hover{ color: var(--paper); }
.nav-cta{
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  color: var(--blue-deep);
  background: #eef3f7;
  padding: 9px 16px;
  border-radius: 3px;
  text-decoration:none;
  white-space: nowrap;
  flex: none;
  transition: background .15s ease;
}
.nav-cta:hover{ background: #ffffff; }

@media (max-width: 780px){
  .navlinks{ display:none; }
}
@media (max-width: 380px){
  .nav-cta{ font-size: 11.5px; padding: 8px 11px; }
}

/* ---------------- hero ---------------- */
.hero{
  position: relative;
  background: var(--blue-deep);
  color: var(--paper);
  overflow: hidden;
  padding: 96px 0 110px;
}
.blueprint-grid{
  position:absolute; inset:0;
  background-image:
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, var(--line-soft) 0 1px, transparent 1px 64px);
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, black 40%, transparent 85%);
}
.hero-glow{
  position:absolute; top:-160px; right:-120px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90,140,180,0.28) 0%, rgba(90,140,180,0) 70%);
}
.hero-inner{ position:relative; z-index:1; max-width: 760px; }
.hero h1{
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  color: var(--paper);
}
.hero h1 em{ font-style: normal; color: #8fb6d8; }
.hero p.lead{
  margin-top: 22px;
  max-width: 560px;
  font-size: 18px;
  color: rgba(255,255,255,0.82);
}
.hero-ctas{ display:flex; gap:16px; margin-top: 36px; flex-wrap: wrap; }
.btn{
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 3px;
  display:inline-flex; align-items:center; gap:8px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: #eef3f7; color: var(--blue-deep); }
.btn-primary:hover{ background: #ffffff; }
.btn-ghost{ border:1px solid rgba(255,255,255,0.4); color: var(--paper); }
.btn-ghost:hover{ border-color: var(--paper); }

.hero-meta{
  margin-top: 56px;
  display:flex; gap: 36px; flex-wrap: wrap;
  font-family: var(--body); font-size: 12.5px;
  color: rgba(255,255,255,0.55);
}
.hero-meta b{ color: var(--paper); display:block; font-size: 20px; font-family: var(--display); font-weight:600; }

/* ---------------- generic section ---------------- */
section{ padding: 88px 0; }
.section-head{ max-width: 640px; margin-bottom: 48px; }
.section-head h2{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p{ margin-top:16px; color: var(--steel); font-size: 16.5px; }

/* ---------------- problem / spec cards ---------------- */
.problem{ background: var(--paper-dim); }
.spec-row{
  display:grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--blue-dim);
  border-radius: 4px;
  overflow: hidden;
  margin: 40px 0 34px;
}
.spec-cell{
  padding: 22px 18px;
  border-right: 1px solid rgba(31,63,97,0.16);
  background: var(--paper);
}
.spec-cell:last-child{ border-right:none; }
.spec-cell .num{
  font-family: var(--display); font-size: 24px; color: var(--blue-dim); font-weight:600;
}
.spec-cell .lbl{
  font-family: var(--body); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--steel); margin-top:6px;
}
@media (max-width: 860px){
  .spec-row{ grid-template-columns: repeat(2, 1fr); }
  .spec-cell{ border-bottom: 1px solid rgba(31,63,97,0.16); }
}

.problem-copy{ max-width: 700px; color: #33383c; }
.problem-copy p + p{ margin-top: 14px; }

/* ---------------- figures / signature diagram ---------------- */
.figures{ background: var(--blue-deep); color: var(--paper); }
.figures .section-head p{ color: rgba(255,255,255,0.72); }
.figures .section-head h2{ color: var(--paper); }
.fig-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 860px){ .fig-grid{ grid-template-columns: 1fr; } }

.fig-card{
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  padding: 26px 26px 22px;
  background: rgba(255,255,255,0.03);
}
.fig-tag{
  font-family: var(--body); font-weight:600; font-size: 11.5px; letter-spacing:.1em; text-transform:uppercase;
  color: #8fb6d8; margin-bottom: 6px;
}
.fig-title{ font-family: var(--display); font-size: 20px; margin-bottom: 4px; }
.fig-sub{ font-family: var(--body); font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 18px; }
.fig-image{
  border-radius: 3px; overflow:hidden; border: 1px solid rgba(255,255,255,0.14);
  aspect-ratio: 3 / 2; background: rgba(0,0,0,0.15);
}
.fig-image img{ width:100%; height:100%; object-fit: cover; display:block; }
.fig-stats{
  display:flex; justify-content: space-between;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.2);
  font-family: var(--body); font-size: 12px; color: rgba(255,255,255,0.65);
}
.fig-stats b{ display:block; color: var(--paper); font-size: 14.5px; font-family: var(--body); font-weight:600; }

.fig-arrow{
  text-align:center; margin: 30px 0 0;
  font-family: var(--body); font-size: 13px; color: rgba(255,255,255,0.55);
}

/* ---------------- advantages ---------------- */
.advantages-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.adv-item{
  background: var(--paper);
  padding: 26px 24px;
  display:flex; gap: 14px; align-items:flex-start;
}
.adv-check{
  width: 18px; height:18px; flex: none; margin-top:3px;
  border: 1.5px solid var(--blue);
  border-radius: 3px;
  position: relative;
}
.adv-check::after{
  content:""; position:absolute; left:4px; top:1px;
  width:6px; height:10px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(40deg);
}
.adv-item p{ margin:0; font-size: 15.5px; }
.adv-item b{ display:block; font-family: var(--display); font-size: 16.5px; font-weight:600; margin-bottom: 3px; }
@media (max-width: 860px){ .advantages-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .advantages-grid{ grid-template-columns: 1fr; } }

/* ---------------- timeline ---------------- */
.timeline{ background: var(--paper-dim); }
.tl{ position:relative; margin-top: 20px; }
.tl::before{
  content:""; position:absolute; left: 88px; top:6px; bottom: 6px; width:1px;
  background: var(--line-soft);
}
.tl-item{
  position:relative; display:grid; grid-template-columns: 88px 1fr;
  gap: 28px; padding: 22px 0;
  border-top: 1px solid rgba(43,74,102,0.14);
}
.tl-item:first-child{ border-top:none; }
.tl-year{
  font-family: var(--display); font-size: 14.5px; color: var(--blue-dim); font-weight:600;
  padding-top: 2px;
}
.tl-dot{
  position:absolute; left: 84px; top: 27px; width:9px; height:9px; border-radius:50%;
  background: var(--blue); border: 2px solid var(--paper-dim);
}
.tl-body h4{ font-size: 17px; margin-bottom: 6px; }
.tl-body p{ margin:0; color:#33383c; font-size:15.5px; max-width: 620px; }
@media (max-width: 620px){
  .tl::before{ left: 54px; }
  .tl-item{ grid-template-columns: 54px 1fr; gap: 18px; }
  .tl-dot{ left: 50px; }
}

/* ---------------- photo blocks ---------------- */
.photo-block{ margin-top: 34px; border-radius: 4px; overflow:hidden; border: 1px solid rgba(31,63,97,0.14); }
.photo-block img{ width:100%; display:block; }
.photo-caption{
  font-family: var(--body); font-size: 12.5px; color: var(--steel);
  background: var(--paper); padding: 10px 14px;
  border-top: 1px solid rgba(31,63,97,0.12);
}
.figures .photo-block{ border-color: rgba(255,255,255,0.16); }
.figures .photo-caption{ background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.6); }

.photo-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 34px; }
@media (max-width: 780px){ .photo-row{ grid-template-columns: 1fr; } }

/* half-size photos/video, used where a full-width block was too dominant */
.photo-narrow{ max-width: 540px; margin-left:auto; margin-right:auto; }

/* Guatemala pair: equal height, width follows each photo's own aspect ratio */
.photo-row-matched{
  display:flex; gap: 24px; margin-top: 34px; align-items:flex-start;
}
.photo-row-matched .photo-block{ margin-top:0; flex: 0 1 auto; min-width:0; }
.photo-row-matched .photo-block img{ height: 240px; width:auto; max-width:100%; object-fit:cover; }
@media (max-width: 700px){
  .photo-row-matched{ flex-direction:column; }
  .photo-row-matched .photo-block img{ height:auto; width:100%; }
}

/* ---------------- timeline photos ---------------- */
.tl-photo-wrap{ margin-top: 14px; max-width: 420px; }
.tl-photo-wrap img{ width:100%; border-radius: 3px; display:block; border: 1px solid rgba(31,63,97,0.14); }
.tl-photo-wrap .photo-caption{ border-radius: 0 0 3px 3px; }

.tl-body-flex{ display:flex; gap: 24px; align-items:flex-start; flex-wrap:wrap; }
.tl-body-flex .tl-text{ flex: 1 1 260px; }
.tl-body-flex .tl-photo-wrap{ margin-top:0; max-width: 190px; flex: 0 0 190px; }
@media (max-width: 560px){
  .tl-body-flex .tl-photo-wrap{ max-width: 100%; flex-basis: 100%; }
}

/* ---------------- talalay callout ---------------- */
.talalay{
  background: var(--blue-pale);
  color: var(--ink);
  border-radius: 6px;
  padding: 46px 40px;
}
.talalay-single{ max-width: 720px; }
.talalay .eyebrow{ color: var(--blue); }
.talalay h2{ color: var(--ink); font-size: clamp(1.5rem,3vw,2rem); }
.talalay p{ color: #3a4247; margin-top:14px; }

/* ---------------- video ---------------- */
.video-wrap{ border-radius: 4px; overflow:hidden; border: 1px solid rgba(31,63,97,0.16); }
.video-wrap video{ width:100%; display:block; background:#000; }

/* ---------------- certifications ---------------- */
.certs{ background: var(--paper); }
.cert-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 780px){ .cert-grid{ grid-template-columns: 1fr; } }
.cert-card{
  border: 1px solid rgba(31,63,97,0.16);
  border-radius: 5px;
  padding: 26px 26px 22px;
  background: var(--paper-dim);
  display:flex; flex-direction:column;
}
.cert-badge{
  font-family: var(--body); font-weight:600; font-size: 11px; letter-spacing:.08em; text-transform:uppercase;
  color: var(--blue-dim); border: 1px solid var(--blue-dim); border-radius: 3px;
  padding: 4px 9px; display:inline-block; width:fit-content; margin-bottom: 14px;
}
.cert-card h3{ font-size: 19px; margin-bottom: 10px; }
.cert-stats{ display:flex; gap: 26px; margin: 16px 0 18px; flex-wrap:wrap; }
.cert-stat b{ display:block; font-family: var(--display); font-size: 19px; color: var(--blue-dim); }
.cert-stat span{ font-family: var(--body); font-size: 11px; color: var(--steel); text-transform:uppercase; letter-spacing:.04em; }
.cert-card p{ font-size: 14.5px; color:#33383c; margin: 0 0 18px; flex-grow:1; }
.cert-link{
  font-family: var(--body); font-weight:600; font-size: 13px; color: var(--blue-dim);
  text-decoration:none; border-bottom: 1px solid var(--blue-dim);
  width: fit-content; padding-bottom: 1px;
}
.cert-link:hover{ color: var(--blue); border-color: var(--blue); }

/* ---------------- contact ---------------- */
.contact{
  background: var(--blue-deep); color: var(--paper);
  text-align:center;
}
.contact .wrap{ max-width: 620px; }
.contact .eyebrow{ justify-content:center; }
.contact .eyebrow::before{ display:none; }
.contact h2{ color: var(--paper); font-size: clamp(1.8rem,4vw,2.6rem); }
.contact p.lead{ color: rgba(255,255,255,0.75); margin-top:16px; }
.contact .btn-primary{ margin-top: 30px; font-size: 15px; padding: 16px 30px; }
.contact-details{
  margin-top: 26px;
  display:flex; justify-content:center; gap: 20px; flex-wrap:wrap;
  font-family: var(--body); font-size: 14px; color: rgba(255,255,255,0.6);
}
.contact-details a{ color: rgba(255,255,255,0.8); text-decoration:none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.contact-details a:hover{ color: #fff; border-color: #fff; }

/* ---------------- footer ---------------- */
footer{
  background: var(--blue-deep);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 26px 0 34px;
}
.foot-row{
  display:flex; justify-content: space-between; flex-wrap:wrap; gap: 10px;
  font-family: var(--body); font-size: 12.5px; color: rgba(255,255,255,0.5);
}
.foot-row a{ color: rgba(255,255,255,0.65); text-decoration:none; }
.foot-row a:hover{ color: #8fb6d8; }

/* ---------------- reveal-on-scroll ---------------- */
.reveal{ opacity:0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }
