/*
 * Aether — the landing.
 *
 * Colours come from palette.css only: nothing below spells a hex out. A
 * component that takes a hue reads --accent / --accent-soft / --accent-ink,
 * which the .hue-* classes point at one colour of the rainbow.
 */

/* ── Reset and base ──────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

code,
pre {
  font-family: "Ubuntu Mono", ui-monospace, monospace;
}

code {
  padding: 0.08em 0.4em;
  border-radius: 6px;
  font-size: 0.95em;
  background: var(--accent-soft, var(--primary-soft));
  color: var(--accent-ink, var(--primary));
}

::selection {
  background: var(--c-lavender);
  color: var(--text);
}

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

.nowrap {
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.container--narrow {
  max-width: 820px;
}

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

/* ── Hues ────────────────────────────────────────────────────────────────── */

.hue-rose       { --accent: var(--c-rose);       --accent-soft: var(--c-rose-soft);       --accent-ink: var(--c-rose-ink); --accent-on: var(--c-rose-on); }
.hue-peach      { --accent: var(--c-peach);      --accent-soft: var(--c-peach-soft);      --accent-ink: var(--c-peach-ink); --accent-on: var(--c-peach-on); }
.hue-lemon      { --accent: var(--c-lemon);      --accent-soft: var(--c-lemon-soft);      --accent-ink: var(--c-lemon-ink); --accent-on: var(--c-lemon-on); }
.hue-mint       { --accent: var(--c-mint);       --accent-soft: var(--c-mint-soft);       --accent-ink: var(--c-mint-ink); --accent-on: var(--c-mint-on); }
.hue-sky        { --accent: var(--c-sky);        --accent-soft: var(--c-sky-soft);        --accent-ink: var(--c-sky-ink); --accent-on: var(--c-sky-on); }
.hue-periwinkle { --accent: var(--c-periwinkle); --accent-soft: var(--c-periwinkle-soft); --accent-ink: var(--c-periwinkle-ink); --accent-on: var(--c-periwinkle-on); }
.hue-lavender   { --accent: var(--c-lavender);   --accent-soft: var(--c-lavender-soft);   --accent-ink: var(--c-lavender-ink); --accent-on: var(--c-lavender-on); }

.text-rainbow {
  background: var(--gradient-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s ease-in-out infinite alternate;
}

@keyframes shimmer {
  to { background-position: 100% 0; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8em 1.35em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), box-shadow 0.25s ease,
              background-color 0.25s ease, border-color 0.25s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  color: var(--primary-ink);
  background: var(--gradient-primary);
  box-shadow: 0 10px 30px -10px var(--primary-glow);
}

/* A light sweeps across a primary button on hover. */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn--primary:hover {
  box-shadow: 0 16px 40px -10px var(--primary-glow);
  transform: translateY(-2px);
}

.btn--primary:hover::after {
  transform: translateX(120%);
}

/* A primary button in the whole rainbow — the Max plan's. Pastels stay light
   in both themes, so the text is dark in both. */
.btn--rainbow {
  color: #17122b;
  background: var(--gradient-rainbow);
  /* Pro's glow, split across the rainbow the fill runs through. The four
     overlap, so each is a quarter as strong as Pro's one. */
  box-shadow:
    -40px 10px 30px -10px color-mix(in srgb, var(--c-rose) 8%, transparent),
    -13px 10px 30px -10px color-mix(in srgb, var(--c-lemon) 8%, transparent),
    13px 10px 30px -10px color-mix(in srgb, var(--c-sky) 8%, transparent),
    40px 10px 30px -10px color-mix(in srgb, var(--c-lavender) 8%, transparent);
}

.btn--rainbow:hover {
  box-shadow:
    -40px 16px 40px -10px color-mix(in srgb, var(--c-rose) 8%, transparent),
    -13px 16px 40px -10px color-mix(in srgb, var(--c-lemon) 8%, transparent),
    13px 16px 40px -10px color-mix(in srgb, var(--c-sky) 8%, transparent),
    40px 16px 40px -10px color-mix(in srgb, var(--c-lavender) 8%, transparent);
}

.btn--ghost {
  color: var(--text);
  background: var(--surface-glass);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1em 1.7em;
  font-size: 1.05rem;
}

.btn--sm {
  padding: 0.55em 1em;
  font-size: 0.92rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-glass);
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ── Scroll progress ─────────────────────────────────────────────────────── */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--gradient-rainbow);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: var(--surface-glass);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand__logo {
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
}

