/* ==========================================================================
   Wing Secure — landing styles
   Palette lifted 1:1 from the app design system (lib/core/theme/app_colors.dart)
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #0e43c6;
  --brand-bright: #346eff;
  --brand-soft: #4275f5;
  --mint: #0fe4b3;
  --mint-text: #17b994;
  --mint-wash: #d3fff1;
  --pink: #ff598b;
  --orange: #f97316;

  /* Dark scheme (default surface of the site) */
  --d-bg: #19173d;
  --d-surface: #262450;
  --d-border: #363d64;
  --d-text: #f1f5ff;
  --d-text-2: #9293ab;

  /* Light scheme (soft sections) */
  --l-bg: #eae4fb;
  --l-surface: #ffffff;
  --l-border: #bec4e1;
  --l-text: #252831;
  --l-text-2: #686c7d;

  /* Active band colours — flipped per-section by .band--light */
  --bg: var(--d-bg);
  --surface: var(--d-surface);
  --border: var(--d-border);
  --text: var(--d-text);
  --text-2: var(--d-text-2);
  --accent: var(--brand-bright);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --wrap: 1200px;
  --gutter: 20px;
  --radius-s: 12px;
  --radius: 20px;
  --radius-l: 28px;
  --section-y: 72px;

  --shadow-card: 0 1px 2px rgb(11 10 30 / 0.24), 0 12px 32px -12px rgb(11 10 30 / 0.4);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
    --section-y: 112px;
  }
}

/* --- 2. Reset / base ----------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--d-text);
  background: var(--d-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* width/height attributes reserve space against CLS, but must not fight the
   CSS box — without this, the presentational `height` hint wins and stretches
   any image the CSS resizes. */
img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

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

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

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

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--mint);
  color: #062b22;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* --- 3. Layout primitives ------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--text);
}

.band--light {
  --bg: var(--l-bg);
  --surface: var(--l-surface);
  --border: var(--l-border);
  --text: var(--l-text);
  --text-2: var(--l-text-2);
  --accent: var(--brand);
}

/* Soft transition between a light band and the dark one that follows */
.band--light + .band:not(.band--light),
.band:not(.band--light) + .band--light {
  border-top: 1px solid rgb(255 255 255 / 0.06);
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.band:not(.band--light) .eyebrow {
  color: #9fbaff;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-size: clamp(30px, 5vw, 46px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.lede {
  margin-top: 18px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-2);
}

/* --- 4. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease),
    border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

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

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

.btn--primary {
  background: var(--brand-bright);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgb(52 110 255 / 0.9);
}

.btn--primary:hover {
  background: #4a80ff;
  box-shadow: 0 16px 34px -12px rgb(52 110 255 / 0.95);
}

.band--light .btn--primary {
  background: var(--brand);
  box-shadow: 0 10px 26px -10px rgb(14 67 198 / 0.6);
}

.band--light .btn--primary:hover {
  background: #1150e0;
}

.btn--ghost {
  border-color: color-mix(in srgb, var(--text) 24%, transparent);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--text) 42%, transparent);
  background: color-mix(in srgb, var(--text) 11%, transparent);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 15px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

/* App Store badge (Coming soon state) */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-bright) 60%, transparent);
}

.store-badge svg {
  flex: none;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.store-badge b {
  display: block;
  font-size: 15px;
  font-weight: 650;
}

.store-badge span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* --- 5. Navigation ------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--d-bg) 78%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav.is-stuck {
  border-bottom-color: var(--d-border);
  background: color-mix(in srgb, var(--d-bg) 92%, transparent);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--d-text);
  font-weight: 650;
  letter-spacing: -0.02em;
  flex: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand b {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.1;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--d-text-2);
}

.nav__links {
  display: none;
  margin-left: auto;
  gap: 4px;
}

.nav__links a {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--d-text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--d-text);
  background: rgb(255 255 255 / 0.07);
}

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

@media (min-width: 1024px) {
  .nav__links {
    display: flex;
  }
  .nav__actions {
    margin-left: 16px;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--d-border);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.04);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.icon-btn:hover {
  background: rgb(255 255 255 / 0.1);
  border-color: #4c548a;
}

.icon-btn img {
  width: 26px;
  height: 26px;
}

.nav__cta {
  display: none;
}

