/* =========================================================================
   ONAXIS INSTRUMENTS — design system
   Engineering-drawing aesthetic. Square corners, hairlines, mono callouts.
   ========================================================================= */

:root {
  /* Colour tokens */
  --bg:        #060708;   /* base */
  --surface:   #0A0B0D;   /* raised / alt sections / cards */
  --surface-2: #101215;   /* card hover */
  --stripe-a:  #0E1013;
  --stripe-b:  #0B0C0F;
  --text:      #E8E6E1;   /* primary */
  --text-2:    #A5A199;   /* secondary */
  --muted:     #6E6A63;   /* labels */
  --accent:    #E63B2E;   /* astronomer's red */
  --accent-dk: #B92C22;
  --hair-08:   rgba(232,230,225,0.08);
  --hair-10:   rgba(232,230,225,0.10);
  --hair-12:   rgba(232,230,225,0.12);
  --hair-14:   rgba(232,230,225,0.14);
  --hair-18:   rgba(232,230,225,0.18);
  --hair-30:   rgba(232,230,225,0.30);

  --gutter: 40px;
  --nav-h: 64px;
  --maxw: 1400px;

  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

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

/* ---------- Keyframes ---------- */
@keyframes ticker    { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spikePulse{ 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes riseIn    { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slowSpin  { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* Reveal-on-scroll */
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { animation: none !important; opacity: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Typography helpers ---------- */
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.kicker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .22em;
  font-size: 13px; color: var(--accent); }
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em;
  font-size: 12px; color: var(--muted); }

h1,h2,h3 { margin: 0; text-transform: uppercase; }
h2.section-title { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800;
  font-stretch: 112%; letter-spacing: -.01em; line-height: .96; }

.lead { font-size: clamp(15px,1.4vw,17px); line-height: 1.65; color: var(--text-2);
  text-wrap: pretty; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; }
.section { padding: clamp(64px,10vw,120px) var(--gutter); }
.section--alt { background: var(--surface); border-top: 1px solid var(--hair-10); }
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--sans); font-weight: 700; letter-spacing: .08em; font-size: 14px;
  padding: 16px 30px; border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  text-transform: uppercase; line-height: 1; }
.btn--fill { background: var(--accent); color: var(--bg); }
.btn--fill:hover { background: var(--text); }
.btn--ghost { border-color: var(--hair-30); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }
.btn--red-ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--red-ghost:hover { background: var(--accent); color: var(--bg); }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); background: rgba(6,7,8,.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hair-08); }
.nav__brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--text); }
.nav__brand svg { display: block; }
.nav__name { font-weight: 800; letter-spacing: .18em; font-size: 15px; font-stretch: 110%; }
.nav__name span { color: var(--muted); font-weight: 400; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2); text-decoration: none;
  transition: color .18s ease; }
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__cart { position: relative; }
.nav__cart .count { position: absolute; top: -8px; right: -12px; min-width: 16px; height: 16px;
  background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 10px;
  display: none; align-items: center; justify-content: center; padding: 0 4px; }
.nav__cart .count.show { display: inline-flex; }
.nav__order { color: var(--bg) !important; background: var(--accent); padding: 9px 18px;
  font-weight: 600; }
.nav__order:hover { background: var(--text); }
.nav__toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column;
    align-items: flex-start; gap: 0; background: rgba(6,7,8,.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hair-12); padding: 8px 0;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s ease; }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 16px var(--gutter); font-size: 14px;
    border-top: 1px solid var(--hair-08); }
  .nav__order { width: calc(100% - 2 * var(--gutter)); margin: 12px var(--gutter);
    justify-content: center; }
}