.brand:hover .brand__logo {
  transform: rotate(-20deg) scale(1.08);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a:not(.btn) {
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  /* The same flowing rainbow as The Evolve, running from page load so every
     underline and the header's The Evolve move in step. */
  background: linear-gradient(90deg,
    var(--c-rose), var(--c-peach), var(--c-lemon), var(--c-mint),
    var(--c-sky), var(--c-periwinkle), var(--c-lavender), var(--c-rose));
  background-size: 200% 100%;
  animation: rainbow-flow 6s linear infinite;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav a:not(.btn):hover,
.nav a.is-current {
  color: var(--text);
}

.nav a:not(.btn):hover::after,
.nav a.is-current::after {
  transform: scaleX(1);
}

.nav__cta {
  display: none;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.theme-toggle .icon--moon,
:root[data-resolved-theme="dark"] .theme-toggle .icon--sun {
  display: none;
}

:root[data-resolved-theme="dark"] .theme-toggle .icon--moon {
  display: block;
}

.theme-toggle .icon {
  animation: spin-in 0.5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes spin-in {
  from { transform: rotate(-90deg) scale(0.4); opacity: 0; }
}

.menu-toggle {
  display: none;
}

.menu-toggle .icon--close,
.header.is-open .menu-toggle .icon--menu {
  display: none;
}

.header.is-open .menu-toggle .icon--close {
  display: block;
}

@media (max-width: 960px) {
  .menu-toggle {
    display: inline-grid;
  }

  .header__tools {
    margin-left: auto;
  }

  .nav {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2, .8, .2, 1);
  }

  .header.is-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav a:not(.btn) {
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .nav a:not(.btn)::after {
    display: none;
  }

  .nav a:not(.btn):hover {
    background: var(--surface-2);
  }

  .nav__cta {
    display: inline-flex;
    margin-top: 8px;
  }
}

@media (max-width: 520px) {
  .header__cta {
    display: none;
  }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(112px, 16vw, 150px);
  overflow: hidden;
}

.blobs {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  filter: blur(70px);
  animation: drift 22s ease-in-out infinite alternate;
}

.blob--rose     { background: var(--blob-rose);     top: -18%; left: -12%; }
.blob--sky      { background: var(--blob-sky);      top: -10%; right: -14%; animation-delay: -6s; }
.blob--mint     { background: var(--blob-mint);     top: 40%;  left: 25%;   animation-delay: -12s; width: 32vmax; height: 32vmax; }
.blob--lavender { background: var(--blob-lavender); top: 20%;  right: 10%;  animation-delay: -3s; width: 36vmax; height: 36vmax; }
.blob--lemon    { background: var(--blob-lemon);    top: 60%;  left: -10%;  animation-delay: -9s; width: 28vmax; height: 28vmax; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.1); }
  100% { transform: translate(-4vw, 8vh) scale(0.95); }
}

.hero__inner {
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 980px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pill .icon {
  width: 1em;
  height: 1em;
  transition: transform 0.2s ease;
}

.pill:hover .icon {
  transform: translateX(3px);
}

.pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient-rainbow);
  box-shadow: 0 0 0 0 var(--primary-glow);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 var(--primary-glow); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  letter-spacing: -0.035em;
}

.hero__lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__trust .icon {
  width: 1.1em;
  height: 1.1em;
  color: var(--success);
}

@media (max-width: 520px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* The phone. */

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(330px, 86vw);
  height: 600px;
  padding: 10px;
  border-radius: 46px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 8px var(--surface-glass);
  transform-style: preserve-3d;
}

.phone__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 90px;
  height: 24px;
  border-radius: 20px;
  background: var(--text);
  opacity: 0.9;
  transform: translateX(-50%);
  z-index: 2;
}

.phone__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 50px 14px 12px;
  border-radius: 36px 36px 0 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.phone__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.phone__status {
  font-size: 0.75rem;
  color: var(--success);
}

.phone__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 700;
  color: var(--c-rose-on);
  background: var(--c-rose);
}

.phone__chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 12px;
  background: var(--chat-bg);
  overflow: hidden;
}

.phone__input {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px 8px 8px 16px;
  border-radius: 0 0 36px 36px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.phone__typed {
  font-family: "Ubuntu Mono", monospace;
  font-size: 0.95rem;
  color: var(--text);
}

.phone__send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  color: var(--primary-ink);
  background: var(--gradient-primary);
}

