/* Core visual system for the CP GEAR WORKS static website. */
:root {
  --color-ink: #08111f;
  --color-navy: #0d1c32;
  --color-navy-soft: #142842;
  --color-steel: #607184;
  --color-mist: #eef3f7;
  --color-panel: #f8fafc;
  --color-line: rgba(8, 17, 31, 0.12);
  --color-line-dark: rgba(255, 255, 255, 0.14);
  --color-orange: #f47b20;
  --color-green: #15824b;
  --color-amber: #a66a00;
  --color-red: #b42318;
  --color-white: #ffffff;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
  --radius: 8px;
  --shadow-soft: 0 14px 40px rgba(8, 17, 31, 0.08);
  --shadow-strong: 0 26px 80px rgba(0, 0, 0, 0.24);
  --max: 1180px;
  --space-section: 96px;
  --transition: 190ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(244, 123, 32, 0.72);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 1000;
  background: var(--color-orange);
  color: var(--color-white);
  padding: 10px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled,
.site-header.header-solid {
  background: rgba(8, 17, 31, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-grid;
  grid-template-columns: 42px auto;
  gap: 12px;
  align-items: center;
  color: var(--color-white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-name {
  display: block;
  font-size: 0.94rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.brand-line {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  font-weight: 650;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-white);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-orange);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero,
.page-hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-ink);
}

.hero {
  min-height: 100vh;
}

.page-hero {
  min-height: 62vh;
}

.hero-slider,
.page-hero::before {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: linear-gradient(90deg, rgba(8, 17, 31, 0.97), rgba(8, 17, 31, 0.72) 44%, rgba(8, 17, 31, 0.26)), var(--slide-image);
  background-position: center;
  background-size: cover;
  transform: scale(1);
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  animation: hero-zoom 9s ease-in-out forwards;
}

.page-hero::before {
  content: "";
  background-image: linear-gradient(90deg, rgba(8, 17, 31, 0.95), rgba(8, 17, 31, 0.62)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(0deg, var(--color-ink), transparent);
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 76px;
}

.page-hero-products {
  --hero-image: url("../images/products/precision-components.png");
}

.page-hero-winches {
  --hero-image: url("../images/winches/winch-final-inspection.png");
}

.page-hero-job {
  --hero-image: url("../images/gallery/machining-capability.png");
}

.page-hero-gallery,
.page-hero-contact,
.page-hero-error {
  --hero-image: url("../images/hero/hero-precision-gears.png");
}

@keyframes hero-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.045);
  }
}

.eyebrow {
  display: inline-flex;
  color: var(--color-orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero p,
.page-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--color-white);
  background: var(--color-orange);
  border-color: var(--color-orange);
  box-shadow: 0 12px 28px rgba(244, 123, 32, 0.24);
}

.button-secondary {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.26);
}

.button-outline {
  color: var(--color-navy);
  background: var(--color-white);
  border-color: var(--color-navy);
}

.button-outline:hover {
  color: var(--color-white);
  background: var(--color-navy);
}

.scroll-indicator {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 26px;
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.scroll-indicator::after {
  content: "";
  display: block;
  width: 1px;
  height: 18px;
  background: var(--color-orange);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  from {
    transform: translateY(-18px);
  }
  to {
    transform: translateY(56px);
  }
}

.section {
  padding: var(--space-section) 0;
}

.section-dark {
  color: var(--color-white);
  background: var(--color-ink);
}

.section-steel {
  background: var(--color-mist);
}

.section-panel {
  background: var(--color-panel);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.9fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 42px;
}

.section-head p,
.split p,
.card p,
.detail-list p {
  color: var(--color-steel);
}

.section-dark .section-head p,
.section-dark .split p,
.section-dark .card p,
.section-dark .detail-list p {
  color: rgba(255, 255, 255, 0.7);
}

.split,
.feature-band,
.contact-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: center;
}

.media-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-navy);
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 10;
}

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

.grid {
  display: grid;
  gap: 22px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 123, 32, 0.34);
  box-shadow: 0 20px 50px rgba(8, 17, 31, 0.12);
}

.section-dark .card {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--color-line-dark);
  box-shadow: none;
}

.card-body {
  padding: 24px;
}

.card-image {
  width: 100%;
  height: 224px;
  object-fit: cover;
  background: var(--color-navy);
}

.icon-pill {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(244, 123, 32, 0.32);
  border-radius: 6px;
  color: var(--color-orange);
  background: rgba(244, 123, 32, 0.08);
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--color-orange);
  font-weight: 850;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat {
  border-left: 3px solid var(--color-orange);
  padding: 8px 14px;
  background: rgba(8, 17, 31, 0.04);
}

.stat strong {
  display: block;
  font-size: 1.45rem;
}

.process-flow,
.capacity-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.process-flow {
  margin-top: 28px;
}

.process-flow span,
.capacity-list span,
.tag-list span {
  border: 1px solid var(--color-line-dark);
  border-radius: 5px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 750;
}

.section:not(.section-dark) .tag-list span,
.section:not(.section-dark) .capacity-list span {
  color: var(--color-ink);
  border-color: var(--color-line);
  background: var(--color-white);
}

.detail-list {
  display: grid;
  gap: 18px;
}

.detail-list article {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-line);
}

.timeline {
  counter-reset: process;
}

.timeline .card {
  position: relative;
}

.timeline .card::before {
  counter-increment: process;
  content: counter(process, decimal-leading-zero);
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(244, 123, 32, 0.35);
  font-size: 1.7rem;
  font-weight: 900;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-button {
  border: 1px solid var(--color-line);
  border-radius: 5px;
  padding: 10px 14px;
  color: var(--color-ink);
  background: var(--color-white);
  font-weight: 800;
  cursor: pointer;
}

.filter-button.is-active {
  color: var(--color-white);
  background: var(--color-navy);
  border-color: var(--color-navy);
}

.masonry {
  columns: 3 260px;
  column-gap: 18px;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: var(--color-navy);
  cursor: pointer;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  color: var(--color-white);
  padding: 14px 16px;
  text-align: left;
}

.map-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(8, 17, 31, 0.24);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--color-steel);
  background: linear-gradient(135deg, #f7f9fb, #e8eef4);
  text-align: center;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  font-weight: 750;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(8, 17, 31, 0.16);
  border-radius: 5px;
  padding: 13px 14px;
  color: var(--color-ink);
  background: var(--color-white);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--color-red);
}

.field-error {
  min-height: 1.2em;
  color: var(--color-red);
  font-size: 0.82rem;
  font-weight: 650;
}

.form-status {
  min-height: 1.3em;
  font-weight: 750;
}

.form-status.is-success {
  color: var(--color-green);
}

.form-status.is-error {
  color: var(--color-red);
}

.footer {
  color: rgba(255, 255, 255, 0.72);
  background: #060d18;
  padding: 48px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 28px;
}

.footer a:hover {
  color: var(--color-white);
}

.footer h3 {
  color: var(--color-white);
  font-size: 0.95rem;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

.whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  min-width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 15px;
  color: var(--color-white);
  background: #18a558;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.24);
  font-weight: 900;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(6, 13, 24, 0.88);
}

.lightbox.is-open {
  display: grid;
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
}

.lightbox figcaption {
  color: var(--color-white);
  margin-top: 12px;
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 5px;
  color: var(--color-white);
  background: var(--color-orange);
  font-size: 1.5rem;
  cursor: pointer;
}
