/* SAV Robotics — palette from coolors.co/42033d-680e4b-7c238c-854798-7c72a0 */
:root {
  --amethyst-dark: #42033d;
  --crimson-violet: #680e4b;
  --magenta-dark: #7c238c;
  --amethyst: #854798;
  --lavender: #7c72a0;

  --bg: #2d1935;
  --bg-2: #14061a;
  --ink: #f3ecf7;
  --ink-dim: #b9a9c6;
  --ink-faint: #7a6a87;
  --line: rgba(196, 160, 220, 0.14);
  --glow: #c27ae0;           /* lifted tint of Amethyst for glows/accents */
  --accent: #e3b8ff;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 200;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { /* film grain + scanlines */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
::selection { background: var(--magenta-dark); color: #fff; }

/* progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--crimson-violet), var(--glow)); box-shadow: 0 0 12px var(--glow); }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad); transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(12, 3, 16, .72); backdrop-filter: blur(14px); padding-block: 14px; border-color: var(--line); }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; letter-spacing: .02em; }
.logo em { font-style: normal; font-weight: 300; color: var(--ink-dim); margin-left: 4px; }
.logo-mark { width: 22px; height: 22px; border: 2px solid var(--glow); border-radius: 50%; position: relative; box-shadow: 0 0 14px var(--glow); }
.logo-mark::after { content: ""; position: absolute; inset: 5px; background: var(--glow); border-radius: 50%; animation: pulse 2.4s ease-in-out infinite; }
.nav-links { display: flex; gap: 36px; font-size: 14px; color: var(--ink-dim); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: var(--glow); transition: width .25s; }
.nav-links a:hover::after { width: 100%; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-primary { background: linear-gradient(135deg, var(--magenta-dark), var(--crimson-violet)); color: #fff; box-shadow: 0 0 0 1px rgba(227,184,255,.25) inset, 0 10px 40px -10px var(--magenta-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(227,184,255,.45) inset, 0 16px 50px -8px var(--amethyst); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--glow); background: rgba(124, 35, 140, .15); }
.btn-lg { padding: 18px 34px; font-size: 16px; }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--pad) 80px; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(124,35,140,.35), transparent 60%),
              radial-gradient(ellipse 60% 50% at 10% 90%, rgba(104,14,75,.45), transparent 60%), var(--bg); }
#terrain { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 1100px; }
.eyebrow { color: var(--accent); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.8s infinite; }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 8.5vw, 132px); line-height: .98; letter-spacing: -.03em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: inline-block; background: linear-gradient(180deg, #fff 30%, #d8b4ec 100%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.hero-sub { margin-top: 28px; font-size: clamp(17px, 2vw, 24px); color: var(--ink-dim); max-width: 560px; animation: fade 1s .5s both; }
.hero-actions { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; animation: fade 1s .75s both; }
.hud { position: absolute; right: var(--pad); bottom: 80px; z-index: 2; color: var(--ink-faint); display: grid; gap: 6px; text-align: right; font-size: 11px; }
.hud span { color: var(--ink-dim); }
.hud .ok { color: #9ff0c4; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2; color: var(--ink-faint); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; }
.scroll-cue span { width: 1px; height: 40px; background: linear-gradient(var(--glow), transparent); animation: drip 2s infinite; }

/* marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--bg-2); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: scroll 40s linear infinite; font-family: var(--font-display); font-size: clamp(20px, 3vw, 36px); font-weight: 300; white-space: nowrap; }
.marquee-track i { color: var(--amethyst); font-style: normal; }

/* sections */
.section { padding: clamp(90px, 14vw, 180px) var(--pad); position: relative; }
.section-label { color: var(--glow); margin-bottom: 40px; display: flex; align-items: center; gap: 14px; }
.section-label::before { content: ""; width: 32px; height: 1px; background: var(--glow); }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 5.2vw, 72px); line-height: 1.05; letter-spacing: -.02em; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: end; }
.lead { font-family: var(--font-display); font-weight: 300; font-size: clamp(22px, 2.8vw, 38px); line-height: 1.3; letter-spacing: -.01em; }
.about-side p { color: var(--ink-dim); font-size: 17px; }
.stack { list-style: none; margin-top: 32px; border-top: 1px solid var(--line); }
.stack li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-dim); display: flex; justify-content: space-between; }
.stack li::after { content: "●"; color: var(--amethyst); font-size: 8px; }