.phone__send .icon {
  width: 16px;
  height: 16px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary);
  vertical-align: text-bottom;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

/* Chat bubbles, used by the phone and the Actions demo. */

.msg,
.bubble {
  position: relative;
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  overflow-wrap: anywhere;
}

.msg {
  animation: msg-in 0.45s cubic-bezier(.2, .9, .3, 1.2) both;
}

.msg--in {
  align-self: flex-start;
  background: var(--bubble-in);
  border-bottom-left-radius: 6px;
}

.msg--out,
.bubble--out {
  align-self: flex-end;
  background: var(--bubble-out);
  border-bottom-right-radius: 6px;
}

.bubble--mono {
  font-family: "Ubuntu Mono", monospace;
  font-size: 1rem;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(12px) scale(0.92); }
}

.msg__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-faint);
}

.msg__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-ink);
  animation: msg-in 0.4s ease both;
}

.msg.is-deleted .msg__text {
  text-decoration: line-through;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.msg__old {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-decoration: line-through;
}

.msg .mention {
  color: var(--primary);
  font-weight: 500;
}

/* Floating stat cards around the phone. */

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.float-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.float-card small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.float-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.float-card--a {
  top: 18%;
  left: -2%;
}

.float-card--b {
  bottom: 14%;
  right: -2%;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@media (max-width: 1100px) {
  .float-card--a { left: 0; }
  .float-card--b { right: 0; }
}

@media (max-width: 520px) {
  .float-card {
    padding: 9px 12px;
  }

  .float-card--a { top: -18px; left: -4px; }
  .float-card--b { bottom: -18px; right: -4px; }

  .phone {
    height: 540px;
  }
}

/* The marquee. */

.marquee {
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 18px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 6px)); }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 128px);
}

.section--alt {
  background: var(--bg-alt);
}

.section__head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-soft, var(--primary-soft));
  color: var(--accent-ink, var(--primary));
}

.section__title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  letter-spacing: -0.03em;
}

.section__lead {
  margin-top: 16px;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  color: var(--text-muted);
}

.section__head .section__lead {
  margin-inline: auto;
  max-width: 600px;
}

/* ── Cursor glow (JS sets --mx/--my) ─────────────────────────────────────── */

.glow {
  position: relative;
  isolation: isolate;
}

.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent, var(--primary)) 35%, transparent),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.glow:hover::before {
  opacity: 1;
}

.tilt {
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

/* ── Feature flagships ───────────────────────────────────────────────────── */

.flagships {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .flagships {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flag-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: default;
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* The big faded icon in the corner. */
.flag-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.18;
  filter: blur(40px);
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1), opacity 0.4s ease;
  z-index: -1;
}

.flag-card:hover,
.flag-card:focus-within,
.flag-card.is-open {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: var(--shadow-lg);
}

.flag-card:hover::after,
.flag-card.is-open::after {
  transform: scale(1.8);
  opacity: 0.28;
}

.flag-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flag-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-on);
  box-shadow: 0 10px 24px -10px var(--accent);
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1.4);
}

.flag-card__icon .icon {
  width: 26px;
  height: 26px;
}

.flag-card:hover .flag-card__icon,
.flag-card.is-open .flag-card__icon {
  transform: rotate(-8deg) scale(1.08);
}

.flag-card__tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-ink);
  white-space: nowrap;
}

.flag-card__title {
  margin-top: 26px;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

.flag-card__text {
  margin-top: 10px;
  color: var(--text-muted);
}

/* The drawer: a frosted panel that slides up over the description. */
.flag-card__more {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 1;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent-soft) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(calc(100% + 24px));
  transition: transform 0.55s cubic-bezier(.2, .8, .2, 1), opacity 0.35s ease;
}

.flag-card__more > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flag-card:hover .flag-card__more,
.flag-card:focus-within .flag-card__more,
.flag-card.is-open .flag-card__more {
  opacity: 1;
  transform: none;
}

.flag-card__more li {
  position: relative;
  padding: 5px 0 5px 30px;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flag-card:hover .flag-card__more li,
.flag-card:focus-within .flag-card__more li,
.flag-card.is-open .flag-card__more li {
  opacity: 1;
  transform: none;
}

.flag-card__more li:nth-child(2) { transition-delay: 0.06s; }
.flag-card__more li:nth-child(3) { transition-delay: 0.12s; }
.flag-card__more li:nth-child(4) { transition-delay: 0.18s; }

.flag-card__more li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
}

