/*
 * Audissey — audissey.io
 * Single stylesheet for the public site. No build step, no third-party
 * requests. Mobile-first; dark theme only (matches the app).
 *
 * Sections:
 *   1. Fonts            5. Header / nav       9. Platforms + CTA
 *   2. Tokens           6. Hero               10. Footer
 *   3. Base             7. Spotlight          11. Legal pages (.legal)
 *   4. Layout helpers   8. Feature grid       12. 404, motion, print
 */

/* 1. Fonts (self-hosted variable woff2, Latin + Latin Extended-A subset; OFL — see /assets/fonts/OFL.txt) */
@font-face {
  font-family: 'Sora';
  src: url('/assets/fonts/sora-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens (from audissey_app lib/core/design/tokens.dart) */
:root {
  --bg: #15121b;
  --surface: #2a2632;
  --card: #27252e;
  --primary: #8843db;
  --primary-light: #ae80e6;
  --primary-200: #c7a8ee;
  --primary-700: #5f2e9a;
  --primary-dark: #381b5b;
  --teal: #00c6ae;
  --teal-light: #54d9c9;
  --text: #f6f3ff;
  --text-strong: #fbfaff;
  --muted: #bcb8c5;
  --subtle: #908d99;

  --line: rgba(246, 243, 255, 0.1);
  --line-strong: rgba(246, 243, 255, 0.18);
  --purple-glow: rgba(136, 67, 219, 0.42);
  --teal-glow: rgba(0, 198, 174, 0.24);

  --font-display: 'Sora', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    Roboto, Arial, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    Roboto, Arial, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --gutter: 16px;
  --container: 1180px;
  --section-space: clamp(4rem, 3rem + 5vw, 7.5rem);
}

/* 3. Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

a {
  color: var(--primary-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

::selection {
  background: var(--primary);
  color: var(--text-strong);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--bg);
}

/* 4. Layout helpers */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

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

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--teal-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 1.35rem + 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
}

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.text-gradient {
  color: var(--primary-light);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-gradient {
    background-image: linear-gradient(
      100deg,
      var(--primary-200) 0%,
      var(--primary-light) 40%,
      var(--teal-light) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.haze {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* fade the glow out at the section edges so it never shows a hard cut-off */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14%,
    #000 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14%,
    #000 86%,
    transparent 100%
  );
}

.haze::before,
.haze::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.haze::before {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  left: -12%;
  top: -18%;
  background: radial-gradient(
    closest-side,
    var(--purple-glow),
    rgba(136, 67, 219, 0) 72%
  );
  /* Decorative motion is finite (WCAG 2.2.2): one slow drift, then it rests. */
  animation: haze-drift 4.5s ease-out both;
}

.haze::after {
  width: min(60vw, 620px);
  height: min(60vw, 620px);
  right: -14%;
  bottom: -22%;
  background: radial-gradient(
    closest-side,
    var(--teal-glow),
    rgba(0, 198, 174, 0) 72%
  );
  animation: haze-drift 4.5s ease-out reverse both;
}

@keyframes haze-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6%, 5%, 0) scale(1.08);
  }
}

/* 5. Header / nav */
.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(21, 18, 27, 0.86);
}

@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  .site-header {
    background: rgba(21, 18, 27, 0.72);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  min-height: 4rem;
  padding-block: 0.625rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0;
}

.brand img {
  width: auto;
  height: 26px;
}

.site-nav {
  order: 3;
  flex-basis: 100%;
}

.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.45rem 0.1rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.lang-switch a {
  min-width: 2.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--text);
}

.lang-switch a[aria-current] {
  background: var(--surface);
  color: var(--text-strong);
}

@media (min-width: 560px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .site-nav {
    order: 0;
    flex-basis: auto;
    margin-left: auto;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 1.5rem;
  }
}

/* 6. Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem)
    clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
}

.hero-inner {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.375rem, 1.45rem + 4.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.25rem);
  line-height: 1.6;
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--subtle);
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  }
}

/* Decorative, clearly illustrative player + schedule cards (aria-hidden in markup) */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  display: grid;
  gap: 1rem;
}

.mock-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    160deg,
    rgba(42, 38, 50, 0.96),
    rgba(31, 28, 38, 0.96)
  );
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.mock-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.mock-art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: radial-gradient(
    120% 120% at 20% 15%,
    var(--primary) 0%,
    var(--primary-dark) 62%,
    #1d4f4a 100%
  );
}

