/* ============================================
   PHENX PRODUCTS — Design System
   ============================================ */

:root {
  /* Brand */
  --phenx-red: #DC1F26;
  --phenx-red-deep: #B0151B;
  --phenx-red-soft: rgba(220, 31, 38, 0.08);

  /* Neutrals — clean greys, no black */
  --ink: #1F2227;        /* primary text — soft charcoal, not black */
  --ink-2: #2D3036;      /* dark sections — charcoal, never pure black */
  --ink-3: #3F434A;      /* mid-charcoal for cards on dark */
  --steel: #5C616A;      /* secondary text */
  --steel-2: #8A8E94;    /* tertiary text */
  --line: #E2E4E8;       /* borders on light */
  --line-2: #EEF0F3;     /* subtle dividers */
  --paper: #FFFFFF;      /* primary background — clean white */
  --paper-2: #F4F5F7;    /* alt background — light grey */
  --paper-3: #E9EBEE;    /* light grey panels */
  --white: #FFFFFF;

  /* Type */
  --sans: "Josefin Sans", "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--phenx-red);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.h-display {
  font-size: clamp(48px, 7.2vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h-1 {
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h-2 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
}
.h-3 {
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
}
.lede {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--steel);
  max-width: 56ch;
  text-wrap: pretty;
}
.body { color: var(--steel); }

/* ===== Layout ===== */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(80px, 10vw, 140px) 0; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo img { height: 38px; }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
}
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
}
.nav-links a {
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
  position: relative;
  padding: 8px 2px;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--phenx-red); }
.nav-links a.active { color: var(--phenx-red); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--phenx-red);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  font-family: inherit;
  background: none;
}
.btn-primary {
  background: var(--phenx-red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--phenx-red-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(245, 242, 236, 0.4);
}
.btn-ghost-light:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform .18s ease;
}
.btn:hover .arrow { transform: translateX(3px); }
.btn-sm { padding: 10px 16px; font-size: 13px; }

/* ===== Inline link ===== */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: all .18s ease;
}
.link:hover { color: var(--phenx-red); border-color: var(--phenx-red); }
.link .arrow { width: 12px; height: 12px; transition: transform .18s ease; }
.link:hover .arrow { transform: translateX(3px); }

/* ===== Image placeholder ===== */
.placeholder {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  color: var(--paper);
  border-radius: 2px;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(245, 242, 236, 0.045) 0 2px,
      transparent 2px 14px
    );
  pointer-events: none;
}
.placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(220, 31, 38, 0.05), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, 0.03), transparent 70%);
  pointer-events: none;
}
.placeholder .ph-meta {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.7);
  z-index: 2;
}
.placeholder .ph-meta .ph-id { color: rgba(245, 242, 236, 0.4); }
.placeholder .ph-corner {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
}
.placeholder.light {
  background: #1A1C20;
}
.placeholder .center-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.55);
  text-align: center;
  padding: 24px;
  z-index: 2;
}
.placeholder.tone-a { background: #15171B; }
.placeholder.tone-b { background: #1E2025; }
.placeholder.tone-c { background: #22252A; }

/* ===== Footer ===== */
.footer {
  background: var(--ink-2);
  color: var(--paper);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(245, 242, 236, 0.12);
}
.footer-brand img { height: 38px; margin-bottom: 24px; }
.footer-brand p {
  color: rgba(245, 242, 236, 0.6);
  font-size: 14px;
  line-height: 1.6;
  max-width: 36ch;
  margin: 0;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
  font-weight: 500;
  margin: 0 0 18px 0;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: rgba(245, 242, 236, 0.85);
  font-size: 14px;
  transition: color .15s ease;
}
.footer ul a:hover { color: var(--phenx-red); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.4);
}
.footer-bottom .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(245, 242, 236, 0.18);
  border-radius: 2px;
  color: rgba(245, 242, 236, 0.85);
}
.footer-bottom .pill .dot {
  width: 6px; height: 6px;
  background: #5DD39E;
  border-radius: 50%;
}

/* ===== Generic utilities ===== */
.muted { color: var(--steel); }
.spec-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.spec-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.tag.dark {
  background: var(--ink-2);
  color: var(--paper);
  border-color: var(--ink-3);
}
.tag .dot {
  width: 6px; height: 6px;
  background: var(--phenx-red);
  border-radius: 50%;
}

/* Mobile */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================================
   BLACK THEME (Firestorm / hard-tech) — global dark override
   Remaps the light design-system tokens to a pure-black palette
   with white + red emphasis and Helvetica. The homepage carries
   its own token overrides, so this only affects the sub-pages.
   ============================================================ */
:root {
  --ink: #F5F5F4;        /* primary text — near-white */
  --ink-2: #0E0F12;      /* dark panels / sections */
  --ink-3: #16181C;      /* raised dark cards */
  --steel: #9CA1A8;      /* secondary text */
  --steel-2: #6A6F78;    /* tertiary text */
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.06);
  --paper: #08090A;      /* page background */
  --paper-2: #0E0F12;    /* alt background */
  --paper-3: #16181C;    /* panel background */
  --white: #F5F5F4;      /* light foreground */
  --phenx-red: #E5232C;
  --phenx-red-deep: #B0151B;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body { background: var(--paper); color: var(--ink); }
.divider { background: var(--line); }

/* Nav → black glass */
.nav { background: rgba(8,9,10,0.82); border-bottom: 1px solid var(--line); }
.nav-links a { color: var(--steel); }
.nav-links a:hover, .nav-links a.active { color: var(--phenx-red); }

/* Buttons / links that referenced --paper as a *foreground* */
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: #08090A; border-color: var(--ink); }
.btn-ghost-light { color: var(--ink); border-color: var(--line); }
.btn-ghost-light:hover { background: var(--ink); color: #08090A; border-color: var(--ink); }
.link { color: var(--ink); border-bottom-color: var(--line); }
.link:hover { color: var(--phenx-red); border-color: var(--phenx-red); }

/* Tags / chips that used white card backgrounds */
.tag { background: var(--ink-3); color: var(--ink); border-color: var(--line); }
.tag.dark { background: var(--ink-2); color: var(--ink); border-color: var(--line); }
.spec-value { color: var(--ink); }

/* Footer → pure black (keeps its own light rgba text) */
.footer { background: #050507; color: var(--ink); }

/* Placeholder graphics already assume a dark fill — keep light text */
.placeholder { color: var(--ink); }

/* Typewriter caret (shared) */
.tw-caret {
  display: inline-block;
  width: 3px;
  height: 0.86em;
  margin-left: 0.06em;
  background: var(--phenx-red);
  vertical-align: -0.04em;
  animation: twBlink 0.85s steps(1) infinite;
}
@keyframes twBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw-caret { display: none; } }