.flag-card__more li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 11px;
  width: 4px;
  height: 8px;
  border: solid var(--accent-on);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.flag-card__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-ink);
  transition: opacity 0.3s ease;
}

.flag-card__hint::after {
  content: "↑";
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  50% { transform: translateY(-3px); }
}

.flag-card:hover .flag-card__hint,
.flag-card:focus-within .flag-card__hint,
.flag-card.is-open .flag-card__hint {
  opacity: 0;
}

/* ── Mini cards ──────────────────────────────────────────────────────────── */

.minis {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.mini-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.mini-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.mini-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1.5), background-color 0.3s ease;
}

.mini-card:hover .mini-card__icon {
  transform: translateY(-3px) rotate(8deg);
  background: var(--accent);
  color: var(--accent-on);
}

.mini-card h4 {
  margin-top: 16px;
  font-size: 1.1rem;
}

.mini-card p {
  margin-top: 6px;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* On a phone the small cards are a row you swipe through. */
@media (max-width: 560px) {
  .minis {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    padding: 4px 16px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .minis::-webkit-scrollbar {
    display: none;
  }

  .mini-card {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }
}

/* ── AI teaser ───────────────────────────────────────────────────────────── */

.ai-soon {
  padding-bottom: clamp(72px, 10vw, 128px);
}

.ai-soon__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border-radius: 36px;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--primary-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}

/* A rainbow border that slowly turns. */
.ai-soon__card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--c-rose), var(--c-peach), var(--c-lemon), var(--c-mint),
    var(--c-sky), var(--c-periwinkle), var(--c-lavender), var(--c-rose)
  );
  animation: turn 8s linear infinite;
}

.ai-soon__card::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: 34px;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--primary-soft), transparent 70%),
    var(--surface);
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes turn {
  to { --angle: 360deg; }
}

.ai-soon__orbit {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ai-soon__orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 50%;
  translate: -50% -50%;
  animation: rotate 40s linear infinite;
}

.ai-soon__orbit span::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 16px var(--primary);
}

.ai-soon__orbit span:nth-child(1) { width: 340px; height: 340px; }
.ai-soon__orbit span:nth-child(2) { width: 560px; height: 560px; animation-duration: 60s; animation-direction: reverse; }
.ai-soon__orbit span:nth-child(3) { width: 820px; height: 820px; animation-duration: 90s; }

.ai-soon__orbit span:nth-child(2)::after { background: var(--c-rose); box-shadow: 0 0 16px var(--c-rose); }
.ai-soon__orbit span:nth-child(3)::after { background: var(--c-mint); box-shadow: 0 0 16px var(--c-mint); }

@keyframes rotate {
  to { rotate: 360deg; }
}

.ai-soon__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: var(--primary-ink);
  background: var(--gradient-primary);
  box-shadow: 0 16px 40px -12px var(--primary-glow);
  animation: float 5s ease-in-out infinite;
}

.ai-soon__icon .icon {
  width: 34px;
  height: 34px;
}

.ai-soon__title {
  margin-top: 28px;
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  color: var(--primary);
}

.ai-soon__lead {
  margin-top: 16px;
  max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 300;
  color: var(--text-muted);
}

.ai-soon__more {
  position: relative;
  margin-top: 26px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary);
}

.ai-soon__more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.ai-soon__more:hover::after {
  transform: scaleX(1);
}

.link-stub {
  cursor: default;
}

.link-stub.is-shaking {
  animation: shake 0.5s ease;
}

@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ── The Evolve ──────────────────────────────────────────────────────────── */

.evolve {
  padding-bottom: clamp(72px, 10vw, 128px);
}

.evolve__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 36px;
  text-align: center;
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}

/* A slow rainbow wash behind everything. */
.evolve__card::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: var(--gradient-rainbow);
  background-size: 200% 100%;
  filter: blur(90px);
  opacity: 0.22;
  animation: rainbow-flow 12s linear infinite;
}

/* The same stripe as the scroll bar, flowing along the top edge. */
.evolve__bar {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gradient-rainbow);
  background-size: 200% 100%;
  animation: rainbow-flow 4s linear infinite;
}

