/*
 * The alicit.ai landing page. Light and cool, after the 1password.com design
 * system, with liquid-metal wisps (wisps.js) and the interactive session
 * (session.css, session.js).
 */

:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #1a285f;
  --ink-soft: #4a5680;
  --ink-faint: #636d8e;
  --accent: #0364d3;
  --accent-soft: #85beff;
  --line: rgba(26, 40, 95, 0.08);
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter var", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Cool haze behind everything */
body::before {
  content: "";
  position: fixed; inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(40vmax 30vmax at 15% 10%, rgba(133, 190, 255, 0.22), transparent 70%),
    radial-gradient(35vmax 28vmax at 90% 30%, rgba(200, 210, 235, 0.35), transparent 70%),
    radial-gradient(45vmax 35vmax at 50% 100%, rgba(133, 190, 255, 0.14), transparent 70%);
}

a { color: inherit; }

/* Animated underline, after 1password.com */
.ul {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) right 100% / 0 1.4px no-repeat;
  transition: background-size 300ms var(--ease);
}
.ul:hover, .ul:focus-visible { background-size: 100% 1.4px; background-position: left 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav-bar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  background: rgba(246, 248, 251, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.3rem; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav-bar ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; color: var(--ink-soft); }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font: 550 1rem/1 var(--font); text-decoration: none;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}
.cta:hover { transform: translateY(-2px); }
.cta-primary {
  color: #fff;
  background: linear-gradient(180deg, #0c6ad6, var(--accent));
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 10px 30px -10px rgba(3, 100, 211, 0.6);
}
.cta-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 16px 40px -12px rgba(3, 100, 211, 0.7); }
.nav-bar .cta { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 18vh 0 20vh; text-align: center; isolation: isolate; }
.hero h1 {
  margin: 0 auto;
  max-width: 11ch;
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.sheen {
  background: linear-gradient(100deg, #1a285f 0%, #1a285f 44%, #3d5596 48%, #8ea2cc 50%, #3d5596 52%, #1a285f 56%, #1a285f 100%);
  background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 9s var(--ease) infinite;
}
@keyframes sheen { 0%, 20% { background-position: 100% 0; } 60%, 100% { background-position: 0% 0; } }
.hero .lede {
  max-width: 38rem; margin: 36px auto 40px;
  font-size: 1.25rem; line-height: 1.55; color: var(--ink-soft);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 30px; padding: 6px 14px 6px 8px;
  font-size: 0.85rem; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(12px);
}
.eyebrow b { padding: 3px 9px; border-radius: 999px; color: var(--accent); background: rgba(133, 190, 255, 0.22); font-weight: 600; font-size: 0.75rem; }

/* A quiet invitation to scroll down to the session. */
.try {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-weight: 550; color: var(--ink-soft); text-decoration: none;
}
.try svg {
  width: 22px; height: 22px;
  stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 300ms var(--ease);
}
.try:hover svg { transform: translateY(4px); }

/* ---------- Liquid metal ---------- */
/* wisps.js draws the ribbons into these fields. */
.wisps { position: absolute; inset: 0; z-index: -1; overflow: clip; }
.wisps canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.droplet {
  position: absolute; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background:
    radial-gradient(circle at 32% 28%, #fff 0 8%, transparent 22%),
    radial-gradient(circle at 70% 78%, rgba(133,190,255,0.55), transparent 45%),
    radial-gradient(circle at 50% 50%, #e7ecf5 0%, #b9c3d8 45%, #7a86a3 75%, #d9e0ec 100%);
  box-shadow: inset -6px -10px 18px rgba(26,40,95,0.25), inset 6px 8px 14px rgba(255,255,255,0.8), 0 18px 40px -16px rgba(26,40,95,0.35);
  animation: bob 7s ease-in-out infinite alternate;
  touch-action: manipulation;
}
/* A larger invisible target, so a fingertip finds even the small drops. */
.droplet::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; }
.droplet.splash { animation: splash 700ms cubic-bezier(0.3, 1.6, 0.5, 1); }
.d1 { width: 64px; height: 64px; top: 22%; left: 12%; }
.d2 { width: 26px; height: 26px; top: 66%; right: 14%; animation-delay: -3s; }
.d3 { width: 14px; height: 14px; top: 30%; right: 22%; animation-delay: -5s; }
.d4 { width: 40px; height: 40px; top: 20%; right: 18%; }
@keyframes bob { to { transform: translateY(-14px) scale(1.03, 0.98); } }
@keyframes splash {
  0% { transform: scale(1); }
  18% { transform: scale(1.28, 0.72); }
  42% { transform: scale(0.86, 1.16); }
  70% { transform: scale(1.06, 0.95); }
  100% { transform: scale(1); }
}

/* ---------- Sections ---------- */
section { position: relative; padding: 120px 0; isolation: isolate; }
.kicker { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
h2 {
  margin: 14px 0 20px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1; font-weight: 700; letter-spacing: -0.035em;
  max-width: 16ch;
}
.sub { max-width: 36rem; font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

.rule { position: relative; height: 140px; margin: -70px 0; }

/* Flow */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; counter-reset: step; }
.panel {
  position: relative; padding: 36px 32px 40px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 30px 60px -40px rgba(26,40,95,0.35);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  overflow: hidden;
}
/* A chrome hairline along the top edge of each panel */
.panel::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, #c9d2e4 20%, #fff 50%, #9aa7c4 80%, transparent);
}
.flow .panel { counter-increment: step; }
.flow .panel h3 { padding-right: 36px; }
.flow .panel::after {
  content: "0" counter(step);
  position: absolute; top: 28px; right: 30px;
  font: 500 0.85rem/1 var(--mono); color: var(--ink-faint);
}
.panel h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.2; }
.panel h3 svg { flex: none; width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.panel p { margin: 0; color: var(--ink-soft); }

/* Principles */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 64px; }

/* Closing */
.close { text-align: center; padding: 160px 0 180px; }
.close h2 { margin-inline: auto; max-width: 14ch; font-size: clamp(3rem, 8vw, 6rem); }
.close .sub { margin: 0 auto 44px; }

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.9rem; color: var(--ink-faint); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-bar ul { display: none; }
  .flow, .grid { grid-template-columns: 1fr; }
  .hero { padding: 12vh 0 14vh; }
  /* Keep the drops clear of the headline and the lede on a phone. */
  .d1 { width: 30px; height: 30px; top: 3%; left: 7%; }
  .d2 { width: 20px; height: 20px; top: auto; bottom: 5%; right: 10%; }
  .d3 { width: 12px; height: 12px; top: 12%; right: 14%; }
  section { padding: 90px 0; }
}

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