/*
  Kiki — marketing site stylesheet
  Design language: "Confluent Flow" — two temperature currents (warm coral/rose,
  cool cyan/azure) meeting in a violet threshold, on a deep indigo field.
  Self-hosted Outfit only. No external requests.
*/

/* ---------------------------------------------------------------------- */
/* Fonts                                                                   */
/* ---------------------------------------------------------------------- */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------- */
/* Tokens                                                                  */
/* ---------------------------------------------------------------------- */

:root {
  /* Confluent Flow palette */
  --bg-deep: #12121f;
  --bg-base: #1a1a2e;
  --bg-elevated: #242447;
  --bg-elevated-2: #2c2c56;

  --ink: #eef0ff;
  --muted: #9aa0c0;
  --muted-strong: #b7bcdb;

  --coral: #ff7e5f;
  --rose: #ff3d77;
  --cyan: #34e0c8;
  --azure: #3aa0ff;
  --violet: #9b82ff;

  --warm-current: linear-gradient(135deg, var(--coral), var(--rose));
  --cool-current: linear-gradient(135deg, var(--azure), var(--cyan));
  --confluence: linear-gradient(90deg, var(--coral) 0%, var(--violet) 50%, var(--cyan) 100%);

  --border-soft: rgba(238, 240, 255, 0.1);
  --border-softer: rgba(238, 240, 255, 0.06);

  /* Type scale */
  --fs-display: clamp(2.75rem, 2.1rem + 3.2vw, 5.25rem);
  --fs-h1: clamp(2.25rem, 1.85rem + 2vw, 3.5rem);
  --fs-h2: clamp(1.875rem, 1.6rem + 1.4vw, 2.75rem);
  --fs-h3: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-micro: 0.8rem;

  /* Spacing */
  --space-section: clamp(4.5rem, 3.6rem + 4.5vw, 8.5rem);
  --space-section-sm: clamp(3rem, 2.5rem + 2.5vw, 5rem);
  --gutter: clamp(1.25rem, 1rem + 2vw, 3rem);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 180ms;
  --dur-base: 420ms;
  --dur-slow: 900ms;

  /* Z-scale */
  --z-dropdown: 10;
  --z-sticky-header: 20;
  --z-mobile-nav: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-toast: 60;
  --z-tooltip: 70;

  color-scheme: dark;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg-base);
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

p {
  margin: 0;
}

.prose p + p {
  margin-top: 1.1em;
}

/* Focus visibility — never remove, only restyle */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--violet);
  color: var(--bg-deep);
}

/* ---------------------------------------------------------------------- */
/* Layout helpers                                                          */
/* ---------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

.section-sm {
  padding-block: var(--space-section-sm);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.section-head p {
  color: var(--muted);
  font-size: var(--fs-lead);
  margin-top: 0.9rem;
  max-width: 60ch;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--ink);
  color: var(--bg-deep);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: var(--z-toast);
  transition: top var(--dur-fast) var(--ease-out-quart);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------------- */
/* Buttons + links                                                         */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  transition: transform var(--dur-fast) var(--ease-out-quart), box-shadow var(--dur-fast) var(--ease-out-quart), background var(--dur-fast) var(--ease-out-quart);
  white-space: nowrap;
}

.btn-primary {
  background: var(--coral);
  color: var(--bg-deep);
  box-shadow: 0 12px 30px -12px rgba(255, 126, 95, 0.55);
}

.btn-primary:hover {
  background: #ff926f;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(255, 126, 95, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-block {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover {
    transform: none;
  }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--cyan);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease-out-quart), gap var(--dur-fast) var(--ease-out-quart);
}

.link-arrow:hover {
  border-color: var(--cyan);
  gap: 0.6rem;
}

.link-arrow svg {
  width: 1em;
  height: 1em;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                   */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-header);
  background: rgba(18, 18, 31, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-softer);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-icon {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-lockup {
  height: 32px;
  width: auto;
  display: block;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 1rem + 1vw, 2.25rem);
}

.nav-main a:not(.btn) {
  color: var(--muted-strong);
  font-weight: 500;
  position: relative;
  padding-block: 0.25rem;
}

.nav-main a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--cyan);
  transition: right var(--dur-base) var(--ease-out-expo);
}

.nav-main a:not(.btn):hover {
  color: var(--ink);
}

.nav-main a:not(.btn):hover::after,
.nav-main a[aria-current="page"]::after {
  right: 0;
}

