/* ============================================================================
   SpaceSnug — a product of Osicion
   Design system: dark, liquid-glass, brand green #8FE36F, Jost + JetBrains Mono.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-2: #06070a;
  --surface: #101315;
  --surface-2: #0b0d0f;
  --ink: #f2f5f2;
  --muted: #888e8a;
  --faint: #565c58;
  --accent: #8fe36f;
  --accent-dim: #3c9b4c;
  --accent-text: #0a0d08;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.17);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.07);
  --accent-soft: rgba(143, 227, 111, 0.14);
  --shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
h1, h2, h3, p { overflow-wrap: break-word; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

::selection { background: rgba(143, 227, 111, 0.28); color: #fff; }

a { color: var(--accent); text-decoration: none; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- Ambient background: fixed liquid-glass orbs ------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(143, 227, 111, 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 12%, rgba(52, 116, 214, 0.10), transparent 62%),
    var(--bg);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.orb.a { width: 520px; height: 520px; top: -120px; right: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(143, 227, 111, 0.55), transparent 70%); }
.orb.b { width: 460px; height: 460px; top: 40vh; left: -140px;
  background: radial-gradient(circle at 50% 50%, rgba(52, 116, 214, 0.45), transparent 70%); }
.orb.c { width: 620px; height: 620px; bottom: -10vh; right: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(143, 227, 111, 0.30), transparent 70%); }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layout helpers ----------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); opacity: 0.6; }

/* ---- Glass primitives ---------------------------------------------------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--hairline);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow);
  position: relative;
  overflow: hidden;
}
.glass::after { /* specular sheen — soft falloff, no hard edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09) 0%, transparent 58%);
  mix-blend-mode: screen; opacity: 0.55;
}

/* ---- Navbar (liquid glass pill) ----------------------------------------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100; width: calc(100% - 32px); max-width: var(--maxw);
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px 11px 20px; border-radius: 22px;
  background: rgba(10, 11, 12, 0.55);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--hairline);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.scrolled { background: rgba(8, 9, 10, 0.78); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.nav .links { display: flex; gap: 26px; align-items: center; }
.nav .links a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
.nav .links a:hover { color: var(--ink); }
.nav .cta { padding: 9px 16px; border-radius: 13px; font-size: 13.5px; font-weight: 600; }
section[id] { scroll-margin-top: 96px; }

/* ---- Logo lockup -------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { width: 26px; height: 26px; }
.logo .word { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.logo .word em { font-weight: 300; font-style: italic; color: var(--accent); }

/* ---- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: none; font-family: inherit; font-weight: 600; transition: transform 0.25s var(--ease), filter 0.25s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-text);
  padding: 14px 24px; border-radius: 15px; font-size: 15px;
  box-shadow: 0 12px 34px rgba(143, 227, 111, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: var(--glass-2); color: var(--ink); padding: 14px 22px; border-radius: 15px;
  font-size: 15px; border: 1px solid var(--hairline);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding-top: 168px; padding-bottom: 90px; text-align: center; }
.hero h1 {
  font-size: clamp(33px, 8.6vw, 108px); font-weight: 700; line-height: 0.98;
  letter-spacing: -0.035em; margin: 22px 0 0;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), #d8ffc4 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; font-weight: 300;
}
.hero p.sub {
  font-size: clamp(17px, 2.2vw, 22px); color: var(--muted); max-width: 640px;
  margin: 26px auto 0; line-height: 1.55;
}
.hero .actions { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.hero .note { margin-top: 20px; font-size: 13px; color: var(--faint); }

/* Hero fit-visual: a cube gliding through an aperture */
.stage { margin: 66px auto 0; max-width: 900px; padding: 26px; }
.fitscene { position: relative; height: 340px; display: flex; align-items: center; justify-content: center; }
.doorframe { position: absolute; width: 190px; height: 270px; border-radius: 14px;
  border: 2px solid var(--hairline-strong);
  box-shadow: inset 0 0 0 1px rgba(143, 227, 111, 0.10);
  background: linear-gradient(180deg, rgba(143, 227, 111, 0.05), transparent); }
