/* ==========================================================================
   POINTER MACHINE WORKS — shared styles
   Dark industrial. Edit tokens below to retheme the whole site.
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #0b0c0e;
  --bg-raised: #111318;
  --bg-panel: #14171c;
  --line: #23262c;
  --line-strong: #32363e;
  --text: #e9e7e2;
  --text-muted: #9aa0a8;
  --text-dim: #6b7076;
  --accent: #c9a24e;          /* machined brass */
  --accent-bright: #e3bc66;
  --danger: #b8422e;

  /* Type */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --max-w: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 10px;              /* corner rounding — set to 0 for sharp */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Real machined isogrid photo, graded dark; gradient keeps text side readable */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(100deg, rgba(11,12,14,.96) 0%, rgba(11,12,14,.86) 40%, rgba(11,12,14,.62) 75%, rgba(11,12,14,.55) 100%),
    url(../assets/gen/0f40f6ff6a.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

main { position: relative; z-index: 1; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

::selection { background: var(--accent); color: #0b0c0e; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.15rem; letter-spacing: .02em; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.accent { color: var(--accent); }

/* Section label — "01 / Capabilities" */
.sec-label {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.sec-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,12,14,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand img { height: 62px; width: 62px; object-fit: contain; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1rem;
  line-height: 1.1;
}
.brand-name span { display: block; font-size: .62rem; letter-spacing: .3em; color: var(--text-dim); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: #0b0c0e !important;
  padding: 10px 20px !important;
  border-radius: var(--radius);
  border-bottom: none !important;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .15em;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--accent); color: #0b0c0e; }

.btn-solid { background: var(--accent); color: #0b0c0e; }
.btn-solid:hover { background: var(--accent-bright); color: #0b0c0e; }

.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--text); border-color: var(--text); color: #0b0c0e; }

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

.hero {
  padding: clamp(80px, 12vh, 150px) 0 clamp(60px, 9vh, 110px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
/* faint oversized gear watermark */
.hero::after {
  content: "";
  position: absolute;
  right: -12%;
  top: 50%;
  transform: translateY(-50%);
  width: 640px;
  height: 640px;
  background: radial-gradient(circle at center, rgba(201,162,78,.05), transparent 65%);
  pointer-events: none;
}

.hero h1 { max-width: 15ch; margin: 18px 0 26px; }
.hero .lede { margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-logo {
  position: absolute;
  /* anchor to the content column's right edge, not the browser edge */
  right: calc(max((100% - var(--max-w)) / 2, var(--pad)) + 40px);
  top: 44%;
  transform: translateY(-50%);
  width: clamp(280px, 30vw, 440px);
  height: auto;
  opacity: .95;
  pointer-events: none;
}
@media (max-width: 1020px) {
  /* logo becomes a centered badge above the headline instead of disappearing */
  .hero-logo {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(58vw, 260px);
    margin: 0 auto 36px;
  }
  .hero { padding-top: clamp(44px, 7vh, 80px); }
  .hero .sec-label { max-width: none !important; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
  .nav { height: 72px; }
  .brand img { height: 46px; width: 46px; }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(50px, 8vh, 90px);
}
.hero-stats > div { background: var(--bg-raised); padding: 22px 24px; }
.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}
.hero-stats span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }

/* ---------- Sections ---------- */

section { padding: clamp(64px, 9vh, 110px) 0; }
section + section { border-top: 1px solid var(--line); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- Cards ---------- */

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
/* corner tick — machinist's mark */
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: var(--radius);
}
.card .mono { margin-bottom: 14px; display: block; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: .95rem; }

/* ---------- Spec / equipment tables ---------- */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.spec-table td:first-child { font-weight: 700; white-space: nowrap; }
.spec-table td { color: var(--text-muted); }
.spec-table tr:hover td { background: rgba(255,255,255,.015); }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery figure {
  aspect-ratio: 4/3;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(11,12,14,.92));
  color: var(--text-muted);
}
.ph {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 20px;
}

/* ---------- Brands strip ---------- */

.brands { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.brand-card {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: block;
  color: var(--text);
  transition: border-color .2s;
}
.brand-card:hover { border-color: var(--accent); color: var(--text); }
.brand-card h3 { margin: 10px 0; }
.brand-card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 18px; }
.brand-card .mono { color: var(--accent); }

/* ---------- Forms ---------- */

form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 13px 15px;
  border-radius: calc(var(--radius) - 3px);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 140px; }

/* ---------- CTA band ---------- */

.cta-band {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(rgba(201,162,78,.06), transparent 70%),
    var(--bg-raised);
  text-align: center;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { color: var(--text-muted); margin-bottom: 34px; }

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

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--bg-raised);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 500;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--text-muted); font-size: .92rem; }
.site-footer a:hover { color: var(--text); }
.footer-tag { color: var(--text-muted); font-size: .92rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  padding: clamp(60px, 9vh, 100px) 0 clamp(40px, 6vh, 70px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin: 14px 0 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-2, .grid-3, .brands, .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 90px; left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 24px var(--pad);
    gap: 20px;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
}


/* ---------- Pop: brass glow ---------- */

.accent {
  background: linear-gradient(120deg, var(--accent-bright), var(--accent) 55%, #a87f2e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn:hover { box-shadow: 0 0 26px rgba(201,162,78,.32); }
.btn-solid { box-shadow: 0 0 18px rgba(201,162,78,.18); }
.btn-solid:hover { box-shadow: 0 0 32px rgba(201,162,78,.45); }
.nav-cta:hover { box-shadow: 0 0 18px rgba(201,162,78,.45); }
.card:hover {
  border-color: rgba(201,162,78,.5);
  box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 20px rgba(201,162,78,.1);
}
.brand-card:hover { box-shadow: 0 0 28px rgba(201,162,78,.14); }
.hero-stats strong { color: var(--accent-bright); }

/* ---------- Pop: hero machining scene ---------- */

.hero-logo { aspect-ratio: 800 / 794; }
.hero-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-logo-gear { animation: gearspin 60s linear infinite; }
@keyframes gearspin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .hero-logo-gear { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ---------- Small-screen polish ---------- */
@media (max-width: 700px) {
  body::before { background-position: 62% center; }
  /* extra veil so the photo never fights the text on portrait screens */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(rgba(11,12,14,.45), rgba(11,12,14,.2));
  }
  section { padding: 54px 0; }
  .hero { padding-bottom: 50px; }
  .hero-stats strong { font-size: 1.35rem; }
  .card { padding: 24px 20px; }
  .brand-card { padding: 30px 24px; }
  .spec-table-wrap, .spec-table { font-size: .85rem; }
  .spec-table th, .spec-table td { padding: 10px 12px; }
  .spec-table td:first-child { white-space: normal; }
  .footer-grid { gap: 28px; }
}

input[type="file"] { padding: 9px; color: var(--text-dim); }
input[type="file"]::file-selector-button {
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  margin-right: 14px;
  cursor: pointer;
input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--text); }
