/* ─── HephaTech main · light + dark themes ───────────────────────── */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #1E1E1E; color: #FAF5F1;
  padding: 10px 14px; border-radius: 8px; font-size: 13px; z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Spam honeypot — visually hidden, screen-reader hidden, never tabbable */
.hp-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}
:focus-visible { outline: 2px solid #FF620B; outline-offset: 3px; border-radius: 4px; }

:root {
  /* Light (default) */
  --bg: #FAF5F1;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: rgba(30, 30, 30, 0.03);
  --ink: #1E1E1E;
  --ink-soft: #3a3a3a;
  --gray: #8D8D8D;
  --gray-strong: #5a5a5a;
  --orange: #FF620B;
  --orange-hover: #ff7529;
  --line: rgba(30, 30, 30, 0.10);
  --line-strong: rgba(30, 30, 30, 0.18);
  --line-soft: rgba(30, 30, 30, 0.06);
  --shadow-card: 0 12px 32px rgba(30, 30, 30, 0.06);
  --shadow-card-hover: 0 24px 56px rgba(30, 30, 30, 0.10);
  --glow-1: rgba(255, 98, 11, 0.25);
  --glow-2: rgba(133, 62, 244, 0.12);
}

[data-theme="dark"] {
  --bg: #0F0F0F;
  --bg-elev: #181818;
  --bg-card: #1A1A1A;
  --bg-soft: rgba(255, 255, 255, 0.03);
  --ink: #F5F5F5;
  --ink-soft: #d4d4d4;
  --gray: #909090;
  --gray-strong: #b4b4b4;
  --orange: #FF7A2E;
  --orange-hover: #ff8e4a;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.06);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 24px 56px rgba(0, 0, 0, 0.6);
  --glow-1: rgba(255, 122, 46, 0.20);
  --glow-2: rgba(199, 163, 255, 0.12);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.55;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; }

/* ─── Scroll progress ───────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--orange) 0%, #ff8a3a 100%);
  z-index: 1000;
  pointer-events: none;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px var(--glow-1);
}

/* ─── Custom scrollbar — matches top progress bar ───────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--orange) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--orange);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--orange-hover); background-clip: padding-box; }

/* ─── Reveal animations ─────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--stagger, 0ms);
}
[data-reveal-stagger].is-visible > * { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal].is-visible,
  [data-reveal-stagger] > *, [data-reveal-stagger].is-visible > * {
    opacity: 1; transform: none; transition: none;
  }
  .scroll-progress, .status-dot, body { transition: none !important; }
  .ambient .glow { animation: none !important; }
}

/* ─── Focus ─────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Layout ────────────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ─── Ambient glow ──────────────────────────────────────────────── */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}
.glow-1 {
  width: 520px; height: 520px;
  background: var(--glow-1);
  top: -160px; right: -120px;
  animation: drift1 22s ease-in-out infinite;
}
.glow-2 {
  width: 460px; height: 460px;
  background: var(--glow-2);
  bottom: -160px; left: -180px;
  animation: drift2 28s ease-in-out infinite;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px, 40px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, -60px); } }

/* ─── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-dot {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--orange);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 60%, transparent); }
  100% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--orange) 0%, transparent); }
}
.brand-name { font-size: 17px; }
.primary-nav { display: flex; gap: 28px; }
.primary-nav a {
  color: var(--gray);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  position: relative;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.primary-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--ink); background: var(--bg-soft); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.header-cta {
  background: var(--orange);
  color: #fff;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.header-cta:hover { background: var(--orange-hover); transform: translateY(-1px); color: #fff; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, box-shadow 0.3s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow-1); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn svg { width: 14px; height: 14px; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover svg { transform: translateX(3px); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 112px 0 96px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  border-radius: 100px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 var(--orange);
  animation: pulse 2.4s ease-out infinite;
}
.hero-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  max-width: 900px;
}
.hero-title em { font-style: italic; color: var(--orange); }
.hero-sub {
  font-size: 19px;
  color: var(--gray-strong);
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 720px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-stat { display: flex; flex-direction: column; gap: 6px; }
.hero-stat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--orange);
  line-height: 1;
  font-style: italic;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Section shell ─────────────────────────────────────────────── */