.doorframe .measure { position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.1em; color: var(--accent); white-space: nowrap; }
.cube { width: 118px; height: 118px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(143, 227, 111, 0.9), rgba(60, 155, 76, 0.85));
  box-shadow: 0 24px 60px rgba(143, 227, 111, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  animation: glide 5.5s var(--ease) infinite; }
@keyframes glide {
  0% { transform: translateX(-330px) rotate(-8deg); opacity: 0; }
  22% { opacity: 1; }
  50% { transform: translateX(0) rotate(0deg); opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateX(330px) rotate(8deg); opacity: 0; }
}
.checkbadge { position: absolute; right: 30px; bottom: 30px; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; background: var(--accent-soft);
  border: 1px solid rgba(143, 227, 111, 0.28); color: var(--accent);
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.08em; }

/* ---- Marquee ------------------------------------------------------------ */
.marquee { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  padding: 20px 0; overflow: hidden; margin-top: 90px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee .track { display: flex; gap: 46px; width: max-content; animation: scrollx 28s linear infinite; }
.marquee span { font-family: "JetBrains Mono", monospace; font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 46px; }
.marquee span::after { content: "✦"; color: var(--accent); }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---- Section heads ------------------------------------------------------ */
.sec { padding-top: 110px; padding-bottom: 110px; }
.sec-head { max-width: 720px; }
.sec-head h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; margin-top: 16px; }
.sec-head p { color: var(--muted); font-size: 18px; margin-top: 18px; line-height: 1.6; }

/* ---- Feature grid ------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 56px; }
.feature { padding: 30px; }
.feature .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(143, 227, 111, 0.22); margin-bottom: 20px; }
.feature .ic svg { width: 24px; height: 24px; stroke: var(--accent); }
.feature h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.feature p { color: var(--muted); margin-top: 10px; font-size: 15.5px; line-height: 1.6; }
.feature.wide { grid-column: span 2; }

/* ---- Sticky steps (scroll choreography) --------------------------------- */
.steps-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; margin-top: 40px; }
.steps-sticky { position: sticky; top: 120px; height: min(70vh, 560px); }
.steps-visual { width: 100%; height: 100%; padding: 30px; display: grid; place-items: center; }
.steps-list { display: flex; flex-direction: column; gap: 20px; }
.step { padding: 26px 28px; border-radius: 22px; border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02); transition: all 0.5s var(--ease); opacity: 0.4; }
.step.active { opacity: 1; background: var(--glass); border-color: rgba(143, 227, 111, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); }
.step .num { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { font-size: 23px; font-weight: 600; margin-top: 8px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 15.5px; line-height: 1.6; }
.step .sic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid rgba(143, 227, 111, 0.2); color: var(--accent);
  font-size: 20px; margin-bottom: 14px; }

/* ---- Privacy highlight -------------------------------------------------- */
.privacy-card { margin-top: 56px; padding: 54px; text-align: center; }
.privacy-card .lock { width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 22px;
  display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(143, 227, 111, 0.24); }