@keyframes rainbow-flow {
  to { background-position: -200% 0; }
}

.evolve__eyebrow {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-glass);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.evolve__title {
  margin-top: 20px;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg,
    var(--c-rose), var(--c-peach), var(--c-lemon), var(--c-mint),
    var(--c-sky), var(--c-periwinkle), var(--c-lavender), var(--c-rose));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-flow 6s linear infinite;
  filter: drop-shadow(0 6px 24px var(--primary-glow));
}

.evolve__product {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 14px;
  margin: 22px 0 0;
}

.evolve__name {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.evolve__slogan {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 300;
  font-style: italic;
  color: var(--primary);
}

.evolve__lead {
  margin-top: 16px;
  max-width: 580px;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 300;
  color: var(--text-muted);
}

/* A rough message on the left, Eloquent's version on the right. */
.evolve__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  min-height: 56px;
  margin: 32px 0 34px;
}

.evolve__before,
.evolve__after {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2, .8, .2, 1);
}

.evolve__before {
  background: var(--bubble-in);
  color: var(--text-muted);
  border-bottom-left-radius: 6px;
}

.evolve__before.is-struck {
  text-decoration: line-through;
  text-decoration-color: var(--c-rose-ink);
  opacity: 0.55;
}

.evolve__after {
  background: var(--bubble-out);
  border-bottom-right-radius: 6px;
}

.evolve__after:empty,
.evolve__before:empty {
  opacity: 0;
  transform: translateY(8px);
  padding: 0;
}

.evolve__spark {
  width: 26px;
  height: 26px;
  color: var(--primary);
  animation: spin-slow 6s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .evolve__demo {
    flex-direction: column;
  }

  .evolve__spark {
    transform: rotate(90deg);
  }
}

/* ── Steps ───────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s ease;
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.step__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-on);
}

.step h3 {
  margin-top: 20px;
  font-size: 1.25rem;
}

.step p {
  margin-top: 8px;
  color: var(--text-muted);
}

.step a {
  color: var(--primary);
  font-weight: 500;
}

/* ── Spotlights ──────────────────────────────────────────────────────────── */

.spotlight__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .spotlight__inner {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .spotlight--reverse .spotlight__copy {
    order: 2;
  }
}

.spotlight__note {
  margin-top: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary);
}

.checks {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 14px;
  color: var(--text-muted);
}

.checks li b {
  color: var(--text);
  font-weight: 700;
}

.checks .icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: var(--c-lavender-soft);
  color: var(--c-lavender-ink);
}

/* The vault. */

.vault-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(460px, 100%);
  margin-inline: auto;
}

.vault-visual__ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--c-rose), var(--c-peach), var(--c-lemon), var(--c-mint),
    var(--c-sky), var(--c-periwinkle), var(--c-lavender), var(--c-rose)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: turn 10s linear infinite;
  opacity: 0.9;
}

.vault-visual__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.vault-visual__lock {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 40px;
  color: var(--primary-ink);
  background: var(--gradient-primary);
  box-shadow: 0 30px 60px -20px var(--primary-glow), 0 0 0 14px var(--primary-soft);
  animation: breathe 4s ease-in-out infinite;
}

.vault-visual__lock .icon {
  width: 56px;
  height: 56px;
}

@keyframes breathe {
  50% { transform: scale(1.05); box-shadow: 0 30px 60px -20px var(--primary-glow), 0 0 0 22px var(--primary-soft); }
}

