/* PXD Rig & Racking Range — prototype styles */

:root {
  /* Primal brand palette — see Brand Guidelines, p.24 */
  --black: #000000;      /* Primal Charcoal */
  --charcoal: #141414;
  --panel: #303030;      /* Primal Carbon */
  --line: #303030;       /* Primal Carbon */
  --mid-gray: #8a8a8f;
  --light-gray: #e8e8e8; /* Primal Chalk */
  --white: #ffffff;      /* Primal White */
  --green: #00ff78;      /* Primal Green 1 — primary accent, use sparingly */
  --green-2: #00e178;    /* Primal Green 2 — digital/hover variant */
  --font: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

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

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin: 0 0 18px;
}

h1, h2, h3 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: block;
  line-height: 0;
}
.logo img {
  height: 22px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--light-gray);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--white); border-color: var(--green); }

.nav-cta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid var(--white);
  padding: 11px 20px;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--white); color: var(--black); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--white);
}

/* ---------- Video hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  width: 100%;
  overflow: hidden;
}
.hero video, .hero .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 32%, rgba(0,0,0,0.35) 70%, rgba(0,0,0,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 90px;
  max-width: var(--container);
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 84px);
  line-height: 0.98;
  max-width: 900px;
}
.hero p:not(.eyebrow) {
  color: var(--light-gray);
  font-size: 17px;
  max-width: 520px;
  margin: 22px 0 34px;
  line-height: 1.6;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 16px 30px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--green); color: var(--black); }
.btn-primary:hover { background: var(--green-2); }
.btn-secondary { border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* quick category pills over hero (rig & racking page) */
.hero-pills {
  position: absolute;
  z-index: 2;
  top: 130px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-pill {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 10px 18px;
  text-align: right;
  transition: background 0.2s, border-color 0.2s;
}
.hero-pill:hover { background: rgba(0,255,120,0.9); border-color: var(--green); color: var(--black); }

/* ---------- Section scaffolding ---------- */
section { padding: 110px 0; }
.section-head {
  max-width: 620px;
  margin: 0 0 60px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }
.section-head p:not(.eyebrow) {
  color: var(--mid-gray);
  font-size: 16px;
  line-height: 1.7;
  margin-top: 18px;
}

.section-alt { background: var(--charcoal); }

/* ---------- Case studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.case-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--panel);
}
.case-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.case-card:hover img { transform: scale(1.06); }
.case-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.92) 100%);
}
.case-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 24px;
}
.case-card-type {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 8px;
}
.case-card-title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.25;
}
.case-card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid var(--green);
  padding-bottom: 2px;
}

/* ---------- Category showcase (rig & racking page) ---------- */
.category-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.category-row:not(:last-child) { margin-bottom: 130px; }
.category-row.reverse .category-media { order: 2; }
.category-row.reverse .category-copy { order: 1; }

.category-copy .eyebrow { margin-bottom: 14px; }
.category-copy h2 { font-size: clamp(30px, 4vw, 52px); margin-bottom: 22px; }
.category-copy p:not(.eyebrow) { color: var(--mid-gray); font-size: 16px; line-height: 1.8; max-width: 460px; }
.category-list {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: grid; gap: 10px;
}
.category-list li {
  font-size: 13px; color: var(--light-gray);
  padding-left: 18px; position: relative;
}
.category-list li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 8px; height: 1px; background: var(--green);
}

.category-media {
  position: relative;
  background: #ffffff;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.flickbook { position: relative; width: 100%; height: 100%; }
.flickbook img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.flickbook img.is-active { opacity: 1; }

.flickbook-controls {
  position: absolute;
  bottom: 16px; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.flickbook-arrow {
  background: rgba(0,0,0,0.75);
  color: var(--white);
  border: none;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.flickbook-arrow:hover { background: var(--green); color: var(--black); }
.flickbook-dots { display: flex; gap: 6px; }
.flickbook-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(0,0,0,0.3);
  border: none; padding: 0; cursor: pointer;
}
.flickbook-dot.is-active { background: var(--green); }
.flickbook-label {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  background: rgba(0,0,0,0.82);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}
.footer-links {
  display: flex; gap: 40px; list-style: none; padding: 0; margin: 0;
}
.footer-links a {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mid-gray);
}
.footer-links a:hover { color: var(--white); }
.footer-note {
  color: var(--mid-gray); font-size: 12px; margin-top: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .category-row { grid-template-columns: 1fr; gap: 34px; }
  .category-row.reverse .category-media,
  .category-row.reverse .category-copy { order: initial; }
  .category-row:not(:last-child) { margin-bottom: 70px; }
  .hero-pills { display: none; }
  section { padding: 70px 0; }
  .container { padding: 0 22px; }
}
@media (max-width: 560px) {
  .case-grid { grid-template-columns: 1fr; }
}
