/* Lilt Liquid Glass — floats chrome above a living atmosphere. */

:root {
  color-scheme: light;
  --bg: #d7e6f8;
  --ink: #102037;
  --muted: #5b6b82;
  --line: rgba(255, 255, 255, .55);
  --accent: #0a84ff;
  --dark: #102037;
  --panel: rgba(255, 255, 255, .38);
  --glass: rgba(255, 255, 255, .34);
  --fill: rgba(255, 255, 255, .22);
  --glass-tint: rgba(255, 255, 255, .4);
  --glass-tint-strong: rgba(255, 255, 255, .58);
  --glass-stroke: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .18) 45%, rgba(255, 255, 255, .08));
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .78), inset 0 -1px 0 rgba(16, 32, 55, .06);
  --glass-shadow: 0 18px 48px rgba(16, 32, 55, .12), 0 2px 8px rgba(16, 32, 55, .06);
  --glass-blur: 32px;
  --radius: 28px;
  --radius-sm: 18px;
  --capsule: 980px;
  --mx: 58%;
  --my: 18%;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-padding-top: 88px; }

body {
  color: var(--ink);
  background:
    radial-gradient(980px 520px at 58% 18%, rgba(70, 150, 255, .42), transparent 58%),
    radial-gradient(720px 460px at 8% 12%, rgba(120, 190, 255, .38), transparent 52%),
    radial-gradient(820px 540px at 92% 0%, rgba(40, 120, 255, .36), transparent 56%),
    radial-gradient(640px 420px at 78% 92%, rgba(150, 210, 255, .34), transparent 54%),
    linear-gradient(180deg, #e4f0fc 0%, #d2e4f8 42%, #c3daf6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: -2;
  background: url("/assets/sway-wallpaper.jpg") center / cover no-repeat;
  opacity: .22;
  filter: blur(56px) saturate(.8) brightness(1.08);
  pointer-events: none;
  transform: scale(1.08);
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 32% at 30% 20%, rgba(210, 232, 255, .4), transparent 70%),
    radial-gradient(36% 28% at 78% 30%, rgba(60, 140, 255, .28), transparent 70%),
    radial-gradient(30% 24% at 62% 78%, rgba(120, 190, 255, .22), transparent 72%);
  animation: lilt-caustic 28s var(--ease) infinite;
}

@keyframes lilt-caustic {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

html.is-grabbing-lid body::after,
html.is-grabbing-lid body::before {
  animation-play-state: paused;
}

.skip-link {
  background: var(--accent);
  color: #fff;
  border-radius: var(--capsule);
  box-shadow: var(--glass-shadow);
}

/* Shared glass material */
.site-header,
.hero-recording,
.specifications > div,
.feature-strip > div,
.automation-board,
.rule-card,
.compat-form,
.question-list details,
.notify-inner,
.language-options,
.legal {
  background:
    radial-gradient(520px 200px at var(--mx) var(--my), rgba(255, 255, 255, .42), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .22));
  background-color: var(--glass-tint);
  backdrop-filter: blur(var(--glass-blur)) saturate(185%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(185%);
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  height: 58px;
  width: min(1080px, calc(100% - 48px));
  margin: 14px auto 0;
  padding: 0 8px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--capsule);
  border-bottom: 1px solid rgba(255, 255, 255, .62);
}

.wordmark {
  font-weight: 620;
  letter-spacing: -.045em;
}

.wordmark > img,
.site-header .wordmark > img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(16, 32, 55, .16);
}

.header-note {
  color: var(--muted);
  opacity: .9;
}

.header-link {
  background: linear-gradient(180deg, #4aa3ff, var(--accent));
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--capsule);
  font-weight: 560;
  box-shadow:
    0 8px 20px rgba(10, 132, 255, .28),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .35);
}

.header-link > span {
  color: #fff;
  font-size: 13px;
}

.language-menu summary {
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: var(--capsule);
  box-shadow: var(--glass-inset);
}

.language-menu details[open] summary {
  background: rgba(255, 255, 255, .45);
  border-color: rgba(255, 255, 255, .8);
}

