/* ============================================================
   Erosium — Public Homepage (V2 amber/gold glow direction)
   Locked build plan: EROSIUM_PUBLIC_HOMEPAGE_K3_BUILD_PLAN_V1_2026-07-23.md
   Static, responsive, accessible. No external runtime dependencies.
   ============================================================ */

:root {
  --bg: #080705;
  --bg-soft: #11100c;
  --surface: rgba(24, 20, 12, 0.72);
  --surface-strong: #17130b;
  --text: #f7f2e8;
  --muted: #bcb3a3;
  --amber: #f5a623;
  --gold: #ffc85a;
  --copper: #b96b20;
  --border: rgba(255, 190, 73, 0.24);
  --glow: rgba(245, 166, 35, 0.28);
  --content-max: 1180px;
  --pad-inline: clamp(1.25rem, 4vw, 3rem);
  --font-stack: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; }

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

a { color: var(--gold); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 1rem; }

/* ---------- Decorative background ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--bg-soft) 0%, var(--bg) 55%);
  pointer-events: none;
}

/* Founder-approved backdrop image (bg-amber-horizon.webp, ~104 KB).
   Sits at the bottom of the .bg stack; all CSS glow layers float above it.
   The .bg wrapper is position:fixed, so the image behaves as a fixed
   full-viewport cover without background-attachment mobile jank. */
.bg-image {
  position: absolute;
  inset: 0;
  background: url('bg-amber-horizon.webp') center / cover no-repeat;
}

/* Contrast guard: keeps the centre dark enough that every line of text
   stays perfectly readable over the image, and dims the bright horizon
   band at the bottom. Text contrast is non-negotiable. */
.bg-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 64% at 50% 40%, rgba(8, 7, 5, 0.66) 0%, rgba(8, 7, 5, 0.34) 52%, rgba(8, 7, 5, 0.12) 76%, transparent 100%),
    linear-gradient(to bottom, rgba(8, 7, 5, 0.42) 0%, rgba(8, 7, 5, 0.16) 26%, rgba(8, 7, 5, 0.20) 62%, rgba(8, 7, 5, 0.55) 100%);
}

.bg-bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  will-change: opacity;
}
.bg-bloom--hero {
  top: -28%;
  left: 50%;
  width: min(110vw, 1400px);
  aspect-ratio: 1 / 0.62;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245, 166, 35, 0.20) 0%, rgba(185, 107, 32, 0.10) 42%, transparent 72%);
  animation: bloom-pulse 9s ease-in-out infinite;
}
.bg-bloom--left {
  top: 34%;
  left: -18%;
  width: 55vw;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(245, 166, 35, 0.10) 0%, transparent 70%);
  animation: bloom-pulse 12s ease-in-out infinite reverse;
}
.bg-bloom--right {
  top: 42%;
  right: -20%;
  width: 60vw;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 200, 90, 0.09) 0%, transparent 70%);
  animation: bloom-pulse 14s ease-in-out infinite;
}

@keyframes bloom-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* The approved image already carries a circuit-grid floor, so the CSS
   grid is softened to a faint additive shimmer to avoid double-patterning. */
.bg-grid {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -14%;
  height: 62%;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 190, 73, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 190, 73, 0.085) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(720px) rotateX(61deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 78%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 78%);
}

.bg-horizon {
  position: absolute;
  left: 0;
  bottom: 4%;
  width: 100%;
  height: 220px;
  opacity: 0.3;
}

.particles { position: absolute; inset: 0; }

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px 1px rgba(255, 200, 90, 0.75);
  opacity: 0.55;
  animation-name: particle-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes particle-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(3vw, -110vh, 0); }
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="160" height="160" filter="url(%23n)" opacity="0.55"/></svg>');
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 38%, transparent 42%, rgba(0, 0, 0, 0.52) 100%),
    linear-gradient(to bottom, rgba(8, 7, 5, 0.35) 0%, transparent 18%, transparent 70%, rgba(8, 7, 5, 0.75) 100%);
}

/* ---------- Header / brand ---------- */

.site-header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 1.6rem var(--pad-inline) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--gold);
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 7px;
  filter: drop-shadow(0 0 8px rgba(245, 166, 35, 0.55));
  flex: none;
}

.brand-word {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 18px rgba(245, 166, 35, 0.35);
  padding-left: 0.42em; /* optically re-centres letter-spaced word */
}

/* ---------- Main layout ---------- */

main {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

section { padding-block: clamp(3rem, 7vw, 5.5rem); }

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

.hero {
  text-align: center;
  padding-top: clamp(3.5rem, 9vh, 6.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.eyebrow, .section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--amber);
  text-shadow: 0 0 14px rgba(245, 166, 35, 0.45);
}

.hero h1 {
  margin-top: 1.4rem;
  margin-inline: auto;
  max-width: 21ch;
  font-size: clamp(2.1rem, 5.2vw + 0.6rem, 4.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--gold);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(180deg, #ffe1a1 0%, var(--gold) 38%, var(--amber) 68%, #d98a1e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(245, 166, 35, 0.30));
  }
}

.tagline {
  margin-top: 1.6rem;
  font-size: clamp(1.2rem, 2.1vw + 0.5rem, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 200, 90, 0.4);
}

.hero-support {
  margin: 1.4rem auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 0.6vw + 0.85rem, 1.08rem);
}