.nav-main a[aria-current="page"] {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-links-group {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 1rem + 1vw, 2.25rem);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links-group {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease-out-quart), transform var(--dur-base) var(--ease-out-quart), visibility var(--dur-base);
    z-index: var(--z-mobile-nav);
  }

  .nav-links-group.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-main a:not(.btn) {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--border-softer);
  }

  .nav-links-group .btn {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links-group {
    transition: opacity var(--dur-fast) linear, visibility var(--dur-fast);
  }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                   */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-softer);
  background: var(--bg-deep);
  padding-block: clamp(3rem, 2.5rem + 2vw, 5rem) 2.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(2rem, 1.5rem + 2vw, 4rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-softer);
}

.footer-brand .brand {
  margin-bottom: 0.9rem;
}

.footer-brand p {
  color: var(--muted);
  max-width: 32ch;
  font-size: var(--fs-small);
}

.footer-col h4 {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--muted-strong);
  font-size: var(--fs-small);
  transition: color var(--dur-fast) var(--ease-out-quart);
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  color: var(--muted);
  font-size: var(--fs-micro);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                     */
/* ---------------------------------------------------------------------- */

.hero {
  padding-block: clamp(3.5rem, 3rem + 3vw, 6.5rem) var(--space-section);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(60% 60% at 30% 20%, rgba(255, 126, 95, 0.16), transparent 70%),
    radial-gradient(50% 60% at 80% 10%, rgba(52, 224, 200, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 2rem + 2vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
}

.hero-copy h1 {
  max-width: 16ch;
}

.hero-copy .lead {
  margin-top: 1.4rem;
  color: var(--muted-strong);
  font-size: var(--fs-lead);
  max-width: 42ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.hero-note {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: var(--fs-small);
}

.hero-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--cyan);
}

/* Hero visual: two currents / message confluence */

.confluence-visual {
  position: relative;
  min-height: 320px;
}

.confluence-visual svg.stream-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Static by default: the gradient stream is always fully drawn, so the hero
   visual is a complete composition with zero JS. No opacity/length hiding. */
.stream-line {
  fill: none;
  stroke: url(#streamGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.bubble-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  z-index: 1;
}

/* Visible by default: bubbles render fully opaque, in place, with zero JS.
   The "js" class (set by an inline head script) opts into a purely
   transform-based settle-in — opacity never drops, so nothing is ever
   hidden, even mid-animation or if the animation never runs at all. */
.chat-bubble {
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-md);
  max-width: 22rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}

.chat-bubble.origin {
  align-self: flex-start;
  border-top: 2px solid var(--coral);
}

.chat-bubble.translated {
  align-self: flex-end;
  border-top: 2px solid var(--cyan);
}

html.js .chat-bubble {
  animation: bubble-settle var(--dur-base) var(--ease-out-expo) both;
}

html.js .chat-bubble.origin {
  animation-delay: 0.05s;
}

html.js .chat-bubble.translated {
  animation-delay: 0.25s;
}

@keyframes bubble-settle {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .chat-bubble {
    animation: none;
    transform: none;
  }
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: var(--fs-micro);
  color: var(--muted);
}

.chat-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-avatar.origin-avatar {
  background: var(--warm-current);
}

.chat-avatar.translated-avatar {
  background: var(--cool-current);
}

.chat-bubble p {
  font-size: 0.98rem;
  color: var(--ink);
}

.chat-tag {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: var(--fs-micro);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.chat-tag strong {
  color: var(--cyan);
  font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* Differentiators — flowing row, not icon cards                           */
/* ---------------------------------------------------------------------- */

.differentiators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border-softer);
  border-bottom: 1px solid var(--border-softer);
}

.differentiator {
  padding: clamp(1.75rem, 1.5rem + 1vw, 2.5rem) clamp(1.25rem, 1rem + 1vw, 2rem);
  border-left: 1px solid var(--border-softer);
}

.differentiator:first-child {
  border-left: none;
}

@media (max-width: 700px) {
  .differentiator {
    border-left: none;
    border-top: 1px solid var(--border-softer);
  }

  .differentiator:first-child {
    border-top: none;
  }
}

.differentiator .word {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.differentiator .word.hue-warm {
  color: var(--coral);
}

.differentiator .word.hue-mid {
  color: var(--violet);
}

.differentiator .word.hue-cool {
  color: var(--cyan);
}

.differentiator p {
  margin-top: 0.65rem;
  color: var(--muted-strong);
  font-size: var(--fs-small);
  max-width: 32ch;
}

/* ---------------------------------------------------------------------- */
/* Comparison — the honest comparison                                      */
/* ---------------------------------------------------------------------- */

.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  align-items: stretch;
}

@media (max-width: 760px) {
  .compare {
    grid-template-columns: 1fr;
  }
}

.compare-panel {
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.compare-panel.locked {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  opacity: 0.88;
}

.compare-panel.open {
  background: linear-gradient(155deg, rgba(255, 126, 95, 0.14), rgba(52, 224, 200, 0.12)), var(--bg-elevated-2);
  border: 1px solid rgba(155, 130, 255, 0.35);
  box-shadow: 0 30px 60px -30px rgba(155, 130, 255, 0.35);
}

.compare-kicker {
  font-size: var(--fs-small);
  color: var(--muted);
  font-weight: 700;
}

.compare-price {
  font-size: clamp(2.25rem, 1.9rem + 1.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.compare-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.compare-panel.open .compare-price {
  color: var(--ink);
}

.compare-panel.locked .compare-price {
  color: var(--muted-strong);
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.98rem;
}

.compare-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.compare-panel.locked .compare-list svg {
  color: var(--muted);
}

.compare-panel.open .compare-list svg {
  color: var(--cyan);
}

.compare-panel.locked .compare-list li {
  color: var(--muted-strong);
}

/* ---------------------------------------------------------------------- */
/* How it works — thread layout                                            */
/* ---------------------------------------------------------------------- */

.thread {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.thread::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(var(--coral), var(--violet), var(--cyan));
  opacity: 0.55;
}

@media (min-width: 860px) {
  .thread::before {
    left: 50%;
    transform: translateX(-1px);
  }
}

.thread-item {
  position: relative;
  padding-left: 2.75rem;
}

.thread-item::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--cyan);
}

.thread-item:nth-child(odd)::before {
  border-color: var(--coral);
}

@media (min-width: 860px) {
  .thread-item {
    width: calc(50% - 2.5rem);
    padding-left: 0;
    padding-right: 0;
  }

  .thread-item:nth-child(odd) {
    margin-right: calc(50% + 2.5rem);
    text-align: right;
  }

  .thread-item:nth-child(even) {
    margin-left: calc(50% + 2.5rem);
  }

  .thread-item::before {
    left: auto;
  }

  .thread-item:nth-child(odd)::before {
    right: -2.5rem;
    left: auto;
  }

  .thread-item:nth-child(even)::before {
    left: -2.5rem;
  }
}

.thread-item h3 {
  font-size: 1.3rem;
}

.thread-item p {
  margin-top: 0.5rem;
  color: var(--muted-strong);
  max-width: 40ch;
}

@media (min-width: 860px) {
  .thread-item:nth-child(odd) p {
    margin-left: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Languages marquee                                                       */
/* ---------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}

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

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .marquee-track .lang-pill:nth-child(n + 109) {
    display: none;
  }
}

.lang-pill {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  font-size: var(--fs-small);
  color: var(--muted-strong);
}

/* ---------------------------------------------------------------------- */
/* Pricing hero — intro copy + a compact static confluence visual so the   */
/* right half of the header is never an empty gap on wide screens          */
/* ---------------------------------------------------------------------- */

.pricing-hero-row {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 1.5rem + 2vw, 4rem);
  justify-content: space-between;
}

.pricing-hero-row > .pricing-hero-copy {
  flex: 1 1 26rem;
}

.confluence-visual--compact {
  flex: 0 0 clamp(220px, 28vw, 320px);
  min-height: 260px;
}

@media (max-width: 860px) {
  .pricing-hero-row {
    flex-direction: column;
    align-items: stretch;
  }

  .confluence-visual--compact {
    flex: none;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Pricing cards                                                           */
/* ---------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.price-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  background: linear-gradient(165deg, rgba(155, 130, 255, 0.16), rgba(52, 224, 200, 0.08)), var(--bg-elevated-2);
  border-color: rgba(155, 130, 255, 0.4);
}

.price-card-badge {
  position: absolute;
  top: -0.85rem;
  left: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  background: var(--violet);
  color: var(--bg-deep);
  font-size: var(--fs-micro);
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
}

.price-card h3 {
  font-size: 1.35rem;
}

.price-card .price-tagline {
  color: var(--muted);
  font-size: var(--fs-small);
  margin-top: 0.35rem;
}

.price-amount {
  margin-top: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.price-amount .amount {
  font-size: clamp(2.1rem, 1.9rem + 1vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.price-amount .period {
  color: var(--muted);
  font-size: var(--fs-small);
}

.price-card ul {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex-grow: 1;
}

.price-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--muted-strong);
}

.price-card ul li svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--cyan);
}

.price-card .btn {
  margin-top: 1.75rem;
}

/* Billing toggle */

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  padding: 0.4rem;
  border-radius: var(--radius-pill);
}

.billing-toggle button {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted-strong);
  transition: background var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart);
}

.billing-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg-deep);
}