.mock-art img {
  width: 30px;
  height: auto;
}

.mock-meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.mock-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal-light);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 198, 174, 0.18);
}

.mock-title {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mock-sub {
  color: var(--subtle);
  font-size: 0.8125rem;
}

.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  padding-right: 0.25rem;
}

.eq span {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--teal-light), var(--primary-light));
  transform-origin: bottom;
  transform: scaleY(var(--eq-rest, 0.6));
  /* Finite (WCAG 2.2.2): 5 alternating runs of 0.8 s (< 4 s, less with the
     negative delays). An odd count ends on the 100% keyframe = each bar's
     resting height, which `both` keeps. */
  animation: eq-bounce 0.8s ease-in-out 5 alternate both;
}

.eq span:nth-child(1) {
  --eq-rest: 0.55;
  animation-delay: -0.2s;
}
.eq span:nth-child(2) {
  --eq-rest: 0.85;
  animation-delay: -0.75s;
}
.eq span:nth-child(3) {
  --eq-rest: 0.4;
  animation-delay: -0.4s;
}
.eq span:nth-child(4) {
  --eq-rest: 0.7;
  animation-delay: -0.95s;
}

@keyframes eq-bounce {
  0% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(0.9);
  }
  100% {
    transform: scaleY(var(--eq-rest, 0.6));
  }
}

.mock-schedule {
  padding: 1.1rem 1.1rem 0.6rem;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

.mock-chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 198, 174, 0.14);
  color: var(--teal-light);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
}

.mock-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mock-rows li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.15rem 0.75rem;
  padding: 0.65rem 0.5rem;
  border-top: 1px solid var(--line);
}

.mock-rows li:first-child {
  border-top: 0;
}

.mock-rows .is-now {
  margin-inline: -0.5rem;
  padding-inline: 1rem;
  border-radius: 12px;
  border-top-color: transparent;
  background: rgba(136, 67, 219, 0.16);
}

.mock-rows .is-now + li {
  border-top-color: transparent;
}

.mock-time {
  grid-row: span 2;
  color: var(--subtle);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.mock-row-title {
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mock-row-kind {
  color: var(--subtle);
  font-size: 0.75rem;
}

@media (min-width: 960px) {
  .hero-visual {
    margin-inline: auto 0;
  }

  .mock-player {
    transform: translateX(-1.5rem) rotate(-1.5deg);
  }

  .mock-schedule {
    transform: translateX(1rem);
  }
}

/* Platform availability: non-interactive "coming soon" badges (not links) */
.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.625rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 340px) {
  .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 28rem;
  }
}

@media (min-width: 720px) {
  .platforms.is-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
  }
}

.platforms.is-center {
  margin-inline: auto;
}

.platform-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  min-height: 3.5rem;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(42, 38, 50, 0.6);
  color: var(--text);
  text-align: left;
  cursor: default;
  user-select: none;
}

@media (min-width: 340px) and (max-width: 419px) {
  .platform-btn {
    padding-inline: 0.85rem;
  }

  .platform-btn svg {
    display: none;
  }
}

.platform-btn svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.platform-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.platform-soon {
  color: var(--teal-light);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
}

.platform-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* 7. Spotlight: "A tua Audissey" */
.spotlight {
  isolation: isolate;
  overflow: hidden;
}

.spotlight-inner {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .spotlight-inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

.magic-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.5rem;
  min-height: 20rem;
  padding: 2.5rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: radial-gradient(
      60% 55% at 30% 35%,
      rgba(136, 67, 219, 0.5),
      rgba(136, 67, 219, 0) 70%
    ),
    radial-gradient(
      55% 50% at 72% 70%,
      rgba(0, 198, 174, 0.3),
      rgba(0, 198, 174, 0) 70%
    ),
    var(--card);
  text-align: center;
}

.magic-stage::before {
  content: '';
  position: absolute;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(246, 243, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(246, 243, 255, 0.025),
    0 0 0 5rem rgba(246, 243, 255, 0.02);
}

.magic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-700) 100%
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 18px 50px -10px rgba(136, 67, 219, 0.75),
    0 0 60px -6px rgba(0, 198, 174, 0.45);
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  font-weight: 700;
  /* Finite (WCAG 2.2.2): two soft pulses (4 s), ending at scale(1). */
  animation: magic-pulse 2s ease-in-out 2;
}