@media (min-width: 640px) {
  .nav__cta {
    display: inline-flex;
  }
}

/* --- 6. Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 56px;
  padding-bottom: 72px;
  background: linear-gradient(168deg, #19173d 0%, #201e48 46%, #262450 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero::before {
  width: 620px;
  height: 620px;
  top: -220px;
  right: -160px;
  background: radial-gradient(circle, rgb(52 110 255 / 0.5), transparent 68%);
}

.hero::after {
  width: 520px;
  height: 520px;
  bottom: -240px;
  left: -140px;
  background: radial-gradient(circle, rgb(15 228 179 / 0.24), transparent 68%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 84px;
    padding-bottom: 108px;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 40px;
  }
}

.hero h1 {
  font-size: clamp(36px, 6.4vw, 60px);
  letter-spacing: -0.035em;
}

.hero h1 .grad {
  background: linear-gradient(96deg, #7fa5ff 0%, #0fe4b3 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin-top: 22px;
  max-width: 30em;
  font-size: clamp(17px, 2.1vw, 20px);
  color: #b9bcd4;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__note {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--d-text-2);
}

.hero__note svg {
  width: 17px;
  height: 17px;
  flex: none;
  stroke: var(--mint);
}

/* Hero art: device + mascot */
.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 460px;
}

.hero__glow {
  position: absolute;
  inset: auto 0 -6% 0;
  height: 62%;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgb(52 110 255 / 0.42),
    rgb(15 228 179 / 0.14) 42%,
    transparent 72%
  );
  filter: blur(34px);
  pointer-events: none;
}

/* Sits partly over the device. Kept small on narrow screens so it frames the
   screenshot instead of hiding it. */
.hero__mascot {
  position: absolute;
  right: -7%;
  bottom: -2%;
  width: 148px;
  z-index: 2;
  pointer-events: none;
  animation: float 7s ease-in-out infinite;
}

@media (min-width: 640px) {
  .hero__mascot {
    width: 250px;
    right: -2%;
  }
}

@media (min-width: 1024px) {
  .hero__mascot {
    width: 268px;
    right: -8%;
  }
}

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

/* --- 7. Device mockup ---------------------------------------------------- */
.device {
  position: relative;
  width: 100%;
  max-width: 292px;
  aspect-ratio: 1290 / 2796;
  padding: 11px;
  border-radius: 54px;
  /* Every stop stays lighter than the screen fill and darker than the light
     band, so the rim reads on all four sides against either background. */
  background: linear-gradient(
    150deg,
    #6b73a8 0%,
    #3d4374 24%,
    #333858 50%,
    #3d4374 76%,
    #6b73a8 100%
  );
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset,
    0 0 0 1px rgb(255 255 255 / 0.08) inset,
    0 34px 70px -26px rgb(0 0 0 / 0.6);
  flex: none;
}

.device--sm {
  max-width: 238px;
  border-radius: 44px;
  padding: 9px;
}

.device__screen {
  position: relative;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: linear-gradient(170deg, #232048 0%, #1b1938 100%);
  display: grid;
  place-items: center;
}

.device--sm .device__screen {
  border-radius: 36px;
}

.device__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dynamic island — drawn only for empty placeholder frames. Real screenshots
   are full-screen captures that already contain the island, so ours would
   double up on top of theirs. */
.device:has(.device__screen img) .device__island {
  display: none;
}

.device__island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  height: 20px;
  border-radius: 999px;
  background: #08071a;
  z-index: 3;
}

/* Placeholder shown until a real screenshot is dropped in */
.device__ph {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 24px 18px;
  text-align: center;
  color: #8f92b4;
  background-image: repeating-linear-gradient(
    -45deg,
    rgb(255 255 255 / 0.028) 0 12px,
    transparent 12px 24px
  );
  width: 100%;
  height: 100%;
  align-content: center;
}

.device__ph svg {
  width: 30px;
  height: 30px;
  stroke: #5d6193;
  margin-bottom: 2px;
}

.device__ph b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #a9adcd;
}

.device__ph span {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #6b6f9b;
}

.band--light .device__ph {
  color: #7b7fa4;
}

.device__caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

/* --- 8. Trust bar -------------------------------------------------------- */
.trust {
  padding-block: 0;
  background: var(--d-bg);
}