.privacy-card .lock svg { width: 30px; height: 30px; stroke: var(--accent); }
.privacy-card h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 600; letter-spacing: -0.02em; }
.privacy-card p { color: var(--muted); max-width: 560px; margin: 16px auto 0; font-size: 17px; line-height: 1.6; }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { text-align: center; padding-top: 96px; padding-bottom: 40px; }
.cta-band h2 { font-size: clamp(34px, 6vw, 66px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.cta-band h2 em { font-weight: 300; font-style: italic; color: var(--accent); }
.cta-band p { color: var(--muted); margin: 20px auto 0; max-width: 520px; font-size: 18px; }
.cta-band .actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ------------------------------------------------------------- */
footer { border-top: 1px solid var(--hairline); margin-top: 90px; padding: 64px 0 46px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand .word { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.foot-brand .word em { font-weight: 300; font-style: italic; color: var(--accent); }
.foot-brand .by { margin-top: 10px; color: var(--faint); font-size: 14px; }
.foot-brand .by b { color: var(--muted); font-weight: 500; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 10px; transition: color 0.2s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }

/* ---- Reveal on scroll --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---- Legal (sub)pages --------------------------------------------------- */
.legal { padding-top: 150px; padding-bottom: 40px; max-width: 780px; }
.legal .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.legal .back:hover { color: var(--ink); }
.legal h1 { font-size: clamp(38px, 7vw, 60px); font-weight: 700; letter-spacing: -0.03em; }
.legal .chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 13px;
  border-radius: 11px; background: var(--accent-soft); border: 1px solid rgba(143, 227, 111, 0.2);
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.06em; color: #c9ccc6; }
.legal .chip b { color: var(--accent); font-weight: 500; }
.legal .sections { margin-top: 34px; }
.legal .s { padding: 22px 0; border-top: 1px solid var(--hairline); }
.legal .s:first-child { border-top: none; }
.legal .s .h { display: flex; gap: 12px; align-items: baseline; }
.legal .s .n { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--accent); }
.legal .s h2 { font-size: 19px; font-weight: 600; }
.legal .s p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 8px; white-space: pre-line; }

/* ---- Use cases ---------------------------------------------------------- */
.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; align-items: stretch; }
.usecase { padding: 28px; }
.usecase .k { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.usecase h3 { font-size: 19px; font-weight: 600; margin-top: 12px; letter-spacing: -0.01em; }
.usecase p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-top: 8px; }

/* ---- Step visual (rings + icon) ----------------------------------------- */
.steps-visual { position: relative; }
.sv-icon { font-size: 104px; color: var(--accent); position: relative; z-index: 1;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); }
.steps-visual .ring { position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(143, 227, 111, 0.16); }
.steps-visual .ring.one { width: 220px; height: 220px; box-shadow: inset 0 0 80px rgba(143, 227, 111, 0.12); }
.steps-visual .ring.two { width: 320px; height: 320px; border-color: rgba(143, 227, 111, 0.07); }

/* ---- Principles strip --------------------------------------------------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.trust .cell { padding: 30px; border-radius: 24px; border: 1px solid var(--hairline);
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.trust .cell i { font-size: 26px; color: var(--accent); }
.trust .cell h4 { font-size: 17px; font-weight: 600; margin-top: 14px; }
.trust .cell p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 7px; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq details { border: 1px solid var(--hairline); border-radius: 18px; background: rgba(255, 255, 255, 0.02);
  overflow: hidden; transition: background 0.3s, border-color 0.3s; }
.faq details[open] { background: var(--glass); border-color: rgba(143, 227, 111, 0.22); }
.faq summary { list-style: none; cursor: pointer; padding: 21px 24px; font-size: 16.5px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; font-weight: 300; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 15px; line-height: 1.7; padding: 0 24px 22px; margin: 0; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .usecases, .trust { grid-template-columns: 1fr; }
  .hero { padding-top: 132px; padding-bottom: 68px; }
  .sec { padding-top: 76px; padding-bottom: 76px; }
  .cta-band { padding-top: 76px; }
  .nav .links { display: none; }
  .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: span 1; }
  .steps-wrap { grid-template-columns: 1fr; }
  .steps-sticky { position: relative; top: 0; height: 300px; order: -1; }
  .foot-grid { flex-direction: column; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .nav { width: calc(100% - 24px); padding: 10px 10px 10px 16px; }
  .feature, .usecase, .trust .cell { padding: 24px; }
  .privacy-card { padding: 34px 24px; }
  .faq summary { padding: 18px 20px; font-size: 15.5px; }
  .faq details p { padding: 0 20px 20px; }
  .step { padding: 22px 22px; }
  .hero .sub { font-size: 16.5px; }
  .hero .actions, .cta-band .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .btn, .cta-band .actions .btn { justify-content: center; width: 100%; }
  .stage { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
