/* =========================================================
   GOLD SCREENS NZ — Industrial Trade Catalog system
   Shared across all pages. Inspired by Caterpillar
   specification sheets + Monocle editorial.
   ========================================================= */

:root {
  /* Brand */
  --orange:        #D85E00;
  --orange-hover:  #E87020;
  --orange-tint:   rgba(216, 94, 0, 0.08);
  --orange-border: rgba(216, 94, 0, 0.22);

  /* Surfaces */
  --paper:     #FAFAF8;
  --paper-2:   #F2F0ED;
  --paper-3:   #E5E2DD;
  --rule:      #DDD9D3;
  --rule-soft: #ECE9E3;

  /* Ink */
  --ink:       #1A1A18;
  --ink-2:     #3A3833;
  --ink-3:     #6B665D;
  --ink-4:     #8A857D;
  --ink-5:     #B0ACA5;

  /* Dark surfaces */
  --carbon:   #1C1B19;
  --carbon-2: #2A2925;
  --carbon-3: #38362F;

  /* Type */
  --display: 'Barlow', system-ui, -apple-system, sans-serif;
  --body:    'Outfit', system-ui, -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Rhythm */
  --max:    1320px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* =========================================================
   RESET + BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--orange); color: white; }

/* =========================================================
   UTILITIES
   ========================================================= */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-3); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
}
.eyebrow.no-rule::before { display: none; }
.eyebrow .orange { color: var(--orange); }

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.section-label .num { color: var(--orange); margin-right: 14px; }

.lede {
  font-family: var(--body);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.65;
  color: var(--ink-3);
  font-weight: 400;
  max-width: 62ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  border-radius: 6px;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-orange {
  background: var(--orange);
  color: white;
}
.btn-orange:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(216,94,0,0.28);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ghost-dark {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.32);
}
.btn-ghost-dark:hover { border-color: white; background: rgba(255,255,255,0.08); }
.btn .arrow { display: inline-block; transition: transform 0.25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* =========================================================
   NAV — fixed, transparent on hero, white on scroll
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding: 22px 0;
  transition: padding 0.35s, background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.nav.inner {
  padding: 14px 0;
  background: rgba(250,250,248,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  transition: color 0.35s;
}
.nav.scrolled .brand, .nav.inner .brand { color: var(--ink); }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 6px;
  object-fit: contain;
  background: white;
  padding: 2px;
  flex-shrink: 0;
}
.footer .brand-mark {
  width: 52px; height: 52px;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand-name span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.55;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-link {
  display: inline-block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.75);
  transition: color 0.25s;
  position: relative;
}
.nav.scrolled .nav-link, .nav.inner .nav-link { color: var(--ink-3); }
.nav-link:hover { color: white; }
.nav.scrolled .nav-link:hover, .nav.inner .nav-link:hover { color: var(--ink); }
.nav-link.active { color: white; }
.nav.scrolled .nav-link.active, .nav.inner .nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  bottom: 4px;
  height: 1px;
  background: var(--orange);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: white !important;
  padding: 11px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px;
  margin-left: 8px;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--orange-hover); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  color: white;
}
.nav.scrolled .nav-toggle, .nav.inner .nav-toggle { color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    padding: 18px var(--gutter);
    gap: 4px;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open .nav-link { color: var(--ink-2); padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
  .nav-links.open .nav-link:last-of-type { border-bottom: 0; }
  .nav-links.open .nav-cta { margin: 12px 0 0; justify-content: center; }
}

/* =========================================================
   SECTION SCAFFOLD
   ========================================================= */
section { position: relative; }

/* =========================================================
   INNER PAGE HEADER (about / machines / gallery / contact)
   ========================================================= */
.page-header {
  position: relative;
  background: var(--carbon);
  color: white;
  padding: 200px 0 88px;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(216,94,0,0.18), transparent 60%),
              linear-gradient(180deg, rgba(28,27,25,0.6), rgba(28,27,25,0.92));
  pointer-events: none;
}
.page-header .wrap { position: relative; z-index: 2; }
.page-header .eyebrow { color: rgba(255,255,255,0.55); }
.page-header .eyebrow::before { background: var(--orange-hover); }
.page-header h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: white;
  margin: 24px 0 20px;
  max-width: 14ch;
}
.page-header h1 em { color: var(--orange-hover); font-style: normal; }
.page-header .lede { color: rgba(255,255,255,0.7); max-width: 56ch; }

.page-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-header-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: flex;
  gap: 14px;
  align-items: center;
}
.breadcrumb a { color: rgba(255,255,255,0.55); }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { color: rgba(255,255,255,0.25); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--carbon);
  color: rgba(255,255,255,0.6);
  padding: 88px 0 36px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer a {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  transition: color 0.25s;
}
.footer a:hover { color: white; }
.footer .brand .brand-name strong { color: white; }
.footer .brand .brand-name span { color: rgba(255,255,255,0.4); }
.footer-lede {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin: 20px 0 0;
  max-width: 38ch;
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* =========================================================
   WHATSAPP FLOAT
   ========================================================= */
.wa-float {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 70;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(37,211,102,0.32);
  transition: transform 0.25s, box-shadow 0.25s;
}
.wa-float:hover {
  transform: scale(1.07);
  box-shadow: 0 10px 30px rgba(37,211,102,0.45);
}
.wa-float svg { width: 28px; height: 28px; fill: white; }
.wa-float::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(37,211,102,0.5);
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* =========================================================
   FORM ELEMENTS (used on contact + home form)
   ========================================================= */
.form {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(28px, 4vw, 44px);
  border-radius: 4px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.form-field label .req { color: var(--orange); }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0 14px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s;
  border-radius: 0;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-5); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-bottom-color: var(--orange); }
.form-field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B665D' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 20px; }
.form-submit {
  margin-top: 18px;
  width: 100%;
  background: var(--ink);
  color: white;
  padding: 18px 24px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.25s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.form-submit:hover { background: var(--orange); transform: translateY(-1px); }
.form-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: center;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* =========================================================
   GRID HELPERS
   ========================================================= */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }

@media (max-width: 900px) {
  .cols-2 { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cols-3 { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   IMAGE TREATMENTS
   ========================================================= */
.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
}
.img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.img-frame:hover img { transform: scale(1.04); }
.img-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.img-caption .index { color: var(--orange); }
