/* ---------- Woodlands Premium Pipes — shared styles ---------- */

:root {
  --bg: #ecebe8;
  --bg-2: #dededa;
  --ink: #0f1419;
  --ink-2: #1f2830;
  --muted: #5a6066;
  --rule: #1f2830;
  --rule-soft: #cfccc2;
  --bone: #d4c4a8;
  --bone-2: #c3b291;
  --paper: #f4f3ef;

  --accent: #ffcd11;        /* Caterpillar yellow (fill) */
  --accent-ink: #16140c;    /* text/icons ON an accent fill */
  --accent-text: #a8730a;   /* accent as text on light surfaces */

  --steel: #002868;         /* Texas flag blue section tone */
  --steel-2: #0a3a85;       /* hover/step */

  /* hero background tone (default: Industrial Blue) */
  --hero-ink: #0c141d;
  --hero-base: #13202f;
  --hero-glow: rgba(38,86,138,0.34);
  --hero-glow2: rgba(150,180,205,0.12);

  --f-display: 'Oswald', 'Arial Narrow', sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* ---------- Typography ---------- */

.display {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.96;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  display: inline-block;
  width: 11px; height: 11px;
  background: var(--accent);
  margin-right: 9px;
  transform: translateY(-1px);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

h1, h2, h3, h4 { margin: 0; }

/* ---------- Top utility bar ---------- */

.utility {
  background: var(--ink);
  color: #c6cbd1;
  font-size: 12px;
  border-bottom: 1px solid #1a2028;
}
.utility .inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  align-items: center;
}
.utility a { color: #c6cbd1; }
.utility a:hover { color: #fff; }
.utility .sep { width: 1px; height: 10px; background: #2a3340; }
.utility .search-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: #c6cbd1;
}
.utility .search-btn:hover { color: #fff; }

/* language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6d7680;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.lang-toggle .lang-sep { color: #2a3340; }
.lang-toggle [data-lng] { color: #6d7680; transition: color .15s; }
.lang-toggle [data-lng].on { color: #fff; }
.lang-toggle:hover [data-lng] { color: #c6cbd1; }
.lang-toggle:hover [data-lng].on { color: #fff; }

/* Chinese rendering: per-glyph fallback keeps Latin in the display/mono
   faces and routes CJK glyphs to a Chinese face; drop forced uppercase. */
html[lang="zh"] {
  --f-display: 'Oswald', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --f-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', ui-monospace, monospace;
}
html[lang="zh"] .display,
html[lang="zh"] .section-title,
html[lang="zh"] .nav-link,
html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] h3,
html[lang="zh"] h4 {
  text-transform: none;
  letter-spacing: 0.01em;
}
html[lang="zh"] .eyebrow,
html[lang="zh"] .pill,
html[lang="zh"] .mega-col h5,
html[lang="zh"] .footer h5 {
  text-transform: none;
}

/* ---------- Primary nav ---------- */

.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--rule-soft);
  z-index: 50;
}
.site-header {
  position: sticky; top: 0; z-index: 50;
}
.nav .inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}
.logo-star {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
}
.logo-star svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-size: 22px;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--bone);
}
.logo small {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 2px;
}
.logo-text { display: block; }
.logo-name {
  display: block;
  white-space: nowrap;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.nav-items {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.nav-item {
  position: relative;
  height: 100%;
  display: flex; align-items: center;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 18px;
  height: 100%;
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-item:hover > .nav-link,
.nav-link.active { border-bottom-color: var(--accent); }

/* highlighted calculator CTA in nav */
.nav-link.nav-cta {
  background: var(--accent);
  color: var(--accent-ink);
  height: auto;
  align-self: center;
  padding: 11px 20px;
  border-bottom: 0;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background .15s, color .15s;
}
.nav-link.nav-cta::before {
  content: "";
  display: inline-block;
  width: 15px; height: 15px;
  margin-right: 4px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cline x1='8' y1='6' x2='16' y2='6'/%3E%3Cline x1='8' y1='10' x2='8' y2='10'/%3E%3Cline x1='12' y1='10' x2='12' y2='10'/%3E%3Cline x1='16' y1='10' x2='16' y2='10'/%3E%3Cline x1='8' y1='14' x2='8' y2='14'/%3E%3Cline x1='12' y1='14' x2='12' y2='14'/%3E%3Cline x1='8' y1='18' x2='16' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cline x1='8' y1='6' x2='16' y2='6'/%3E%3Cline x1='8' y1='10' x2='8' y2='10'/%3E%3Cline x1='12' y1='10' x2='12' y2='10'/%3E%3Cline x1='16' y1='10' x2='16' y2='10'/%3E%3Cline x1='8' y1='14' x2='8' y2='14'/%3E%3Cline x1='12' y1='14' x2='12' y2='14'/%3E%3Cline x1='8' y1='18' x2='16' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
}
.nav-item:hover > .nav-link.nav-cta,
.nav-link.nav-cta:hover { background: var(--ink); color: #fff; border-bottom: 0; }
.caret {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .6;
}

/* mega menu */
.mega {
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  min-width: 720px;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--accent);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 40px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s;
  box-shadow: 0 24px 40px -20px rgba(15,20,25,.22);
}
.mega.wide { min-width: 920px; }
.nav-item:hover > .mega { opacity: 1; pointer-events: auto; transform: translateY(0); }

.mega-col h5 {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}
.mega-col ul { list-style: none; padding: 0; margin: 0; }
.mega-col li { margin: 0; }
.mega-col a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}
.mega-col a:hover { color: var(--accent-text); }
.mega-col a .arr {
  opacity: 0;
  transition: opacity .15s, transform .15s;
}
.mega-col a:hover .arr { opacity: 1; transform: translateX(3px); }

.mega-feature {
  background: var(--ink);
  color: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
.mega-feature .tag {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--bone);
  text-transform: uppercase;
}
.mega-feature h4 {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.05;
  margin-top: 10px;
}
.mega-feature .go {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.light {
  background: transparent; color: var(--bg); border-color: var(--bg);
}
.btn.light:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--ink); border-color: var(--accent); color: var(--accent); }
.btn .arr { display: inline-block; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: #c6cbd1;
  padding: 72px 0 0;
  margin-top: 100px;
}
.footer .wrap-wide { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 48px; }
.footer h5 {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 0 0 16px;
}
.footer a { color: #c6cbd1; display: block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .brand {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 26px;
  color: #fff;
  letter-spacing: 0.04em;
}
.footer .brand::after {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  margin-left: 10px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  vertical-align: 0;
}
.footer .tagline {
  color: #8d959e;
  font-size: 13px;
  margin-top: 8px;
  max-width: 320px;
}
.footer .newsletter {
  margin-top: 24px;
  display: flex;
  border: 1px solid #2a3340;
  max-width: 320px;
}
.footer .newsletter input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 14px;
  color: #fff;
  font-family: var(--f-body);
  font-size: 13px;
  outline: none;
}
.footer .newsletter button {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 18px;
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}
.footer-bottom {
  border-top: 1px solid #1a2028;
  margin-top: 56px;
  padding: 22px 0;
  font-size: 12px;
  color: #6d7680;
}
.footer-bottom .wrap-wide {
  display: flex; justify-content: space-between; align-items: center;
}
.footer .socials { display: flex; gap: 10px; margin-top: 12px; }
.footer .socials a {
  width: 34px; height: 34px;
  border: 1px solid #2a3340;
  display: grid; place-items: center;
  padding: 0;
}
.footer .socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Placeholder image (striped SVG) ---------- */