.language-options {
  top: calc(100% + 10px);
  min-width: 172px;
  padding: 6px;
  border-radius: 18px;
}

.language-options a {
  border-radius: 12px;
}

.language-options a[aria-current] {
  background: rgba(10, 132, 255, .12);
  color: var(--accent);
}

h1 em {
  font-family: inherit;
  font-style: italic;
  font-weight: 520;
  color: var(--ink);
  background: linear-gradient(180deg, #163152, #0a84ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero { padding-top: 48px; }

.buy-button,
.download-action .buy-button,
.hero-copy .buy-button {
  background: linear-gradient(180deg, #4aa3ff, var(--accent));
  color: #fff;
  border-radius: var(--capsule);
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 12px 28px rgba(10, 132, 255, .28),
    inset 0 1px 0 rgba(255, 255, 255, .42);
  border: 1px solid rgba(255, 255, 255, .28);
}

.buy-button > span:last-child,
.download-action .buy-button > span:last-child { color: #fff; }

.buy-button.is-unavailable {
  background: rgba(255, 255, 255, .42);
  color: var(--ink);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  border-color: rgba(255, 255, 255, .7);
}

.buy-button.is-unavailable > span:last-child { color: var(--accent); }

.price-caption { color: var(--muted); }

.hero-recording {
  border-radius: 24px;
  overflow: hidden;
}

.hero-recording::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 28%);
}

.video-toggle {
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(16, 32, 55, .38);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--glass-inset);
}

.playground {
  position: relative;
  overflow: visible;
  isolation: auto;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
}

.playground::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(244, 250, 255, .72), rgba(214, 232, 252, .86));
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}

.playground::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 22%);
}

.playground > * {
  position: relative;
  z-index: 1;
}

.demo-stage {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 244, 255, .55), rgba(176, 210, 245, .32) 72%);
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.angle-readout {
  padding: 10px 14px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: var(--glass-inset);
  color: var(--ink);
}

.angle-readout > span:last-child { color: var(--muted); }

.demo-controls,
.appearance-controls,
.studio-extras {
  background: rgba(255, 255, 255, .28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  border-top: 1px solid rgba(255, 255, 255, .38);
}

.demo-controls {
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .38);
}

.appearance-controls {
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
}

.studio-extras {
  border: 0;
  border-radius: 0;
}

.play-button {
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--capsule);
  box-shadow: var(--glass-inset);
  min-width: 108px;
}

.play-button svg { fill: currentColor; }

.reset-button {
  color: var(--muted);
  border-left: 1px solid rgba(16, 32, 55, .08);
}

input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent) 0 var(--progress), rgba(16, 32, 55, .14) var(--progress) 100%);
}

input[type=range]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(10, 132, 255, .28);
}

figcaption { color: var(--muted); }

.specifications {
  gap: 24px;
}

.specifications > div {
  padding: 22px 24px 8px;
  border-radius: 24px;
}

.specifications h2 {
  color: var(--muted);
}

.specifications dl { border-top-color: rgba(16, 32, 55, .08); }
.specifications dl > div { border-bottom-color: rgba(16, 32, 55, .08); }

.about-intro > p,
.plus-lede,
.feature-strip p,
.hero-description { color: var(--muted); }

.feature-strip {
  border-top: 0;
  gap: 18px;
}

.feature-strip > div {
  padding: 22px 22px 24px;
  border-radius: 24px;
}

.feature-number { color: var(--accent); }

.automation-board {
  border-radius: 28px;
  padding: 28px;
}

.automation-line { background: rgba(16, 32, 55, .12); }
.automation-fill { background: var(--accent); }
.automation-needle {
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(10, 132, 255, .16);
}

.rule-grid { gap: 14px; }

.rule-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, .28);
}