/* page top offset so fixed nav doesn't overlap non-hero pages */
.page-top { padding-top: calc(var(--nav-h) + clamp(48px,8vw,90px)); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fig { position: absolute; top: 34%; right: 12%; transform: translate(50%,-50%);
  pointer-events: none; }
.hero__fig svg { animation: spikePulse 6s ease-in-out infinite; }
.hero__figlabel { position: absolute; top: calc(50% - 132px); left: calc(50% + 126px);
  font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .1em;
  white-space: nowrap; }
.hero__figlabel span { color: var(--muted); }
.hero__content { position: relative; padding: 0 var(--gutter) clamp(48px,7vw,64px);
  animation: riseIn 1s cubic-bezier(.16,1,.3,1) both; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero__h1 { font-size: clamp(56px, 11vw, 176px); line-height: .88; font-weight: 850;
  font-stretch: 115%; letter-spacing: -.02em; margin: 20px 0 0; }
.hero__h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.hero__row { display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 36px; gap: 32px; flex-wrap: wrap; }
.hero__row p { margin: 0; max-width: 460px; font-size: clamp(15px,1.5vw,17px); line-height: 1.6;
  color: var(--text-2); text-wrap: pretty; }
.hero__ctas { display: flex; gap: 14px; flex-shrink: 0; flex-wrap: wrap; }
@media (max-width: 640px){ .hero__fig { top: 22%; right: 50%; transform: translate(50%,-50%) scale(.62); opacity: .8; } .hero__figlabel{ display:none; } }

/* ---------- Ticker ---------- */
.ticker { border-top: 1px solid var(--hair-10); border-bottom: 1px solid var(--hair-10);
  overflow: hidden; padding: 14px 0; background: var(--surface); }
.ticker__row { display: flex; width: max-content; animation: ticker 34s linear infinite;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.ticker__row:hover { animation-play-state: paused; }
.ticker__item { display: flex; align-items: center; gap: 28px; padding-right: 28px;
  white-space: nowrap; text-transform: uppercase; }
.ticker__item span { color: var(--accent); }

/* ---------- Product / component grid ---------- */
.grid-hair { display: grid; gap: 1px; background: var(--hair-12); border: 1px solid var(--hair-12); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px){ .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){ .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); padding: 30px; display: flex; flex-direction: column;
  gap: 22px; min-height: 480px; text-decoration: none; color: var(--text);
  transition: background .2s ease; }
.card:hover { background: var(--surface-2); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.card__meta .code { color: var(--accent); }
.card__meta .mat { color: var(--muted); }
.card__img { flex: 1; position: relative; min-height: 240px; overflow: hidden;
  border: 1px solid var(--hair-14);
  background: repeating-linear-gradient(-45deg,var(--stripe-a) 0,var(--stripe-a) 10px,var(--stripe-b) 10px,var(--stripe-b) 20px); }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.9) contrast(1.04); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.card:hover .card__img img { transform: scale(1.04); }
.card__note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-align: center; }
.card h3 { font-size: 24px; font-weight: 700; font-stretch: 108%; margin-bottom: 10px; }
.card__desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.card__foot { display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--hair-10); padding-top: 18px; margin-top: auto; }
.card__price { font-family: var(--mono); font-size: 13px; color: var(--text); }
.card__cta { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--accent);
  text-transform: uppercase; }
.card:hover .card__cta { color: var(--text); }

/* ---------- Two-col feature ---------- */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px,5vw,64px);
  align-items: center; }
@media (max-width: 900px){ .feature { grid-template-columns: 1fr; } }
.feature__media { position: relative; }
.feature__media img { width: 100%; filter: saturate(.7) contrast(1.08); }
.feature__media .inset { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--hair-18); }
.chip { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  background: rgba(6,7,8,.7); padding: 8px 12px; text-transform: uppercase; }
.chip--tl { top: 18px; left: 18px; color: var(--text); }
.chip--br { bottom: 18px; right: 18px; color: var(--accent); }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hair-12);
  border: 1px solid var(--hair-12); margin: 28px 0; }
.spec-grid > div { background: var(--surface); padding: 18px 20px; }
.spec-grid .l { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted);
  margin-bottom: 6px; text-transform: uppercase; }
.spec-grid .v { font-size: 20px; font-weight: 700; }

/* ---------- Videos ---------- */
.video-main { position: relative; border: 1px solid var(--hair-14); background: var(--bg); }
.video-main iframe { display: block; width: 100%; aspect-ratio: 16/9; height: auto; border: 0; }
.video-main .bar { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-top: 1px solid var(--hair-10); }
.video-main .bar b { font-weight: 700; font-size: 15px; text-transform: uppercase; }
.video-list { display: flex; flex-direction: column; gap: 20px; }
.video-card { flex: 1; display: flex; align-items: center; gap: 16px; text-decoration: none;
  color: var(--text); border: 1px solid var(--hair-14); background: var(--bg); padding: 14px;
  transition: border-color .18s ease; }
.video-card:hover { border-color: var(--accent); }
.video-card .thumb { position: relative; width: 148px; flex-shrink: 0; }
.video-card .thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: saturate(.85); }
.video-card .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.video-card .play i { width: 0; height: 0; border-left: 14px solid var(--accent);
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  filter: drop-shadow(0 0 6px rgba(6,7,8,.8)); }
.video-card b { display: block; font-weight: 700; font-size: 15px; text-transform: uppercase; margin-bottom: 6px; }
.video-card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.videos-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 900px){ .videos-layout { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; }
@media (max-width: 900px){ .process-grid { grid-template-columns: 1fr; gap: 32px; } }
.process-step { border-top: 2px solid var(--accent); padding-top: 24px; }
.process-step .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .14em; margin-bottom: 14px; }
.process-step h3 { font-size: 26px; font-weight: 700; font-stretch: 108%; margin-bottom: 12px; }
.process-step p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }

/* ---------- CTA / footer band ---------- */
.cta-band { padding: clamp(80px,12vw,140px) var(--gutter) 60px; text-align: center;
  position: relative; overflow: hidden; }
.cta-band__logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-55%);
  opacity: .06; animation: slowSpin 90s linear infinite; }
.cta-band__inner { position: relative; }
.cta-band h2 { font-size: clamp(48px,8vw,120px); line-height: .92; font-weight: 850; font-stretch: 115%; margin: 24px 0 32px; }