.trust__grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--d-border);
  border-radius: var(--radius);
  background: var(--d-border);
  overflow: hidden;
  margin-top: -34px;
  position: relative;
  z-index: 3;
}

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

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

.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  background: var(--d-surface);
}

.trust__item svg {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: var(--mint);
}

.trust__item b {
  display: block;
  font-size: 15px;
  font-weight: 620;
}

.trust__item span {
  display: block;
  font-size: 13px;
  color: var(--d-text-2);
  line-height: 1.4;
}

/* --- 9. Feature grid ----------------------------------------------------- */
.features__grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  padding: 26px 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand-bright) 55%, var(--border));
  box-shadow: var(--shadow-card);
}

.card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.55;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
}

.tag--mint {
  color: var(--mint-text);
  border-color: color-mix(in srgb, var(--mint) 45%, transparent);
  background: color-mix(in srgb, var(--mint) 12%, transparent);
}

.band:not(.band--light) .tag--mint {
  color: #17e0b2;
}

/* Wide showcase rows (feature + screenshot) */
.showcase {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 64px;
}

@media (min-width: 1024px) {
  .showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
    padding-top: 96px;
  }
  .showcase--flip .showcase__media {
    order: -1;
  }
}

.showcase__media {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase h3 {
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.025em;
}

.showcase p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 17px;
}

.check-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.check-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 15.5px;
  line-height: 1.5;
}

.check-list svg {
  flex: none;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  stroke: var(--mint);
}

/* --- 10. How it works ---------------------------------------------------- */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}

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

.step {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step__num {
  counter-increment: step;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--brand-bright), #1e4fd6);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.step__num::before {
  content: counter(step);
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--text-2);
  font-size: 15.5px;
}

.how__art {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-bottom: 52px;
}

@media (min-width: 768px) {
  .how__art {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

.how__mascot {
  width: 190px;
  justify-self: center;
  filter: drop-shadow(0 18px 30px rgb(14 67 198 / 0.22));
}

/* --- 11. Security & privacy ---------------------------------------------- */
.privacy__grid {
  display: grid;
  gap: 16px;
}

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

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

.pcard {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.pcard svg {
  width: 26px;
  height: 26px;
  margin-bottom: 14px;
  stroke: var(--mint);
}

.pcard h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.pcard p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.privacy__hero {
  display: grid;
  gap: 36px;
  align-items: center;
  margin-bottom: 48px;
}

@media (min-width: 1024px) {
  .privacy__hero {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 60px;
  }
}

.privacy__art {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: flex-end;
}

.privacy__art img {
  width: 46%;
  max-width: 190px;
  filter: drop-shadow(0 20px 34px rgb(0 0 0 / 0.35));
}

.privacy__art img:nth-child(2) {
  margin-bottom: 26px;
}

/* Data-flow strip */
.dataflow {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px dashed color-mix(in srgb, var(--mint) 42%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--mint) 7%, transparent);
}

.dataflow h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.dataflow p {
  font-size: 14.5px;
  color: var(--text-2);
  margin: 0;
}

/* --- 12. Themes section -------------------------------------------------- */
.themes__grid {
  display: grid;
  gap: 18px;
}

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

/* The mascot art ships with a transparent background, so each card paints the
   actual palette of the theme it demonstrates and the bird sits on top. */
.theme-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.theme-card__art {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  padding: 22px;
}

/* Source art is 120×158 — cap the upscale so it stays sharp. Raise this once
   a higher-resolution export lands (see README §5). */
.theme-card__art img {
  width: min(100%, 168px);
  object-fit: contain;
}

.theme-card b {
  display: block;
  padding: 15px 12px 17px;
  font-size: 15px;
  font-weight: 620;
  border-top: 1px solid;
}

.theme-card--light {
  border-color: var(--l-border);
  background: var(--l-surface);
  color: var(--l-text);
}

.theme-card--light .theme-card__art {
  background: var(--l-bg);
}

.theme-card--light b {
  border-top-color: var(--l-border);
}

.theme-card--dark {
  border-color: var(--d-border);
  background: var(--d-surface);
  color: var(--d-text);
}

.theme-card--dark .theme-card__art {
  background: var(--d-bg);
}

.theme-card--dark b {
  border-top-color: var(--d-border);
}

.theme-card--system {
  border-color: var(--d-border);
  background: linear-gradient(100deg, var(--l-surface) 50%, var(--d-surface) 50%);
  color: var(--d-text);
}

.theme-card--system .theme-card__art {
  background: linear-gradient(100deg, var(--l-bg) 50%, var(--d-bg) 50%);
}

.theme-card--system b {
  border-top-color: var(--d-border);
  background: var(--d-surface);
}

.themes__devices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 52px;
}

/* --- 13. Gallery --------------------------------------------------------- */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 224px;
  gap: 20px;
  overflow-x: auto;
  padding-block: 6px 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.gallery > * {
  scroll-snap-align: center;
}

.gallery::-webkit-scrollbar {
  height: 8px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.gallery__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery__item .device {
  max-width: 224px;
}

.gallery__hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}

/* --- 14. FAQ ------------------------------------------------------------- */
.faq {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  overflow: hidden;
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  cursor: pointer;
}

.faq__q::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2.2px solid var(--text-2);
  border-bottom: 2.2px solid var(--text-2);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.24s var(--ease);
}