section { position: relative; z-index: 1; }
.products, .about, .newsletter, .contact-strip { padding: 96px 0; }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.section-title em { font-style: italic; color: var(--orange); }
.section-lede { font-size: 17px; color: var(--gray-strong); max-width: 600px; }

/* ─── Products grid ─────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 28px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.4s;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat, var(--orange));
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cat, var(--orange)) 50%, transparent);
  box-shadow: var(--shadow-card-hover);
}
.product-card.pc-growbit { --cat: #F5F5F5; }
.product-card.pc-statusloop { --cat: #7C3AED; }
.product-card.pc-works { --cat: #FF620B; }
.product-card.pc-stealth {
  --cat: var(--ink);
  cursor: default;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-card) 0 14px,
    color-mix(in srgb, var(--ink) 4%, var(--bg-card)) 14px 15px
  );
  border-style: dashed;
}
.product-card.pc-stealth:hover { transform: none; box-shadow: var(--shadow-card); border-color: var(--line); }
.product-mark--stealth {
  background: var(--bg-soft);
  border-style: dashed;
  position: relative;
}
.stealth-glyph {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px dashed var(--gray);
}
.stealth-glyph::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: stealth-pulse 2s ease-in-out infinite;
}
@keyframes stealth-pulse { 0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.85); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .stealth-glyph::after { animation: none; } }
.product-link--muted {
  color: var(--gray) !important;
  font-style: italic;
}

[data-theme="dark"] .product-card.pc-growbit { --cat: #ffffff; }

/* Pillar icons */
.pillar-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  margin-bottom: 18px;
}
.pillar-icon svg { width: 22px; height: 22px; }
.pillar-num { display: inline-block; }

/* Latest from the studio strip */
.studio-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  background: var(--bg-soft);
}
.studio-strip-head { margin-bottom: 24px; }
.studio-strip-head h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 6px;
}
.studio-strip-list {
  list-style: none;
  display: grid;
  gap: 16px;
  border-left: 2px solid var(--line);
  padding-left: 24px;
}
.studio-strip-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: baseline;
  position: relative;
}
.studio-strip-list li::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}
.studio-strip-list li:last-child::before { background: var(--bg); border: 2px dashed var(--orange); }
.studio-when {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  text-transform: uppercase;
}
.studio-what {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}
.studio-what strong { font-weight: 600; }
@media (max-width: 720px) {
  .studio-strip-list li { grid-template-columns: 1fr; gap: 4px; }
}

.product-mark {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.product-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}
.product-card h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.product-desc {
  font-size: 15px;
  color: var(--gray-strong);
  line-height: 1.6;
}
.product-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.product-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.product-points li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cat, var(--orange));
  flex-shrink: 0;
  margin-top: 8px;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cat, var(--orange));
  margin-top: auto;
  transition: gap 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pc-growbit .product-link { color: var(--ink); }
.product-card:hover .product-link { gap: 10px; }

/* ─── About / pillars ───────────────────────────────────────────── */
.about { border-top: 1px solid var(--line); }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.pillar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.pillar-num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--orange);
  font-size: 22px;
}
.pillar h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.pillar p { font-size: 15px; color: var(--gray-strong); line-height: 1.65; }

/* ─── Newsletter ────────────────────────────────────────────────── */
.newsletter { border-top: 1px solid var(--line); }
.newsletter-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 48px;
  display: grid;
  gap: 28px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.newsletter-card .section-eyebrow { display: inline-block; }
.newsletter-card h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.newsletter-card p { color: var(--gray-strong); font-size: 16px; max-width: 460px; margin: 0 auto; }
.newsletter-card form {
  display: flex;
  align-items: center;
  max-width: 460px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
  gap: 8px;
  transition: border-color 0.2s;
}
.newsletter-card form:focus-within { border-color: var(--orange); }
.newsletter-card input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 0;
}
.newsletter-card input::placeholder { color: var(--gray); }
.newsletter-card button {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 10px 18px 10px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.newsletter-card button:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--glow-1);
}
.newsletter-card button:disabled { opacity: 0.6; cursor: wait; }
.newsletter-card button svg { width: 14px; height: 14px; }

