/* ==========================================================================
   Crioscience — design tokens
   ========================================================================== */
:root {
  --bg: #04070a;
  --bg-soft: #070d11;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(45, 212, 191, 0.4);
  --text: #eef4f3;
  --text-muted: #93a6a3;

  --teal: #2dd4bf;
  --teal-bright: #5eead4;
  --cyan: #22d3ee;
  --gradient-brand: linear-gradient(120deg, var(--teal) 0%, var(--cyan) 100%);
  --glow-teal: 0 0 0 1px rgba(45, 212, 191, 0.25), 0 0 40px rgba(45, 212, 191, 0.25);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --header-h: 76px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body, h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 640px) {
  .container { padding-inline: 32px; }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -50px;
  background: var(--teal);
  color: #04211d;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-position 0.4s ease;
}

.btn-primary {
  background: var(--gradient-brand);
  background-size: 160% 160%;
  color: #052420;
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(45, 212, 191, 0.4), var(--glow-teal);
  background-position: 100% 0;
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--teal-bright);
  transform: translateY(-2px);
}

.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
/* Backdrop-filter lives on a pseudo-layer behind the header content so that
   mix-blend-mode on the logo (a normal descendant) blends against the real
   page behind the fixed header, not against the blur's own compositing group. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 7, 10, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.site-header.is-scrolled::before { background: rgba(4, 7, 10, 0.82); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.22);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }

.btn-header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}
.blob-a {
  width: 520px; height: 520px;
  top: -160px; left: -120px;
  background: radial-gradient(circle at 30% 30%, var(--teal), transparent 70%);
  animation: float-a 22s ease-in-out infinite;
}
.blob-b {
  width: 460px; height: 460px;
  bottom: -180px; right: -100px;
  background: radial-gradient(circle at 60% 40%, var(--cyan), transparent 70%);
  animation: float-b 26s ease-in-out infinite;
}
.blob-c {
  width: 380px; height: 380px;
  top: 30%; right: 15%;
  background: radial-gradient(circle, #7c6cf2, transparent 70%);
  opacity: 0.18;
  animation: float-c 30s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.1); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(0.92); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 90%);
}

.hero-inner { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  max-width: 16ch;
  margin-inline: auto;
  letter-spacing: -0.02em;
  min-height: 1.15em;
}
.hero-title::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  background: var(--teal-bright);
  vertical-align: -0.1em;
  animation: caret-blink 0.9s steps(1) infinite;
}
.hero-title.typing-done::after { animation: caret-blink 0.9s steps(1) infinite 4; }
@keyframes caret-blink { 50% { opacity: 0; } }

.hero-subtitle {
  max-width: 46ch;
  margin: 22px auto 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 64px);
  margin-top: 72px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.hero-inner .reveal { transition-delay: calc(var(--reveal-i, 0) * 0.08s); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-soft); }

.section-head { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  margin-top: 10px;
  letter-spacing: -0.01em;
}
.section-lead {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.two-col .section-head { text-align: left; margin-inline: 0; }
.two-col-reverse .section-head { order: 2; }

/* ==========================================================================
   Flow cards
   ========================================================================== */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 52px;
}

.flow-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  transform: perspective(800px) rotateX(var(--ry, 0)) rotateY(var(--rx, 0));
}
.flow-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  box-shadow: var(--glow-teal);
}
.flow-icon { font-size: 2rem; margin-bottom: 14px; }
.flow-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.flow-card p { color: var(--text-muted); font-size: 0.92rem; }

.flow-card-featured {
  grid-column: span 2;
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.1), rgba(34, 211, 238, 0.04));
  border-color: var(--border-strong);
  box-shadow: var(--glow-teal);
  padding: 34px 30px;
}
.flow-card-featured .flow-icon { font-size: 2.6rem; }
.flow-card-featured h3 { font-size: 1.4rem; }
.flow-card-featured p { color: var(--text); font-size: 1rem; max-width: 46ch; }

.badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge-live {
  background: var(--gradient-brand);
  color: #052420;
}
.badge-soon {
  background: var(--surface-strong);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.flow-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  color: var(--teal-bright);
}

.flow-footnote {
  text-align: center;
  margin-top: 36px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.flow-footnote a { color: var(--teal-bright); font-weight: 600; }

/* ==========================================================================
   Feature list (Marketing / Sites)
   ========================================================================== */
.feature-list { display: flex; flex-direction: column; gap: 26px; }
.feature-item { display: flex; gap: 18px; align-items: flex-start; }
.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-bright);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature-item p { color: var(--text-muted); font-size: 0.94rem; }

/* ==========================================================================
   CTA final
   ========================================================================== */
.cta-final-inner {
  text-align: center;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(34, 211, 238, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 8vw, 80px) clamp(20px, 6vw, 60px);
}
.cta-final-inner h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.cta-final-inner p { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }
.cta-final-inner .btn { margin-top: 30px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; transform: scale(1.22); }
.footer-name { font-family: var(--font-display); font-weight: 700; }
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); }

.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--teal-bright); }

.footer-social { display: flex; gap: 18px; }
.footer-social a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-social a:hover { color: var(--teal-bright); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #04120b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.55); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .two-col .section-head { text-align: center; }
  .two-col-reverse .section-head { order: 0; }
  .flow-card-featured { grid-column: span 2; }
}

@media (max-width: 640px) {
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    background: rgba(4, 7, 10, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }

  .btn-header-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .flow-grid { grid-template-columns: 1fr; }
  .flow-card-featured { grid-column: span 1; }

  .whatsapp-fab { width: 50px; height: 50px; bottom: 16px; right: 16px; }
  .footer-bottom p { padding-right: 60px; }
}