.faq__item.is-open .faq__q::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s var(--ease);
}

.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}

.faq__a > div {
  overflow: hidden;
}

.faq__a p {
  padding: 0 22px 22px;
  color: var(--text-2);
  font-size: 15.5px;
}

.faq__a a {
  color: var(--accent);
}

/* --- 15. Final CTA ------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #1b1941 0%, #262450 58%, #2c2a5e 100%);
}

.cta::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgb(52 110 255 / 0.32), transparent 66%);
  filter: blur(70px);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  display: grid;
  gap: 32px;
  align-items: center;
  text-align: center;
  justify-items: center;
}

.cta img {
  width: 168px;
  filter: drop-shadow(0 20px 34px rgb(0 0 0 / 0.4));
}

.cta h2 {
  max-width: 15em;
}

.cta .lede {
  max-width: 34em;
}

.cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* --- 16. Footer ---------------------------------------------------------- */
.footer {
  padding-block: 56px 32px;
  background: #141230;
  border-top: 1px solid var(--d-border);
  color: var(--d-text-2);
  font-size: 14.5px;
}

.footer__top {
  display: grid;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--d-border);
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.footer__about p {
  margin-top: 16px;
  max-width: 40em;
}

.footer__links {
  display: grid;
  gap: 10px;
  align-content: start;
}

@media (min-width: 768px) {
  .footer__links {
    justify-items: start;
  }
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--d-text-2);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

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

.footer__links img {
  width: 30px;
  height: 30px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 13.5px;
}

/* --- 17. Legal pages ----------------------------------------------------- */
.legal-hero {
  padding-block: 56px 40px;
  background: linear-gradient(170deg, #19173d, #232149);
}

.legal-hero h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.legal-hero p {
  margin-top: 14px;
  color: var(--d-text-2);
}

.legal {
  --bg: var(--l-bg);
  --surface: var(--l-surface);
  --border: var(--l-border);
  --text: var(--l-text);
  --text-2: var(--l-text-2);
  --accent: var(--brand);
  background: var(--l-bg);
  color: var(--l-text);
  padding-block: 56px 88px;
}

.legal__wrap {
  max-width: 860px;
  margin-inline: auto;
  padding: 34px 24px 44px;
  border: 1px solid var(--l-border);
  border-radius: var(--radius);
  background: #fff;
}

@media (min-width: 768px) {
  .legal__wrap {
    padding: 48px 56px 56px;
  }
}

.legal__wrap h2 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal__wrap h2:first-of-type {
  margin-top: 8px;
}

.legal__wrap h3 {
  font-size: 17px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal__wrap p,
.legal__wrap li {
  color: #3d414f;
  font-size: 16px;
  line-height: 1.68;
}

.legal__wrap p + p {
  margin-top: 14px;
}

.legal__wrap ul {
  margin: 12px 0 0;
  display: grid;
  gap: 9px;
}

.legal__wrap ul li {
  position: relative;
  padding-left: 24px;
}

.legal__wrap ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.legal__wrap a {
  color: var(--brand);
}

.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--l-border);
  font-size: 14px;
  color: var(--l-text-2);
}

.legal__toc {
  margin: 0 0 28px;
  padding: 20px 22px;
  border-radius: var(--radius-s);
  background: #f3f0fd;
  border: 1px solid #ddd8f4;
}