.vault-visual__codes .code-chip {
  position: absolute;
  padding: 8px 14px;
  border-radius: 12px;
  font-family: "Ubuntu Mono", monospace;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.code-chip:nth-child(1) { top: 10%; left: 2%; }
.code-chip:nth-child(2) { top: 18%; right: 0; animation-delay: -1.5s; }
.code-chip:nth-child(3) { bottom: 22%; left: -2%; animation-delay: -3s; }
.code-chip:nth-child(4) { bottom: 12%; right: 4%; animation-delay: -4.5s; }

.vault-visual__phrase {
  position: absolute;
  bottom: -4%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.vault-visual__phrase .dots {
  color: var(--primary);
  letter-spacing: 0.1em;
}

/* The Actions demo. */

.actions-demo {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.actions-demo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip--btn {
  font-family: "Ubuntu Mono", monospace;
  font-size: 1rem;
  border-color: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chip--btn:hover {
  transform: translateY(-2px);
}

.chip--btn.is-active {
  background: var(--accent);
  color: var(--accent-on);
  border-color: color-mix(in srgb, var(--accent-on) 30%, transparent);
  box-shadow: 0 8px 20px -10px var(--accent);
}

.actions-demo__screen {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 22px;
  background: var(--chat-bg);
}

.actions-demo__row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-height: 64px;
}

.actions-demo__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.actions-demo__row .bubble {
  max-width: 100%;
  font-size: 0.95rem;
}

.actions-demo__row .bubble:empty {
  display: none;
}

.actions-demo__row--typed .bubble {
  min-width: 60px;
}

.actions-demo__arrow {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-lemon);
  color: var(--c-lemon-on);
}

.actions-demo__arrow.is-firing {
  animation: fire 0.6s ease;
}

@keyframes fire {
  40% { transform: scale(1.3) rotate(-12deg); }
}

.actions-demo__tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.actions-demo__tokens code {
  font-size: 0.8rem;
}

.bubble .mention {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
  text-underline-offset: 3px;
}

.bubble .attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.85rem;
}

.bubble .attachment i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-style: normal;
  background: var(--c-sky);
}

/* ── Plug-In ─────────────────────────────────────────────────────────────── */

.plugin__card {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 36px;
  background:
    radial-gradient(70% 60% at 0% 0%, var(--c-rose-soft), transparent 60%),
    radial-gradient(60% 60% at 100% 100%, var(--c-periwinkle-soft), transparent 60%),
    var(--surface);
  overflow: hidden;
}

.plugin__glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  height: 80%;
  border-radius: 50%;
  background: var(--blob-lavender);
  filter: blur(80px);
  pointer-events: none;
}

.plugin__grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1000px) {
  .plugin__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.plugin__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}

.badge .icon {
  width: 1em;
  height: 1em;
}

.modes {
  display: grid;
  gap: 12px;
  margin: 28px 0 32px;
}

@media (min-width: 640px) {
  .modes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mode {
  padding: 18px;
  border-radius: 18px;
  background: var(--accent-soft);
  border: 1px solid transparent;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.mode:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.mode h4 {
  font-size: 1rem;
  color: var(--accent-ink);
}

.mode p {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.terminal {
  border-radius: 22px;
  background: var(--term-bg);
  color: var(--term-text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--term-bar);
}

.terminal__bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-rose);
}

.terminal__bar i:nth-child(2) { background: var(--c-lemon); }
.terminal__bar i:nth-child(3) { background: var(--c-mint); }

.terminal__bar span {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--term-mute);
}

.terminal__body {
  margin: 0;
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}

.terminal__body code {
  padding: 0;
  background: none;
  color: inherit;
}

.t-mute { color: var(--term-mute); }
.t-key  { color: var(--term-key); }
.t-str  { color: var(--term-str); }
.t-num  { color: var(--term-num); }

/* ── Perks ───────────────────────────────────────────────────────────────── */

.perks {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.perk {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 70%),
    var(--surface);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.perk:hover {
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.perk__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-on);
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1.5);
}

.perk:hover .perk__icon {
  transform: scale(1.1) rotate(-10deg);
}

.perk__icon .icon {
  width: 26px;
  height: 26px;
}

.perk h3 {
  margin-top: 20px;
  font-size: 1.2rem;
}

.perk p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Pricing ─────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 680px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Side by side, the prices line up whatever the tagline's length. */
  .plan__tag {
    min-height: 2.9em;
  }
}

@media (min-width: 1120px) {
  .plans {
    grid-template-columns: repeat(4, 1fr);
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}

/* Pro: the accent border it would get on hover, all the time. */
.plan--popular {
  border: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: var(--shadow-lg);
}

/* Max: a rainbow border that hover never recolours. */
.plan--featured,
.plan--featured:hover {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient-rainbow) border-box;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 1120px) {
  .plan--popular,
  .plan--featured {
    transform: translateY(-12px);
  }

  .plan--popular:hover,
  .plan--featured:hover {
    transform: translateY(-18px);
  }
}

.plan__ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent-on);
  background: var(--accent);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transform: translateX(-50%);
}

.plan__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 1.5rem;
  background: var(--accent-soft);
}