/* ---------- Products ---------- */

.section-eyebrow { text-align: center; }

.card-row {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2vw, 1.6rem);
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.4vw, 2.2rem);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: linear-gradient(158deg, rgba(32, 26, 14, 0.82) 0%, rgba(15, 12, 7, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 90, 0.12),
    inset 0 0 34px rgba(245, 166, 35, 0.05),
    0 14px 44px rgba(0, 0, 0, 0.55);
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

a.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 200, 90, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 90, 0.18),
    inset 0 0 40px rgba(245, 166, 35, 0.09),
    0 22px 60px rgba(0, 0, 0, 0.6),
    0 0 44px var(--glow);
}

a.card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
  border-color: rgba(255, 200, 90, 0.6);
  box-shadow:
    0 0 0 6px rgba(245, 166, 35, 0.18),
    0 0 44px var(--glow);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin-bottom: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 50% 35%, rgba(245, 166, 35, 0.16), rgba(245, 166, 35, 0.04) 70%);
  box-shadow: 0 0 24px rgba(245, 166, 35, 0.18), inset 0 0 14px rgba(245, 166, 35, 0.10);
  flex: none;
}

.card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.card-kicker {
  margin-top: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--amber);
}

.card-body {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.68;
}

.card-cta {
  margin-top: auto;
  padding-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 200, 90, 0.35);
}

.card-cta .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

a.card:hover .card-cta .arrow,
a.card:focus-visible .card-cta .arrow {
  transform: translateX(5px);
}

/* Rubik Resilience — COMING SOON, deliberately non-clickable */
.card--soon {
  cursor: default;
  color: inherit;
}

.badge-soon {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(255, 190, 73, 0.4);
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.12);
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 0 10px rgba(255, 200, 90, 0.4);
}

.card--soon .card-icon,
.card--soon .card-title,
.card--soon .card-kicker,
.card--soon .card-body {
  opacity: 0.82;
}

/* ---------- Difference ---------- */

.difference { text-align: center; }

.difference h2 {
  margin: 1.1rem auto 0;
  max-width: 24ch;
  font-size: clamp(1.55rem, 2.9vw + 0.5rem, 2.4rem);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.difference-body {
  margin: 1.3rem auto 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 0.6vw + 0.85rem, 1.06rem);
}

/* ---------- Three-step approval flow ---------- */

.flow { padding-top: 0; }

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.flow-step {
  flex: 1 1 0;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: 0.4rem;
}

.flow-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 50% 32%, rgba(245, 166, 35, 0.16), rgba(15, 12, 7, 0.9) 75%);
  box-shadow:
    0 0 30px rgba(245, 166, 35, 0.22),
    inset 0 0 18px rgba(245, 166, 35, 0.12);
  flex: none;
}

.flow-title {
  margin-top: 1.15rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.flow-body {
  margin-top: 0.6rem;
  max-width: 30ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.flow-connector {
  flex: 0 1 110px;
  display: flex;
  align-items: flex-start;
  padding-top: 45px; /* aligns line with node centres (92px node / 2) */
  min-width: 42px;
}

.flow-line {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.15), var(--amber));
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

.flow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
  filter: drop-shadow(0 0 5px rgba(255, 200, 90, 0.7));
}

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

.site-footer {
  max-width: var(--content-max);
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  padding: 2.4rem var(--pad-inline) 2.8rem;
  border-top: 1px solid rgba(255, 190, 73, 0.16);
  text-align: center;
  color: var(--muted);
}

.brand-mark--footer {
  width: 22px;
  height: 22px;
  margin: 0 auto 1rem;
  color: var(--amber);
  opacity: 0.9;
}

.footer-line { margin-top: 0.35rem; font-size: 0.95rem; }
.footer-company { font-size: 0.85rem; opacity: 0.8; }

.footer-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.4rem;
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 200, 90, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-email:hover { border-bottom-color: var(--gold); }

.footer-email:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

/* ---------- Progressive-enhancement reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1099px) and (min-width: 700px) {
  .card-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 699px) {
  .card-row { grid-template-columns: 1fr; }

  .card { max-width: 560px; margin-inline: auto; width: 100%; }

  .flow-steps { flex-direction: column; align-items: center; }

  .flow-step { max-width: 340px; }

  .flow-connector {
    flex: none;
    padding-top: 0;
    padding-block: 0.9rem;
    width: 2px;
  }

  .flow-line {
    width: 2px;
    height: 44px;
    background: linear-gradient(180deg, rgba(245, 166, 35, 0.15), var(--amber));
  }

  .flow-line::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }
}

@media (max-width: 420px) {
  .brand-word { font-size: 0.92rem; letter-spacing: 0.34em; }
  .flow-node { width: 78px; height: 78px; }
  .badge-soon { top: 0.9rem; right: 0.9rem; }
}

/* ---------- Reduced motion ---------- */

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bg-bloom, .particle { animation: none !important; }

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