/* ============================================================
   RoomAI — shared styles
   Dark-first premium aesthetic, heavy motion
   ============================================================ */

:root {
  --bg: #0C0C0E;
  --bg-elev-1: #121215;
  --bg-elev-2: #17171C;
  --bg-elev-3: #1E1E25;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #F5F5F7;
  --text-dim: rgba(245, 245, 247, 0.62);
  --text-faint: rgba(245, 245, 247, 0.38);
  --accent: #1D9E75;
  --accent-hi: #2BC494;
  --accent-lo: #156F52;
  --accent-glow: rgba(29, 158, 117, 0.35);
  --warm: #E8C9A0;
  --warm-dim: rgba(232, 201, 160, 0.6);
  --danger: #E26869;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --font-display: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(29, 158, 117, 0.10), transparent 60%),
    radial-gradient(800px 400px at 90% 20%, rgba(232, 201, 160, 0.04), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 920px; }

/* ============================================================
   Type
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
}
.h1 { font-size: clamp(44px, 8vw, 96px); }
.h2 { font-size: clamp(36px, 5.5vw, 64px); letter-spacing: -0.035em; line-height: 1; }
.h3 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.1; }
.h4 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; font-weight: 500; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--text-dim);
  letter-spacing: -0.01em;
}
.mono { font-family: var(--font-mono); }

.text-grad {
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-accent { color: var(--accent-hi); }
.text-warm { color: var(--warm); }

.shimmer-text {
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--text) 35%,
    var(--accent-hi) 50%,
    var(--text) 65%,
    var(--text) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 220% 0; }
  100% { background-position: -120% 0; }
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(12, 12, 14, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 28px;
  height: 28px;
  position: relative;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-lo));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), inset 0 0 0 1px rgba(255,255,255,0.18), 0 8px 24px -8px var(--accent-glow);
  overflow: hidden;
}
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-bottom: none;
  border-right: none;
}
.logo-mark::after {
  content: "";
  position: absolute;
  right: 5px; bottom: 5px;
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--text); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.25s var(--ease-out-quart), background 0.2s, color 0.2s, box-shadow 0.3s;
  position: relative;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 8px 24px -10px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hi);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 12px 32px -8px var(--accent-glow);
}
.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }

.btn-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out-quart);
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============================================================
   Badge / pill
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.pill-dot {
  display: inline-block;
  width: 18px; height: 18px;
  background: rgba(29, 158, 117, 0.15);
  border: 1px solid rgba(29, 158, 117, 0.3);
  border-radius: 999px;
  position: relative;
}
.pill-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--accent-hi);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .eyebrow { display: inline-block; margin-bottom: 16px; }
.section-header .h2 { margin-bottom: 16px; }
.section-header .lead { max-width: 640px; margin: 0 auto; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0 auto;
  max-width: 1100px;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: linear-gradient(180deg, var(--bg-elev-1), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-quart), border-color 0.3s, background 0.3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
[data-reveal-stagger].is-in > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: 420ms; }
[data-reveal-stagger].is-in > *:nth-child(8) { transition-delay: 490ms; }

/* Word-reveal for hero */
.word-reveal { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}
.word-reveal.is-in > span { transform: translateY(0); }

/* ============================================================
   Cursor (desktop only)
   ============================================================ */
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 158, 117, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity 0.4s;
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  .cursor-blob { opacity: 1; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 72px 0 40px;
  position: relative;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-col h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============================================================
   Big footer wordmark
   ============================================================ */
.footer-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(80px, 20vw, 280px);
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  user-select: none;
  margin-top: 80px;
  margin-bottom: -30px;
  pointer-events: none;
}

/* ============================================================
   Utility
   ============================================================ */
.row { display: flex; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.center { display: flex; align-items: center; justify-content: center; }
.tac { text-align: center; }