.billing-toggle .save-note {
  color: var(--cyan);
  font-size: var(--fs-micro);
  font-weight: 700;
  padding-right: 0.75rem;
}

/* ---------------------------------------------------------------------- */
/* FAQ (native details/summary)                                            */
/* ---------------------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--border-softer);
  padding-block: 1.25rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

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

.faq-item summary .plus {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}

.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--cyan);
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out-quart);
}

.faq-item summary .plus::before {
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.faq-item summary .plus::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-item[open] summary .plus::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-item p {
  margin-top: 0.85rem;
  color: var(--muted-strong);
  max-width: 65ch;
}

/* ---------------------------------------------------------------------- */
/* Legal / prose pages                                                     */
/* ---------------------------------------------------------------------- */

.legal-hero {
  padding-block: clamp(3rem, 2.5rem + 2vw, 5rem) 2rem;
  border-bottom: 1px solid var(--border-softer);
}

.legal-hero .updated {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-small);
}

.legal-body {
  padding-block: var(--space-section-sm);
}

.legal-body h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

.legal-body p,
.legal-body li {
  color: var(--muted-strong);
  max-width: 72ch;
}

.legal-body ul,
.legal-body ol {
  margin-top: 0.75rem;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-body ul {
  list-style: disc;
}

.legal-body ol {
  list-style: decimal;
}

.legal-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body strong {
  color: var(--ink);
}

.legal-toc {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.legal-toc h2 {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.legal-toc ol {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 1.2rem;
  margin: 0;
}

.legal-toc a {
  color: var(--muted-strong);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--cyan);
}

.callout {
  margin-top: 1.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}

.callout p {
  color: var(--muted-strong);
}

/* ---------------------------------------------------------------------- */
/* Support page                                                            */
/* ---------------------------------------------------------------------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.step-mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--warm-current);
  color: var(--bg-deep);
}

.step:nth-child(even) .step-mark {
  background: var(--cool-current);
}

.step h3 {
  font-size: 1.1rem;
}

.step p,
.step code {
  margin-top: 0.4rem;
  color: var(--muted-strong);
}

code,
.kbd {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--bg-elevated-2);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--cyan);
}

.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.support-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}

.support-card h3 {
  font-size: 1.1rem;
}

.support-card p {
  margin-top: 0.5rem;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.support-card a.link-arrow {
  margin-top: 1rem;
}

/* ---------------------------------------------------------------------- */
/* CTA band                                                                 */
/* ---------------------------------------------------------------------- */

.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 2rem + 2vw, 4rem);
  background: linear-gradient(135deg, rgba(255, 126, 95, 0.18), rgba(52, 224, 200, 0.14)), var(--bg-elevated);
  border: 1px solid var(--border-soft);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-band h2 {
  max-width: 22ch;
}

.cta-band p {
  color: var(--muted-strong);
  max-width: 46ch;
}

.cta-band .hero-actions {
  margin-top: 0.25rem;
  justify-content: center;
}

/* ---------------------------------------------------------------------- */
/* Reveal on scroll — content is visible by DEFAULT. The hidden "about to  */
/* animate in" state only exists under html.js (added by an inline head    */
/* script the instant script execution is possible), so: no JS, JS         */
/* disabled, headless render without a paint loop, a hidden/background     */
/* tab, or a slow/never-firing IntersectionObserver all leave content      */
/* fully visible. The observer only ever ADDS "is-visible" to animate in;  */
/* it never controls whether content is visible at all.                    */
/* ---------------------------------------------------------------------- */

[data-reveal] {
  opacity: 1;
  transform: none;
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out-expo), transform var(--dur-slow) var(--ease-out-expo);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Content already on screen the instant the page loads is marked visible
   immediately with no transition — see main.js. Without this, a hidden
   frame painted before that JS runs would make the snap-to-visible animate
   as a real (and easily mistimed / "ghosted"-looking) fade. */
html.js [data-reveal].reveal-skip-transition {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------------------------- */
/* Responsive guards                                                        */
/* ---------------------------------------------------------------------- */

@media (max-width: 400px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