.ph {
  position: relative;
  background: #20272f;
  color: #d4c4a8;
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ph::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(212,196,168,0.07) 0 2px,
    transparent 2px 14px
  );
}
.ph .ph-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(15,20,25,0.7);
  color: var(--bone);
  padding: 6px 10px;
  border: 1px solid rgba(212,196,168,0.2);
  z-index: 2;
}
.ph .ph-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--bone);
  opacity: .6;
  font-size: 12px;
  z-index: 2;
}
/* photo-filled placeholders */
.ph.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ph.has-img::before { opacity: 0; }
.ph.has-img .ph-label,
.ph.has-img .ph-corner { display: none; }
.ph.light {
  background: var(--bone);
  color: var(--ink);
}
.ph.light::before {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(15,20,25,0.08) 0 2px,
    transparent 2px 14px
  );
}
.ph.light .ph-label {
  background: rgba(251,247,238,0.85);
  color: var(--ink);
  border-color: rgba(15,20,25,0.15);
}
.ph.light .ph-corner { color: var(--ink); opacity: .5; }

/* ---------- Section helpers ---------- */

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-title {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: end;
}
.section-head p { max-width: 460px; color: var(--accent-text); margin: 0; font-size: 17px; line-height: 1.6; }
.section-head .accent-stripe {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* subtle page-to-page fade */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

/* ---------- Tweaks panel ---------- */

.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 16px 18px;
  display: none;
  min-width: 240px;
  box-shadow: 0 12px 30px -12px rgba(15,20,25,.35);
  font-family: var(--f-body);
}
.tweaks.on { display: block; }
.tweaks h5 {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}
.tweaks .swatches { display: flex; gap: 8px; margin-top: 8px; }
.tweaks .sw {
  width: 30px; height: 30px;
  border: 2px solid transparent;
  cursor: pointer;
}
.tweaks .sw.on { border-color: var(--ink); }
.tweaks .lbl {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
  display: block;
}