/* Max walks its ticks down the rainbow, one hue each, from the border's far end back. */
.plan--featured li:nth-child(1) { --accent: var(--c-lavender); --accent-on: var(--c-lavender-on); }
.plan--featured li:nth-child(2) { --accent: var(--c-sky);      --accent-on: var(--c-sky-on); }
.plan--featured li:nth-child(3) { --accent: var(--c-mint);     --accent-on: var(--c-mint-on); }
.plan--featured li:nth-child(4) { --accent: var(--c-lemon);    --accent-on: var(--c-lemon-on); }
.plan--featured li:nth-child(5) { --accent: var(--c-rose);     --accent-on: var(--c-rose-on); }

/* …and its icon sits on the whole rainbow, turned into a circle. */
.plan--featured .plan__icon {
  background: conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--c-rose) 40%, transparent),
    color-mix(in srgb, var(--c-peach) 40%, transparent),
    color-mix(in srgb, var(--c-lemon) 40%, transparent),
    color-mix(in srgb, var(--c-mint) 40%, transparent),
    color-mix(in srgb, var(--c-sky) 40%, transparent),
    color-mix(in srgb, var(--c-periwinkle) 40%, transparent),
    color-mix(in srgb, var(--c-lavender) 40%, transparent),
    color-mix(in srgb, var(--c-rose) 40%, transparent)
  );
}

.plan h3 {
  margin-top: 16px;
  font-size: 1.5rem;
}

.plan__tag {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-strong);
}

.plan__price b {
  font-size: 2.3rem;
  letter-spacing: -0.03em;
}

.plan__price span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plan ul {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-left: 28px;
  font-size: 0.94rem;
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

.plan li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  background: var(--accent-on);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.5 9.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.5 9.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* The stretch of the border's rainbow the ribbon sits on, so it reads as the
   line carrying on through it. */
.plan--featured .plan__ribbon {
  color: #17122b;
  background: linear-gradient(90deg, var(--c-lemon), var(--c-mint), var(--c-sky));
}

.plan .btn {
  width: 100%;
}

/* A plan's outline button takes the plan's own colour on hover, not the
   site's violet. The text is the -ink shade so it stays readable on white. */
.plan .btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 12px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq__item[open] {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: var(--shadow-md);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary .icon {
  padding: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1);
}

.faq__item[open] summary .icon {
  transform: rotate(180deg);
}

.faq__a {
  padding: 0 22px 22px;
  color: var(--text-muted);
}

.faq__item[open] .faq__a {
  animation: fade-down 0.4s ease;
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
}

/* ── Final CTA ───────────────────────────────────────────────────────────── */

.cta {
  padding-block: clamp(72px, 10vw, 128px);
}

.cta__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px);
  border-radius: 36px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}

.blobs--cta .blob {
  width: 30vmax;
  height: 30vmax;
}

.blobs--cta .blob--rose  { top: -40%; left: -10%; }
.blobs--cta .blob--sky   { top: -30%; right: -10%; }
.blobs--cta .blob--lemon { top: 40%; left: 35%; }

.cta__title {
  max-width: 720px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
}

.cta__lead {
  margin: 16px 0 32px;
  max-width: 520px;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 800px) {
  .footer__inner {
    grid-template-columns: 1fr auto auto;
    gap: 40px;
  }
}

.footer__brand p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer__links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--primary);
}

.footer__copy {
  font-size: 0.88rem;
  color: var(--text-faint);
}

/* Held back for a moment while the markup's Russian is swapped (index.html). */
.i18n-pending body {
  opacity: 0;
}

/* ── Scroll reveal (only once JS is known to run) ────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.2, .8, .2, 1), transform 0.8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Cards that tilt keep their own transform transition once revealed. */
.js .reveal.is-visible.tilt {
  transition: opacity 0.8s cubic-bezier(.2, .8, .2, 1), transform 0.4s cubic-bezier(.2, .8, .2, 1),
              box-shadow 0.4s ease, border-color 0.4s ease;
  transition-delay: 0s;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */

@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;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* The Evolve in the header: the same flowing rainbow as its section title. */
.nav a.nav__evolve:not(.btn),
.nav a.nav__evolve:not(.btn):hover,
.nav a.nav__evolve.is-current {
  font-weight: 700;
  background: linear-gradient(90deg,
    var(--c-rose), var(--c-peach), var(--c-lemon), var(--c-mint),
    var(--c-sky), var(--c-periwinkle), var(--c-lavender), var(--c-rose));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-flow 6s linear infinite;
}