/* ---------- Footer ---------- */
.foot { position: relative; padding: 40px var(--gutter); border-top: 1px solid var(--hair-10);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted);
  text-transform: uppercase; }
.foot a { color: inherit; text-decoration: none; transition: color .18s ease; }
.foot a:hover { color: var(--text); }
.foot__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot__col { display: flex; flex-direction: column; gap: 10px; }
.foot__col b { color: var(--text-2); font-weight: 500; }
.foot__legal { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- Product detail page ---------- */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px,4vw,56px); align-items: start; }
@media (max-width: 900px){ .pdp { grid-template-columns: 1fr; } }
.gallery__main { position: relative; border: 1px solid var(--hair-14); overflow: hidden;
  background: var(--surface); aspect-ratio: 4/3; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumbs button { width: 78px; height: 60px; border: 1px solid var(--hair-14); padding: 0;
  background: var(--surface); cursor: pointer; overflow: hidden; }
.gallery__thumbs button.active { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp__info h1 { font-size: clamp(32px,4.4vw,52px); font-weight: 800; font-stretch: 110%; line-height: .98; }
.pdp__price { font-family: var(--mono); font-size: 22px; color: var(--text); margin: 16px 0 6px; }
.opt { margin: 22px 0; }
.opt__label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 10px; display: flex; justify-content: space-between; }
.opt__choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding: 11px 16px;
  border: 1px solid var(--hair-18); background: transparent; color: var(--text-2); cursor: pointer;
  text-transform: uppercase; transition: .15s ease; }
.choice:hover { border-color: var(--text-2); color: var(--text); }
.choice[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(230,59,46,.08); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--hair-18); }
.qty button { background: none; border: 0; color: var(--text); width: 42px; height: 44px; font-size: 18px; cursor: pointer; }
.qty input { width: 46px; height: 44px; text-align: center; background: none; border: 0;
  border-left: 1px solid var(--hair-18); border-right: 1px solid var(--hair-18); color: var(--text);
  font-family: var(--mono); font-size: 14px; }
.pdp__buy { display: flex; gap: 12px; align-items: stretch; margin-top: 24px; flex-wrap: wrap; }
.pdp__desc { margin-top: 40px; border-top: 1px solid var(--hair-12); padding-top: 28px; }
.pdp__desc h3 { font-size: 18px; letter-spacing: .04em; margin-bottom: 14px; }
.pdp__desc p, .pdp__desc li { color: var(--text-2); line-height: 1.7; font-size: 15px; }
.pdp__desc ul { padding-left: 18px; }
.pdp__desc a { color: var(--accent); text-decoration: none; }
.pdp__desc a:hover { color: var(--text); }
.note { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em;
  border-left: 2px solid var(--accent); padding: 4px 0 4px 12px; margin: 18px 0; text-transform: none; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px,4vw,48px); align-items: start; }
@media (max-width: 900px){ .cart-layout { grid-template-columns: 1fr; } }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; padding: 20px 0;
  border-bottom: 1px solid var(--hair-12); align-items: center; }
.cart-line img { width: 92px; height: 78px; object-fit: cover; border: 1px solid var(--hair-14); }
.cart-line .t { font-weight: 700; text-transform: uppercase; font-size: 15px; }
.cart-line .v { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-top: 6px; text-transform: uppercase; }
.cart-line .remove { font-family: var(--mono); font-size: 11px; color: var(--muted); background: none; border: 0; cursor: pointer; margin-top: 8px; letter-spacing: .08em; }
.cart-line .remove:hover { color: var(--accent); }
.cart-line .price { font-family: var(--mono); font-size: 14px; }
.summary { border: 1px solid var(--hair-14); background: var(--surface); padding: 28px; position: sticky; top: calc(var(--nav-h) + 20px); }
.summary .row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px;
  color: var(--text-2); padding: 10px 0; letter-spacing: .06em; }
.summary .row.total { color: var(--text); font-size: 16px; border-top: 1px solid var(--hair-12); margin-top: 8px; padding-top: 16px; }
.empty-state { text-align: center; padding: clamp(48px,10vw,110px) 0; }
.empty-state .mono { color: var(--muted); font-size: 12px; margin-bottom: 20px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.field input, .field textarea, .field select { width: 100%; background: var(--surface);
  border: 1px solid var(--hair-18); color: var(--text); padding: 13px 14px; font-family: var(--sans);
  font-size: 15px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--accent); color: var(--text);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding: 14px 20px; z-index: 400;
  opacity: 0; pointer-events: none; transition: .25s ease; text-transform: uppercase; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */
.breadcrumb { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(34px,5vw,56px); font-weight: 800; font-stretch: 110%; margin-bottom: 24px; }
.prose h2 { font-size: 22px; margin: 32px 0 12px; text-transform: none; letter-spacing: 0; }
.prose p, .prose li { color: var(--text-2); line-height: 1.75; font-size: 16px; }
.prose a { color: var(--accent); text-decoration: none; }
.badge { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--accent); border: 1px solid var(--accent); padding: 6px 12px; text-transform: uppercase; }