.form-note {
  font-size: 13px;
  color: var(--gray);
  min-height: 18px;
  text-align: center;
}
.form-note.ok { color: var(--orange); }
.form-note.err { color: #c53d0b; }

/* ─── Contact strip ─────────────────────────────────────────────── */
.contact-strip { border-top: 1px solid var(--line); }
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.contact-row h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(24px, 3.5vw, 36px);
  letter-spacing: -0.01em;
  max-width: 540px;
  line-height: 1.15;
  margin-top: 8px;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 28px;
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 6px;
}
.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--orange); }
.footer-brand .brand { font-size: 17px; }
.footer-line {
  color: var(--gray-strong);
  font-size: 13px;
  max-width: 280px;
  line-height: 1.6;
  margin-top: 4px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--gray);
}
.footer-bottom a { color: var(--gray); text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }

/* ─── Back to top ───────────────────────────────────────────────── */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
  pointer-events: none;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--orange); color: #fff; }
.to-top svg { width: 18px; height: 18px; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .container { padding: 0 22px; }
  .primary-nav { display: none; }
  .hero { padding: 72px 0 64px; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
  .products, .about, .newsletter, .contact-strip { padding: 64px 0; }
  .newsletter-card { padding: 40px 24px; }
  .newsletter-card form { flex-direction: column; align-items: stretch; padding: 0; border-bottom: none; }
  .newsletter-card input { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 100px; padding: 14px 18px; }
  .newsletter-card form:focus-within { border-color: transparent; }
  .newsletter-card button { width: 100%; justify-content: center; padding: 14px; }
  .contact-row { flex-direction: column; align-items: flex-start; }
  .contact-row .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .hero-stat { flex-direction: row; align-items: baseline; gap: 12px; }
  .header-cta { display: none; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 48px; }
  .product-card { padding: 26px 22px; }
  .pillar h3 { font-size: 22px; }
}

/* ─── Legal pages (privacy + terms) ─────────────────────────────── */
.legal-content { padding: 56px 0 96px; }
.legal-content .legal-container { max-width: 780px; margin: 0 auto; }
.legal-content h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.legal-content h1 em { font-style: italic; color: var(--orange); }
.legal-meta {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.legal-content h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
}
.legal-content h3 { font-size: 17px; font-weight: 600; margin-top: 28px; margin-bottom: 12px; }
.legal-content p { color: var(--gray-strong); font-size: 15px; line-height: 1.75; margin-bottom: 16px; }
.legal-content ul, .legal-content ol {
  color: var(--gray-strong); font-size: 15px; line-height: 1.75;
  margin-bottom: 16px; padding-left: 22px;
}
.legal-content li { margin-bottom: 6px; }
.legal-content li strong, .legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content em { font-style: italic; color: var(--ink); }
.legal-content a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-color: rgba(255, 98, 11, 0.3);
  text-underline-offset: 2px;
}
.legal-content a:hover { text-decoration-color: var(--orange); }
.legal-content hr { border: none; height: 1px; background: var(--line); margin: 36px 0; }
.legal-content .placeholder {
  display: inline-block;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  border: 1px dashed var(--orange);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}
.legal-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.legal-content th, .legal-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.legal-content th { color: var(--ink); font-weight: 600; background: var(--bg-soft); }
.legal-content td { color: var(--gray-strong); }

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  margin-top: 16px;
}
.legal-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 8px;
}
.legal-toc-side h4 {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 14px;
}
.legal-toc-side ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.legal-toc-side ol li { margin: 0; }
.legal-toc-side ol a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}
.legal-toc-side ol a:hover { color: var(--ink); padding-left: 20px; }
.legal-toc-side ol a.is-active {
  color: var(--orange);
  border-left-color: var(--orange);
  font-weight: 500;
}
.legal-body { min-width: 0; }
.legal-body h2 { scroll-margin-top: 100px; }

@media (max-width: 880px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .legal-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 32px;
    padding: 22px 26px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .legal-toc-side ol { border-left: none; columns: 2; column-gap: 20px; }
  .legal-toc-side ol a { padding: 4px 0; border-left: none; }
  .legal-toc-side ol a:hover { padding-left: 0; }
  .legal-toc-side ol a.is-active { border-left: none; padding-left: 0; }
}