/* mission */
.mission { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--pad); overflow: hidden;
  background: linear-gradient(180deg, var(--bg), var(--amethyst-dark) 50%, var(--bg)); }
.orb { position: absolute; width: 70vmin; height: 70vmin; right: -10vmin; top: 50%; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--lavender), var(--magenta-dark) 45%, var(--crimson-violet) 70%, transparent 72%);
  filter: blur(2px); opacity: .55; animation: float 10s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; inset: -8%; border-radius: 50%; border: 1px dashed rgba(227,184,255,.3); animation: spin 60s linear infinite; }
.mission-text { position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6.4vw, 96px); line-height: 1.04; letter-spacing: -.03em; max-width: 14ch; }
.mission-text .w { display: inline-block; opacity: .14; transition: opacity .4s, color .4s, text-shadow .4s; margin-right: .22em; }
.mission-text .w.on { opacity: 1; }
.mission-text .w.hl.on { color: var(--accent); text-shadow: 0 0 40px rgba(227,184,255,.5); }

/* offerings */
.offerings .section-title { margin-bottom: 64px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { position: relative; padding: 32px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, rgba(133,71,152,.12), rgba(20,6,26,.6) 60%); transition: transform .35s, border-color .35s; --mx: 50%; --my: 50%; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx) var(--my), rgba(194,122,224,.18), transparent 50%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-6px); border-color: rgba(194,122,224,.45); }
.card:hover::before { opacity: 1; }
.card-top { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 11px; }
.card-top span:first-child { color: var(--accent); }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.2vw, 30px); margin: 8px 0 12px; letter-spacing: -.01em; }
.card p { color: var(--ink-dim); font-size: 16px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 40px; max-width: 900px; }
.team-tile { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(20,6,26,.5); }
.team-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--magenta-dark), var(--crimson-violet)); color: #fff; font-weight: 600; font-size: 16px; }
.team-name { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.2; }
.team-role { color: var(--ink-dim); font-size: 11px; margin-top: 4px; }
.section.team { padding-bottom: clamp(20px, 5vw, 64px); }
.team + .contact { padding-top: clamp(20px, 8vw, 90px); }
.specs { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin-top: 24px; }
.specs li { font-size: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-dim); }

/* card visuals — abstract, per robot type */
.card-visual { height: 170px; margin: 24px 0 20px; position: relative; border-radius: 12px; overflow: hidden;
  background: linear-gradient(rgba(196,160,220,.07) 1px, transparent 1px) 0 0/24px 24px, linear-gradient(90deg, rgba(196,160,220,.07) 1px, transparent 1px) 0 0/24px 24px; }