.magic-btn svg {
  width: 22px;
  height: 22px;
  color: var(--teal-light);
}

@keyframes magic-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

.magic-caption {
  position: relative;
  max-width: 18rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(42, 38, 50, 0.7);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

.spotlight-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.spotlight-copy .chips-label {
  margin: 1.75rem 0 0;
  color: var(--text);
  font-weight: 600;
}

.checks {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 2rem;
  color: var(--text);
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(0, 198, 174, 0.16);
}

.checks li::after {
  content: '';
  position: absolute;
  left: 0.44rem;
  top: calc(0.2em + 0.28rem);
  width: 0.36rem;
  height: 0.6rem;
  border: solid var(--teal-light);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 8. Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(42, 38, 50, 0.92),
    rgba(39, 37, 46, 0.7)
  );
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(136, 67, 219, 0.18);
  color: var(--primary-200);
}

.feature:nth-child(even) .feature-icon {
  background: rgba(0, 198, 174, 0.14);
  color: var(--teal-light);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature h3,
.where h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.feature p,
.where p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96875rem;
}

/* 9. Platforms ("Onde quiseres"), lusophone band and final CTA */
.where-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .where-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .where-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.where {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.where::before {
  content: '';
  position: absolute;
  inset: -40% -40% auto auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(136, 67, 219, 0.22),
    rgba(136, 67, 219, 0)
  );
  pointer-events: none;
}

.where:nth-child(even)::before {
  background: radial-gradient(
    closest-side,
    rgba(0, 198, 174, 0.16),
    rgba(0, 198, 174, 0)
  );
}

.where-icon {
  position: relative;
  width: 32px;
  height: 32px;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.where-devices {
  position: relative;
  margin: 0 0 0.6rem;
  color: var(--teal-light);
  font-size: 0.875rem;
  font-weight: 600;
}

.where p:not(.where-devices) {
  position: relative;
}

.availability-note {
  margin: 2rem 0 0;
  color: var(--subtle);
  font-size: 0.9375rem;
  text-align: center;
}

.lusophone {
  isolation: isolate;
  overflow: hidden;
}

.lusophone-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .lusophone-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.lusophone-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.spotlight-copy .eyebrow,
.lusophone-copy .eyebrow {
  margin: 0 0 0.9rem;
  color: var(--teal-light);
  font-size: 0.8125rem;
}

.countries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 0.625rem;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(39, 37, 46, 0.75);
  list-style: none;
}

.countries li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(42, 38, 50, 0.9);
  font-weight: 500;
}

.country-code {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 1.6rem;
  border-radius: 6px;
  background: rgba(136, 67, 219, 0.2);
  color: var(--primary-200);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.countries li:nth-child(even) .country-code {
  background: rgba(0, 198, 174, 0.14);
  color: var(--teal-light);
}

.cta {
  padding-top: 0;
}

.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 2rem + 4vw, 5rem) clamp(1.25rem, 1rem + 3vw, 4rem);
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background: radial-gradient(
      55% 80% at 15% 0%,
      rgba(136, 67, 219, 0.45),
      rgba(136, 67, 219, 0) 70%
    ),
    radial-gradient(
      50% 80% at 90% 100%,
      rgba(0, 198, 174, 0.28),
      rgba(0, 198, 174, 0) 70%
    ),
    var(--card);
  text-align: center;
}

.cta-card h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
}

.cta-card .section-intro {
  max-width: 38rem;
  margin-inline: auto;
}

.cta-contact {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* 10. Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #120f17;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

.footer-brand img {
  width: auto;
  height: 22px;
  margin-bottom: 0.75rem;
}

.footer-brand p,
.footer-contact,
.footer-meta {
  margin: 0;
}

.footer-nav ul {
  gap: 0.25rem 0;
}

.footer-nav li + li::before {
  content: '·';
  content: '·' / '';
  padding-inline: 0.6rem;
  color: var(--subtle);
}

.footer-nav a,
.footer-contact a {
  color: var(--text);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--primary-200);
  text-decoration: underline;
}

.footer-nav a[aria-current] {
  color: var(--teal-light);
}