/* ---------- Utility ---------- */

.rule { height: 1px; background: var(--rule-soft); width: 100%; }
.rule-dark { height: 1px; background: #2a3340; width: 100%; }

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

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; }
  .footer .wrap-wide { grid-template-columns: 1fr 1fr; }
}

/* ===== Mobile nav (hamburger) ===== */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  display: block; height: 2.5px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-burger.on span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger.on span:nth-child(2) { opacity: 0; }
.nav-burger.on span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Compact desktop nav on narrower laptops ===== */
@media (max-width: 1300px) and (min-width: 1081px) {
  .nav-link { padding: 0 11px; font-size: 13px; letter-spacing: 0.06em; }
  .nav-link.nav-cta { padding: 10px 14px; }
  .logo { gap: 10px; }
  .logo-name { font-size: 20px; }
  .logo small { font-size: 12px; letter-spacing: 0.14em; }
}

@media (max-width: 1080px) {
  .utility .inner { padding: 7px 18px; gap: 14px; flex-wrap: wrap; }
  .nav .inner { padding: 0 18px; height: 64px; }
  .logo-name { font-size: 15px; }
  .nav-burger { display: flex; }

  .nav-items {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    background: var(--paper);
    border-top: 1px solid var(--rule-soft);
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 18px 30px -16px rgba(15,20,25,.3);
    padding: 8px 0;
    display: none;
  }
  .nav-items.open { display: flex; }
  .nav-item { height: auto; width: 100%; }
  .nav-link {
    height: auto; width: 100%;
    padding: 14px 22px;
    border-bottom: 1px solid var(--rule-soft);
    justify-content: space-between;
  }
  .nav-item:hover > .nav-link, .nav-link.active { border-bottom: 1px solid var(--rule-soft); }
  .nav-link.nav-cta { margin: 8px 18px; width: auto; justify-content: center; border-bottom: 0; padding: 14px 20px; }
  .nav-item:hover > .nav-link.nav-cta { border-bottom: 0; }
  .caret { transform: rotate(45deg); }

  /* mega-menus: show inline, full width, no hover */
  .mega {
    position: static; opacity: 1; pointer-events: auto; transform: none;
    min-width: 0; width: auto;
    grid-template-columns: 1fr !important;
    box-shadow: none; border: 0;
    border-top: 0; padding: 0 22px 10px;
    display: none;
  }
  .nav-item:hover > .mega { display: none; }
  .nav-item.open-sub > .mega { display: block; }
  .mega-col h5 { margin-top: 10px; }
  .mega-feature { display: none; }
}

/* ===== Mobile layout ===== */
@media (max-width: 760px) {
  .wrap, .wrap-wide { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-title { font-size: clamp(30px, 8vw, 44px); }
  h1 { font-size: clamp(40px, 12vw, 72px) !important; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer .wrap-wide { grid-template-columns: 1fr; gap: 28px; }

  /* generic 2-col → 1-col collapses used across pages */
  .hero-inner, .ribbon-grid, .markets-grid, .news-grid,
  .locations-grid, .cap-grid, .prod-grid, .who-grid,
  .capteaser-inner, .capteaser-right, .manifesto-grid,
  .careers-cta .inner, .stats-inline, .top-grid, .loc-grid,
  .form-wrap, .form-row, .meta-stats {
    grid-template-columns: 1fr !important;
  }
  .hero-side { display: block !important; border-left: 0; padding-left: 0; margin-top: 24px; }
  .careers-cta .stats-inline { grid-template-columns: 1fr 1fr !important; }
  .ribbon-grid .ribbon-item { border-right: 0; border-bottom: 1px solid #2a3340; padding: 16px 0; }
  .prod.flip .prod-media { order: 0; }
  .prod-media { position: static !important; }
  .form-sidebar { border-left: 0 !important; padding-left: 0 !important; }
  .page-header .head-grid { grid-template-columns: 1fr !important; }
  .page-header .meta-stats { border-left: 0; padding-left: 0; gap: 20px; flex-wrap: wrap; }
}