.card-visual span { position: absolute; display: block; }
/* delivery: floors + moving elevator car */
.v1 span:nth-child(1) { left: 0; right: 0; top: 33%; height: 1px; background: var(--line); box-shadow: 0 56px 0 var(--line); }
.v1 span:nth-child(2) { left: 46%; width: 22%; top: 10%; bottom: 10%; border: 1px solid rgba(194,122,224,.4); border-radius: 6px; }
.v1 span:nth-child(3) { left: calc(46% + 8px); width: calc(22% - 16px); height: 28px; border-radius: 6px; background: var(--magenta-dark); box-shadow: 0 0 20px var(--glow); animation: lift 4s ease-in-out infinite; }
/* mine: jagged terrain + scanning beam */
.v2 span:nth-child(1) { inset: auto 0 0 0; height: 60%; background: linear-gradient(135deg, transparent 33%, var(--crimson-violet) 33% 36%, transparent 36%) 0 0/60px 100%, linear-gradient(225deg, transparent 33%, var(--crimson-violet) 33% 36%, transparent 36%) 0 0/60px 100%; opacity: .8; }
.v2 span:nth-child(2) { top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 18px 4px var(--glow); animation: sweep 3.2s ease-in-out infinite alternate; }
.v2 span:nth-child(3) { width: 10px; height: 10px; border-radius: 50%; top: 52%; left: 70%; background: #ff9ad5; box-shadow: 0 0 0 0 rgba(255,154,213,.6); animation: ping 1.6s infinite; }
/* environment: concentric sensing rings */
.v3 span { left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 1px solid var(--glow); animation: ring 3.6s linear infinite; }
.v3 span:nth-child(2) { animation-delay: 1.2s; }
.v3 span:nth-child(3) { animation-delay: 2.4s; }
/* arm: segments */
.v4 span:nth-child(1) { left: 30%; bottom: 18%; width: 40%; height: 10px; border-radius: 6px; background: var(--amethyst); transform-origin: 8px 50%; animation: arm1 4s ease-in-out infinite; }
.v4 span:nth-child(2) { left: 24%; bottom: 10%; width: 60px; height: 14px; border-radius: 4px; background: var(--crimson-violet); }
.v4 span:nth-child(3) { right: 18%; bottom: 14%; width: 22px; height: 22px; border: 1px dashed var(--accent); }

/* build — sticky scroll */
.build { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.build-sticky { position: sticky; top: 120px; }
.build-counter { margin-top: 40px; color: var(--ink-faint); font-size: 14px; }
.build-counter span { color: var(--accent); font-size: 40px; font-family: var(--font-display); letter-spacing: 0; }
.build-list { list-style: none; }
.build-item { padding: 52px 0; border-top: 1px solid var(--line); opacity: .28; transition: opacity .5s; min-height: 38vh; }
.build-item:last-child { border-bottom: 1px solid var(--line); }
.build-item.active { opacity: 1; }
.build-idx { color: var(--glow); }
.build-item h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.12; margin: 16px 0; letter-spacing: -.02em; }
.build-item p { color: var(--ink-dim); font-size: 18px; max-width: 520px; }

/* vision */
.vision { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.vision-text { font-family: var(--font-display); font-weight: 300; font-size: clamp(24px, 3.4vw, 50px); line-height: 1.25; letter-spacing: -.015em; max-width: 1150px; }

/* philosophy */
.philosophy { padding: clamp(90px, 12vw, 160px) var(--pad); background: var(--bg-2); overflow: hidden; }
.phil-lines { margin-bottom: 64px; }
.phil-line { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 8vw, 128px); line-height: 1.02; letter-spacing: -.035em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(227,184,255,.35); transform: translateX(calc(var(--shift, 0) * 1px)); }
.phil-line.lit { color: var(--ink); -webkit-text-stroke: 0; background: linear-gradient(90deg, #fff, var(--accent) 60%, var(--lavender)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.phil-body { color: var(--ink-dim); font-size: clamp(17px, 1.6vw, 21px); max-width: 640px; margin-left: auto; }

/* contact */
.contact { position: relative; text-align: center; padding: clamp(110px, 16vw, 200px) var(--pad); overflow: hidden; }
.contact-glow { position: absolute; left: 50%; top: 50%; width: 90vmin; height: 90vmin; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(124,35,140,.55), rgba(104,14,75,.25) 40%, transparent 70%); filter: blur(30px); }
.contact > *:not(.contact-glow) { position: relative; }
.contact h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 5vw, 68px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 44px; }

.footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 11px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* keyframes */
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes float { 50% { transform: translateY(-54%) scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes lift { 0%, 100% { top: 14%; } 50% { top: calc(86% - 28px); } }
@keyframes sweep { from { left: 6%; } to { left: 94%; } }
@keyframes ping { 70% { box-shadow: 0 0 0 16px rgba(255,154,213,0); } 100% { box-shadow: 0 0 0 0 rgba(255,154,213,0); } }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(5); opacity: 0; } }
@keyframes arm1 { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(-6deg); } }

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .about-grid, .build { grid-template-columns: 1fr; }
  .build-sticky { position: static; }
  .build-counter { display: none; }
  .build-item { opacity: 1; min-height: 0; padding: 36px 0; }
  .cards { grid-template-columns: 1fr; }
  .hud { display: none; }
  .phil-line { white-space: normal; }
}
@media (max-width: 520px) {
  .nav-cta { display: none; }
  .card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