.rule-card.is-live {
  border-color: rgba(10, 132, 255, .45);
  box-shadow:
    inset 0 0 0 1px rgba(10, 132, 255, .16),
    0 10px 28px rgba(10, 132, 255, .12);
  background:
    radial-gradient(420px 160px at var(--mx) var(--my), rgba(10, 132, 255, .12), transparent 60%),
    rgba(255, 255, 255, .5);
}

.compat-form {
  padding: 22px;
  border-radius: 24px;
}

.compat-form select,
.notify-form input[type="email"] {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-inset);
}

.question-list {
  border-top: 0;
}

.question-list details {
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 18px;
  margin-bottom: 10px;
  padding: 0 18px;
  overflow: hidden;
}

.question-list details + details { border-top: 1px solid rgba(255, 255, 255, .62); }

details { border-bottom: 0; }

summary { padding: 18px 0; }
summary > span { color: var(--accent); }

.questions .question-list { border-top: 0; }

.notify-band {
  margin-top: 64px;
  background: transparent;
  color: #f5f8ff;
}

.notify-inner {
  gap: 36px;
  padding: 42px 40px;
  border-radius: 32px;
  background:
    radial-gradient(600px 240px at var(--mx) var(--my), rgba(90, 168, 255, .32), transparent 60%),
    linear-gradient(180deg, rgba(22, 34, 56, .46), rgba(12, 20, 36, .52));
  color: #f4f7ff;
  border: 1px solid rgba(255, 255, 255, .22);
}

.notify-band h2 { color: #fff; }
.notify-band p { color: rgba(244, 247, 255, .78); }

.notify-form input[type="email"] {
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
}

.notify-form button {
  border-radius: var(--capsule);
  background: linear-gradient(180deg, #4aa3ff, var(--accent));
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.site-footer {
  border-top: 0;
  color: var(--muted);
}

.legal {
  padding: 48px 40px 56px;
  border-radius: 32px;
  margin-top: 28px;
  margin-bottom: 28px;
}

.legal h1 { color: var(--ink); }
.legal p { color: var(--muted); }

.lid-cursor-grip {
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(16, 32, 55, .72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.is-pressed .lid-cursor-grip {
  background: var(--accent);
  color: #fff;
  border-color: #fff;
}

.lid-cursor-angle {
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(16, 32, 55, .82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.media-chip {
  background: rgba(16, 32, 55, .5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .22);
}

.privacy-lock {
  background: rgba(10, 16, 28, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@media (hover: hover) and (pointer: fine) {
  .header-link:hover { color: #fff; background: #1b8cff; }
  .play-button:hover {
    background: rgba(255, 255, 255, .72);
    color: var(--ink);
  }
  .download-action .buy-button:not(.is-unavailable):hover,
  .buy-button:not(.is-unavailable):hover { background: #1b8cff; }
  .language-options a:hover { background: rgba(10, 132, 255, .1); }
  .language-menu summary:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .5);
    border-color: rgba(255, 255, 255, .85);
  }
  summary:hover { color: var(--ink); }
  .question-list details:hover { border-color: rgba(255, 255, 255, .9); }
  .rule-card:hover { transform: translateY(-1px); }
}

@media (max-width: 1050px) {
  .site-header { width: calc(100% - 40px); }
}

@media (max-width: 760px) {
  .site-header {
    top: 8px;
    height: 52px;
    width: calc(100% - 24px);
    margin-top: 8px;
    padding: 0 6px 0 12px;
    border-radius: 22px;
  }
  .hero { padding-top: 28px; }
  .playground,
  .playground::before,
  .playground::after,
  .notify-inner,
  .legal { border-radius: 22px; }
  .notify-inner { padding: 28px 20px; }
  .legal { padding: 28px 20px 36px; }
  .specifications > div,
  .feature-strip > div,
  .compat-form { border-radius: 20px; }
}

@media (max-width: 500px) {
  .header-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .rule-card { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .hero-recording,
  .playground::after,
  .specifications > div,
  .feature-strip > div,
  .automation-board,
  .rule-card,
  .compat-form,
  .question-list details,
  .notify-inner,
  .language-options,
  .legal {
    background: #d7e6f8;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body::before { opacity: .08; }
}