.footer-meta {
  color: var(--subtle);
  font-size: 0.875rem;
}

.footer-meta span + span::before {
  content: '·';
  content: '·' / '';
  padding-inline: 0.5rem;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.2fr auto;
    align-items: start;
    column-gap: 3rem;
  }

  .footer-nav,
  .footer-contact {
    grid-column: 2;
    justify-self: end;
  }

  .footer-brand {
    grid-row: span 2;
  }

  .footer-meta {
    grid-column: 1 / -1;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
  }
}

/* 11. Legal pages — long-form reading. Content fragments are injected as <article> inside main.legal */
.legal {
  width: min(100% - 2 * var(--gutter), 72ch);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem)
    clamp(3.5rem, 3rem + 4vw, 6rem);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.legal article {
  overflow-wrap: break-word;
}

.legal h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.legal h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
}

.legal h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
}

.legal [id] {
  scroll-margin-top: 1rem;
}

.legal p,
.legal ul,
.legal ol,
.legal dl,
.legal address,
.legal .callout,
.legal .table-wrap {
  margin: 0 0 1.15rem;
}

.legal ul,
.legal ol {
  padding-left: 1.4em;
}

.legal li {
  margin-bottom: 0.45rem;
  padding-left: 0.2em;
}

.legal li > ul,
.legal li > ol {
  margin: 0.45rem 0 0;
}

.legal ul > li::marker {
  color: var(--teal-light);
}

.legal ol > li::marker {
  color: var(--primary-200);
  font-weight: 600;
}

.legal a {
  color: var(--primary-light);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

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

.legal strong {
  color: var(--text-strong);
  font-weight: 600;
}

.legal em {
  font-style: italic;
}

.legal code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.legal dt {
  color: var(--text-strong);
  font-weight: 600;
}

.legal dd {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.legal hr {
  height: 0;
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.legal address {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card);
  font-style: normal;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal .legal-meta {
  margin-bottom: 2rem;
}

.legal-toc {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.legal-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  letter-spacing: 0;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.legal-toc li {
  margin-bottom: 0.3rem;
}

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

.legal-toc a:hover {
  color: var(--primary-200);
  text-decoration: underline;
}

.callout {
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(0, 198, 174, 0.35);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: rgba(0, 198, 174, 0.08);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.legal .table-wrap table {
  min-width: 34rem;
  margin: 0;
}

.legal table {
  width: 100%;
  margin: 0 0 1.15rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.legal caption {
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: left;
}

.legal th,
.legal td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal thead th {
  background: var(--surface);
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

.legal tbody th {
  color: var(--text-strong);
  font-weight: 600;
}

.legal tbody tr:last-child th,
.legal tbody tr:last-child td {
  border-bottom: 0;
}

/* 12. 404 */
.notfound {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 60vh;
  padding-block: var(--section-space);
  text-align: center;
}

.notfound-code {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 6vw, 7rem);
  font-weight: 800;
  line-height: 1;
}

.notfound h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
}

.notfound-en {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.6em;
  font-weight: 600;
}

.notfound p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.notfound-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #7a3bc5;
  color: var(--text-strong);
}

.button.is-ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
}

.button.is-ghost:hover {
  background: var(--surface);
}

/* Motion & accessibility preferences */
/* Smooth in-page scrolling only after interaction (:focus-within): a global
   `scroll-behavior: smooth` makes Chromium drop the initial #fragment scroll
   when a page is opened from another page (e.g. /privacidade/ -> /#funcionalidades). */
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

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

  .eq span {
    transform: scaleY(0.6);
  }
}

@media (forced-colors: active) {
  .platform-btn,
  .feature,
  .where,
  .mock-card,
  .countries,
  .cta-card,
  .callout,
  .legal-toc {
    border: 1px solid CanvasText;
  }

  .text-gradient {
    color: CanvasText;
    background: none;
  }
}

@media print {
  :root {
    --text: #000;
    --text-strong: #000;
    --muted: #222;
    --subtle: #444;
    --primary-light: #000;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .skip-link,
  .haze,
  .site-footer .footer-nav {
    display: none;
  }

  .legal {
    width: 100%;
    padding: 0;
  }

  .legal a::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
  }

  .legal-toc,
  .callout,
  .legal address,
  .legal thead th {
    background: none;
  }
}