.legal__toc b {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--l-text-2);
}

.legal__toc ol {
  display: grid;
  gap: 7px;
  counter-reset: toc;
}

.legal__toc li {
  counter-increment: toc;
  font-size: 15px;
}

.legal__toc li::before {
  content: counter(toc) ". ";
  color: var(--l-text-2);
}

.legal__toc a {
  color: var(--brand);
  text-decoration: none;
}

.legal__toc a:hover {
  text-decoration: underline;
}

.note {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: #fff5ec;
  font-size: 14.5px;
  color: #6d4a26;
}

.note strong {
  color: #4d3315;
}

/* --- 18. Support widget -------------------------------------------------- */
.support-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border: 1px solid #3d4470;
  border-radius: 999px;
  background: #262450;
  color: #f1f5ff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 34px -12px rgb(0 0 0 / 0.65);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}

.support-fab:hover {
  transform: translateY(-2px);
  background: #2e2c5e;
}

.support-fab img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eae4fb;
  flex: none;
}

.support-fab .support-fab__label {
  display: none;
}

@media (min-width: 640px) {
  .support-fab {
    right: 26px;
    bottom: 26px;
  }
  .support-fab .support-fab__label {
    display: inline;
  }
}

.support-fab[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

.support-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  max-height: min(620px, calc(100vh - 24px));
  border: 1px solid var(--d-border);
  border-radius: 22px;
  background: var(--d-bg);
  color: var(--d-text);
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / 0.7);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s;
  visibility: hidden;
}

.support-panel.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
}

@media (min-width: 640px) {
  .support-panel {
    left: auto;
    right: 26px;
    bottom: 26px;
    width: 392px;
  }
}

.support-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px 16px 18px;
  border-bottom: 1px solid var(--d-border);
  background: linear-gradient(120deg, #221f4c, #2b2960);
}

.support-panel__head img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eae4fb;
  flex: none;
}

.support-panel__head b {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.25;
}

.support-panel__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--d-text-2);
}

.support-panel__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.support-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.07);
  color: #cfd2e8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s var(--ease);
}

.support-close:hover {
  background: rgb(255 255 255 / 0.15);
}

.support-body {
  flex: 1;
  min-height: 190px;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(
      110% 60% at 50% 0%,
      rgb(52 110 255 / 0.1),
      transparent 70%
    ),
    var(--d-bg);
}

.support-intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: auto 0;
  text-align: center;
  padding: 8px 6px 4px;
}

.support-intro img {
  width: 118px;
}

.support-intro h3 {
  font-size: 19px;
}

.support-intro p {
  font-size: 14.5px;
  color: var(--d-text-2);
  max-width: 30ch;
}

.bubble {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  animation: bubble-in 0.28s var(--ease) both;
}

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

.bubble img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eae4fb;
  flex: none;
}

.bubble p {
  max-width: 84%;
  padding: 12px 15px;
  border-radius: 16px 16px 16px 5px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  font-size: 14.5px;
  line-height: 1.5;
}

.bubble--ok p {
  border-color: color-mix(in srgb, var(--mint) 40%, transparent);
  background: color-mix(in srgb, var(--mint) 11%, var(--d-surface));
}

.support-typing {
  display: flex;
  gap: 4px;
  padding: 14px 15px;
  border-radius: 16px 16px 16px 5px;
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  width: fit-content;
}

.support-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8c90b8;
  animation: typing 1.1s infinite ease-in-out;
}

.support-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.support-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.support-foot {
  border-top: 1px solid var(--d-border);
  padding: 16px 18px 14px;
  background: #1c1a41;
}

.support-form {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--d-text-2);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--d-border);
  border-radius: 12px;
  background: #232048;
  color: var(--d-text);
  font-size: 15px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6f739b;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgb(52 110 255 / 0.25);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--pink);
}

.field.has-error input:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgb(255 89 139 / 0.25);
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--pink);
}

.field.has-error .field__error {
  display: block;
}

.support-form .btn {
  width: 100%;
}

.support-legal {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #7a7ea6;
}

.support-legal a {
  color: #9aa0c8;
}

/* --- 19. Reveal on scroll ------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero__mascot {
    animation: none;
  }
}
