/* ==========================================================================
   Rotech Precision Engineering, design system
   Single dark theme by deliberate brand choice (industrial / precision-shop
   mood). Shape lock: radius 0 everywhere. One accent: machined amber.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0a0c0e;
  --surface: #14171b;
  --surface-2: #1b1f24;
  --surface-3: #20252b;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f1f2f0;
  --text-muted: #9ba1a6;
  --text-dim: #6b7178;

  --accent: #e0862a;
  --accent-strong: #f2984a;
  --accent-wash: rgba(224, 134, 42, 0.12);
  --accent-border: rgba(224, 134, 42, 0.35);
  --on-accent: #0a0c0e;

  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1600px;
  --nav-h: 72px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

svg {
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 40px;
  }
}

@media (min-width: 1440px) {
  .container {
    padding-inline: 56px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Type scale ---------- */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.headline {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--text);
}

.headline-xl {
  font-size: clamp(2.25rem, 4.2vw, 3.4rem);
}

.headline-lg {
  font-size: clamp(1.9rem, 3vw, 2.75rem);
}

.body-text {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 62ch;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-intro .body-text {
  margin-top: 18px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  background: rgba(10, 12, 14, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  flex: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-mark circle {
  stroke: var(--accent);
}

.brand-mark path {
  stroke: var(--accent);
}

.brand-word-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-toggle .icon-x {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-list {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-x {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  background: var(--bg);
  padding: 32px 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 500;
}

.mobile-menu .btn {
  margin-top: 20px;
  justify-content: center;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .nav-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 72px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  max-width: 660px;
}

.hero-copy .headline-xl {
  margin-bottom: 20px;
}

.hero-copy .body-text {
  margin-bottom: 32px;
}

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

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(10, 12, 14, 0.55) 100%);
  pointer-events: none;
}

.hero-visual-tag {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(10, 12, 14, 0.72);
  border: 1px solid var(--border-strong);
  padding: 8px 12px;
  backdrop-filter: blur(4px);
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.05fr 0.85fr;
    gap: 64px;
  }
}

/* ---------- Stat strip ---------- */

.stat-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 32px;
}

.stat-strip .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.stat-item .icon-wrap {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
  transform: translateY(3px);
}

.stat-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 768px) {
  .stat-strip .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Section base ---------- */

.section {
  padding-block: 96px;
}

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

/* ---------- Capabilities bento ---------- */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.bento-cell {
  position: relative;
  background: var(--surface);
  padding: 40px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.bento-cell.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.6s var(--ease);
}

.bento-cell.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.1) 0%, rgba(10, 12, 14, 0.92) 88%);
}

.bento-cell.has-image:hover img {
  transform: scale(1.04);
}

.bento-cell.tinted {
  background: linear-gradient(155deg, var(--surface-3) 0%, var(--surface) 70%);
  border-top: 2px solid var(--accent);
}

.bento-cell > * {
  position: relative;
  z-index: 2;
}

.bento-cell .cell-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 20px;
}

.bento-cell h3 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.bento-cell p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 42ch;
}

@media (min-width: 860px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
  }

  .bento-cell.cell-primary {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .bento-cell.cell-primary h3 {
    font-size: 1.75rem;
  }
}

/* ---------- Precision spec tiles ---------- */

.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.spec-tile {
  background: var(--surface);
  padding: 40px 36px;
}

.spec-tile .spec-value {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 16px;
}

.spec-tile h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.spec-tile p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .spec-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Sectors grid ---------- */

.sector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.sector-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.sector-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.sector-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.05) 40%, rgba(10, 12, 14, 0.9) 100%);
}

.sector-card:hover img {
  transform: scale(1.05);
}

.sector-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sector-label .cell-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: none;
}

.sector-label span {
  font-weight: 600;
  font-size: 1.05rem;
}

@media (min-width: 768px) {
  .sector-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Process timeline ---------- */

.process-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.process-step {
  padding-block: 28px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.process-step .cell-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-top: 4px;
}

.process-step h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 56ch;
}

@media (min-width: 900px) {
  .process-track {
    grid-template-columns: repeat(5, 1fr);
    border-top: none;
  }

  .process-step {
    border-bottom: none;
    border-left: 1px solid var(--border);
    padding: 0 24px 0 24px;
    grid-template-columns: 1fr;
  }

  .process-step:first-child {
    border-left: none;
    padding-left: 0;
  }
}

/* ---------- About / facility split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.split-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.split-copy .headline-lg {
  margin-bottom: 20px;
}

.split-copy .body-text {
  margin-bottom: 16px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split.reverse .split-media {
    order: 2;
  }
}

/* ---------- Contact ---------- */

.contact-section {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.contact-row .cell-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: none;
  margin-top: 2px;
}

.contact-row a,
.contact-row span {
  font-size: 1rem;
  color: var(--text);
}

.contact-row .row-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
}

.contact-panel h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-panel p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  max-width: 46ch;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
  }
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 40px;
  background: var(--surface);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 40ch;
  margin-top: 14px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 28px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.is-visible {
  animation: reveal-in 0.7s var(--ease) forwards;
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .bento-cell.has-image img,
  .sector-card img,
  .btn {
    transition: none;
  }
}
