/* ============================================
   ALGARVE AL COMPLIANCE — Design System
   Concept: Vibrant Cyan + Lime — Algarve-Staff inspired
   Palette: Cyan primary, lime accent, white surfaces
   ============================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 6.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;

  /* Fonts */
  --font-display: 'General Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-script: 'Caveat', cursive;
}

/* LIGHT THEME (default) */
:root,
[data-theme='light'] {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #F4FAFD;
  --color-surface-offset: #F4FAFD;
  --color-surface-offset-2: #F7FBE8;
  --color-divider: #E1E8EC;
  --color-border: #D4DFE5;

  --color-text: #0F1A2E;
  --color-text-muted: #5A6B7E;
  --color-text-faint: #94A3B5;
  --color-text-inverse: #ffffff;

  /* Primary — Cyan */
  --color-primary: #00B4E6;
  --color-primary-hover: #0096C7;
  --color-primary-active: #0077A3;
  --color-primary-highlight: #E6F8FE;

  /* Accent — Lime */
  --color-accent: #5BC83C;
  --color-accent-hover: #4DAF31;
  --color-accent-active: #3F9128;
  --color-accent-highlight: #ECFAE3;

  /* Status colors */
  --color-success: #5BC83C;
  --color-success-bg: #ECFAE3;
  --color-warning: #F59E0B;
  --color-warning-bg: #FEF3C7;
  --color-error: #DC2626;
  --color-error-bg: #FEE2E2;
  --color-info: #00B4E6;
  --color-info-bg: #E6F8FE;

  --shadow-sm: 0 1px 3px rgba(0, 180, 230, 0.08), 0 1px 2px rgba(15, 26, 46, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 180, 230, 0.08), 0 4px 12px rgba(15, 26, 46, 0.04);
  --shadow-lg: 0 4px 8px rgba(0, 180, 230, 0.10), 0 12px 32px rgba(15, 26, 46, 0.08);
}

/* DARK THEME */
[data-theme='dark'] {
  --color-bg: #0a111e;
  --color-surface: #0f1a2e;
  --color-surface-2: #132030;
  --color-surface-offset: #111824;
  --color-surface-offset-2: #131e18;
  --color-divider: #1e2d40;
  --color-border: #26394f;

  --color-text: #E8F4FA;
  --color-text-muted: #8BA4B8;
  --color-text-faint: #4A6070;
  --color-text-inverse: #0F1A2E;

  --color-primary: #00C8FF;
  --color-primary-hover: #00B4E6;
  --color-primary-active: #0096C7;
  --color-primary-highlight: #0a2030;

  --color-accent: #6EDB4A;
  --color-accent-hover: #5BC83C;
  --color-accent-active: #4DAF31;
  --color-accent-highlight: #0e2010;

  --color-success: #6EDB4A;
  --color-success-bg: #0e2010;
  --color-warning: #FBBF24;
  --color-warning-bg: #2d1e04;
  --color-error: #F87171;
  --color-error-bg: #2a0e0e;
  --color-info: #00C8FF;
  --color-info-bg: #0a2030;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a111e;
    --color-surface: #0f1a2e;
    --color-surface-2: #132030;
    --color-surface-offset: #111824;
    --color-surface-offset-2: #131e18;
    --color-divider: #1e2d40;
    --color-border: #26394f;
    --color-text: #E8F4FA;
    --color-text-muted: #8BA4B8;
    --color-text-faint: #4A6070;
    --color-text-inverse: #0F1A2E;
    --color-primary: #00C8FF;
    --color-primary-hover: #00B4E6;
    --color-primary-active: #0096C7;
    --color-primary-highlight: #0a2030;
    --color-accent: #6EDB4A;
    --color-accent-hover: #5BC83C;
    --color-accent-active: #4DAF31;
    --color-accent-highlight: #0e2010;
    --color-success: #6EDB4A;
    --color-success-bg: #0e2010;
    --color-warning: #FBBF24;
    --color-warning-bg: #2d1e04;
    --color-error: #F87171;
    --color-error-bg: #2a0e0e;
    --color-info: #00C8FF;
    --color-info-bg: #0a2030;
  }
}

/* ============================================
   BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
  max-width: 65ch;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

a:hover {
  color: var(--color-accent);
}

::selection {
  background: var(--color-accent-highlight);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-8));
}

.container--wide {
  max-width: var(--content-wide);
}

.container--narrow {
  max-width: var(--content-narrow);
}

section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

[data-theme='dark'] .header {
  background: rgba(10, 17, 30, 0.9);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-8));
  max-width: var(--content-wide);
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary);
}

.logo svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

/* ===== Option C wordmark ===== */
.logo--c {
  gap: 12px;
  text-decoration: none;
}
.logo--c .logo__mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #00B4E6 0%, #00B4E6 50%, #5BC83C 50%, #5BC83C 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 180, 230, .25);
  position: relative;
}
.logo--c .logo__mark span {
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.4px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  line-height: 1;
}
.logo--c .logo__name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 3px;
}
.logo--c .logo__top {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--color-primary, #0E2235);
  letter-spacing: -.3px;
}
.logo--c .logo__sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 9px;
  color: var(--color-text-muted, #5b6b7e);
  text-transform: uppercase;
  letter-spacing: .14em;
}
@media (max-width: 640px) {
  .logo--c .logo__sub { display: none; }
  .logo--c .logo__top { font-size: 15px; }
  .logo--c .logo__mark { width: 38px; height: 38px; }
  .logo--c .logo__mark span { font-size: 12px; }
}
[data-theme="dark"] .logo--c .logo__top { color: #fff; }
[data-theme="dark"] .logo--c .logo__sub { color: rgba(255,255,255,.6); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }
}

.nav__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

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

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-interactive);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--color-accent);
  color: #0F1A2E;
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  color: #0F1A2E;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Lime CTA button (same as accent, alias for clarity) */
.btn--lime {
  background: var(--color-accent);
  color: #0F1A2E;
}

.btn--lime:hover {
  background: var(--color-accent-hover);
  color: #0F1A2E;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--ghost:hover {
  border-color: var(--color-primary-hover);
  color: var(--color-primary-hover);
  background: var(--color-primary-highlight);
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, var(--color-accent-highlight) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, var(--color-primary-highlight) 0%, transparent 50%);
  opacity: 0.5;
  z-index: -1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.hero__badge::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.hero__title {
  font-size: var(--text-2xl);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: var(--space-6);
  max-width: 18ch;
}

.hero__title em {
  font-style: italic;
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 56ch;
  font-family: var(--font-body);
  font-weight: 400;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.countdown__label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  border-right: 1px solid var(--color-divider);
}

.countdown__label strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-accent);
  font-weight: 700;
  margin-top: var(--space-1);
  text-transform: none;
  letter-spacing: 0;
}

.countdown__units {
  display: flex;
  gap: var(--space-1);
}

.countdown__unit {
  text-align: center;
  padding: var(--space-2) var(--space-3);
  min-width: 4rem;
}

.countdown__num {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  color: var(--color-primary);
}

.countdown__unit-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}

@media (max-width: 540px) {
  .countdown__label {
    border-right: 0;
    border-bottom: 1px solid var(--color-divider);
    width: 100%;
  }
  .countdown__units {
    width: 100%;
    justify-content: space-around;
  }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto var(--space-12);
}

.section-header__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-header__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.section-header__subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-inline: auto;
}

/* ============================================
   PROBLEM / FEATURE GRID
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.feature-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.feature-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
}

.feature-card__body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ============================================
   COMPLIANCE STACK TABLE
   ============================================ */
.stack {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stack__row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  align-items: center;
}

.stack__row:last-child {
  border-bottom: 0;
}

.stack__row--head {
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

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

.stack__obligation small {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.stack__cadence {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.stack__included {
  text-align: right;
}

.stack__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--color-success-bg);
  color: var(--color-success);
  border-radius: var(--radius-full);
}

@media (max-width: 720px) {
  .stack__row {
    grid-template-columns: 1fr auto;
  }
  .stack__cadence {
    display: none;
  }
}

/* ============================================
   PRICING
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 1100px;
  margin-inline: auto;
}

.price-card {
  position: relative;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.price-card--featured {
  border-color: var(--color-accent);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .price-card--featured {
    transform: none;
  }
}

.price-card__ribbon {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.price-card__name {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.price-card__tag {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  min-height: 2.5em;
}

.price-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.price-card__currency {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-weight: 500;
}

.price-card__amount {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--color-primary);
  font-weight: 600;
}

.price-card__period {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.price-card__features {
  list-style: none;
  margin-bottom: var(--space-8);
  flex-grow: 1;
}

.price-card__features li {
  display: flex;
  gap: var(--space-2);
  padding-block: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
}

.price-card__features li:last-child {
  border-bottom: 0;
}

.price-card__features svg {
  flex-shrink: 0;
  color: var(--color-success);
  margin-top: 0.2em;
}

.price-card .btn {
  width: 100%;
}

/* ============================================
   WAITING LIST FORM
   ============================================ */
.waitlist {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: clamp(var(--space-12), 8vw, var(--space-20));
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.waitlist::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(91, 200, 60, 0.2) 0%, transparent 50%);
  z-index: 0;
}

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

.waitlist h2 {
  color: var(--color-text-inverse);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.waitlist p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 auto var(--space-8);
  font-size: var(--text-base);
}

.waitlist__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: 500px;
  margin: 0 auto;
}

.waitlist__form input {
  flex: 1 1 220px;
  min-width: 0;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: var(--text-base);
}

.waitlist__form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.waitlist__form input:focus {
  background: rgba(255, 255, 255, 0.12);
  outline-color: var(--color-accent);
}

.waitlist__success {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  margin: 0 auto;
  max-width: 500px;
  color: #fff;
}

.waitlist__success.is-visible {
  display: block;
}

.waitlist__small {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  margin-top: var(--space-4);
  margin-inline: auto;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  max-width: 760px;
  margin-inline: auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-divider);
}

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: var(--space-5) 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.faq__question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--color-accent);
  font-weight: 300;
  transition: transform var(--transition-interactive);
  line-height: 1;
}

.faq__item[open] .faq__question::after {
  transform: rotate(45deg);
}

.faq__answer {
  padding-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 65ch;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
  background: var(--color-surface-offset);
  margin-top: var(--space-16);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

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

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.footer__tagline {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 38ch;
}

.footer__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
}

.footer__list {
  list-style: none;
}

.footer__list li {
  margin-bottom: var(--space-2);
}

.footer__list a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */
.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100dvh - 4rem);
  gap: 0;
}

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

.dash__sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-divider);
  padding: var(--space-6);
}

@media (max-width: 880px) {
  .dash__sidebar {
    display: none;
  }
}

.dash__sidebar h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  font-family: var(--font-body);
  font-weight: 700;
}

.dash__menu {
  list-style: none;
  margin-bottom: var(--space-8);
}

.dash__menu li {
  margin-bottom: var(--space-1);
}

.dash__menu a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.dash__menu a.is-active {
  background: var(--color-accent-highlight);
  color: var(--color-accent-active);
  font-weight: 600;
  border-left: 3px solid var(--color-accent);
  padding-left: calc(var(--space-3) - 3px);
}

.dash__menu a:hover {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.dash__menu a.is-active:hover {
  background: var(--color-accent-highlight);
  color: var(--color-accent-active);
}

.dash__main {
  padding: clamp(var(--space-6), 4vw, var(--space-12));
  min-width: 0;
}

.dash__header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}

.dash__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.dash__subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.dash__demo-banner {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}

.kpi:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.kpi__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

.kpi__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.kpi__delta {
  font-size: var(--text-xs);
  font-weight: 600;
}

.kpi__delta--up {
  color: var(--color-success);
}

.kpi__delta--down {
  color: var(--color-error);
}

/* Compliance status traffic lights */
.status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.status-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}

.status-card__title {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-text);
}

.status-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}

.status-row:last-child {
  border-bottom: 0;
}

@media (max-width: 720px) {
  .status-row {
    grid-template-columns: auto 1fr;
    grid-row-gap: var(--space-1);
  }
  .status-row__date,
  .status-row__action {
    grid-column: 2;
  }
}

.status-light {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  position: relative;
}

.status-light--green {
  background: var(--color-success);
  box-shadow: 0 0 0 4px var(--color-success-bg);
}

.status-light--amber {
  background: var(--color-warning);
  box-shadow: 0 0 0 4px var(--color-warning-bg);
}

.status-light--red {
  background: var(--color-error);
  box-shadow: 0 0 0 4px var(--color-error-bg);
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--color-error-bg);
  }
  50% {
    box-shadow: 0 0 0 7px var(--color-error-bg);
  }
}

.status-row__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.status-row__name small {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.status-row__date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.status-row__date strong {
  display: block;
  color: var(--color-text);
  font-weight: 600;
}

.status-row__action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  transition: all var(--transition-interactive);
}

.status-row__action:hover {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary-hover);
  color: var(--color-primary-hover);
}

/* Property table for partner portal */
.property-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.property-row {
  display: grid;
  grid-template-columns: 2fr 1fr repeat(5, 50px) 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}

.property-row:last-child {
  border-bottom: 0;
}

.property-row--head {
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.property-row__name {
  font-weight: 600;
  color: var(--color-text);
}

.property-row__name small {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.property-row__owner {
  color: var(--color-text-muted);
}

.property-row__cell {
  display: grid;
  place-items: center;
}

.property-row__overall {
  text-align: right;
  font-size: var(--text-xs);
  font-weight: 600;
}

.overall-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

.overall-badge--good {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.overall-badge--warn {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.overall-badge--bad {
  background: var(--color-error-bg);
  color: var(--color-error);
}

@media (max-width: 1080px) {
  .property-table {
    overflow-x: auto;
  }
  .property-row {
    min-width: 800px;
  }
}

/* ============================================
   DASHBOARD GREETING — SCRIPT FONT ACCENT
   ============================================ */
.dash__greeting {
  font-family: var(--font-script);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.2;
  display: block;
  margin-bottom: var(--space-1);
}

.dash__greeting .greeting__name {
  color: var(--color-primary);
  font-size: 1.8rem;
  font-weight: 700;
}

/* KPI value in primary color for compliance score */
.kpi__value--success {
  color: var(--color-success) !important;
}

/* Compliance progress ring / bar */
.compliance-ring-fill {
  stroke: var(--color-accent);
}

.compliance-ring-track {
  stroke: var(--color-divider);
}

/* Reveal on scroll — only animate when JS marks the page as JS-enabled.
   Default state is fully visible so sections render even if JS fails or
   the IntersectionObserver hasn't fired yet (e.g. in fullPage screenshots). */
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   LANGUAGE SWITCH (EN / PT flags)
   ============================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 34, 53, 0.05);
  border: 1px solid rgba(14, 34, 53, 0.08);
  margin-right: 0.25rem;
}
.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  font-family: var(--font-display, 'General Sans', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0E2235;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.lang-switch__btn:hover { background: rgba(0, 180, 230, 0.08); }
.lang-switch__btn.is-active {
  background: #fff;
  color: #00B4E6;
  box-shadow: 0 1px 3px rgba(14, 34, 53, 0.08);
}
.lang-switch__label { font-variant-numeric: tabular-nums; }

/* Flag pill */
.flag {
  display: inline-block;
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
/* UK flag — Union Jack via SVG data URI */
.flag--gb {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'><clipPath id='s'><path d='M0,0 v30 h60 v-30 z'/></clipPath><clipPath id='t'><path d='M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z'/></clipPath><g clip-path='url(%23s)'><path d='M0,0 v30 h60 v-30 z' fill='%23012169'/><path d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/><path d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/><path d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/><path d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/></g></svg>");
}
/* Portugal flag — green/red with armillary sphere simplified */
.flag--pt {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'><rect width='24' height='40' fill='%23006600'/><rect x='24' width='36' height='40' fill='%23ff0000'/><circle cx='24' cy='20' r='7' fill='%23ffff00' stroke='%23000' stroke-width='0.5'/><circle cx='24' cy='20' r='4' fill='%23fff' stroke='%23003366' stroke-width='0.5'/></svg>");
}

@media (max-width: 720px) {
  .lang-switch { margin-right: 0; }
  .lang-switch__btn { padding: 4px 8px 4px 5px; font-size: 11px; }
  .flag { width: 18px; height: 13px; }
}

/* Prevent nav links from wrapping (PT translations are longer) */
.nav__links a { white-space: nowrap; }
@media (max-width: 1100px) {
  .nav__links { gap: 0.85rem; }
  .nav__links a { font-size: 0.9rem; }
}

/* Prevent logo wordmark from wrapping at any size where it has room */
.logo--c .logo__top, .logo--c .logo__sub { white-space: nowrap; }
.logo--c { flex-shrink: 0; }
.header .btn { white-space: nowrap; flex-shrink: 0; }

/* On PT page or any narrower desktop, hide the logo subtitle earlier so wordmark stays on one line */
@media (max-width: 1200px) {
  .logo--c .logo__sub { display: none; }
}

/* Tighter header on intermediate widths to fit longer PT labels + CTA */
@media (max-width: 1280px) {
  .nav__links { gap: 0.7rem; }
  .nav__links a { font-size: 0.875rem; }
  .lang-switch { margin-right: 0; }
  .header .btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
  .logo--c .logo__top { font-size: 16px; }
}

/* ========================================
   MOBILE OVERFLOW GUARD (fixes side-wobble)
   ======================================== */
html, body { max-width: 100%; overflow-x: hidden; }

/* Compact header at phone sizes so logo + flags + CTA all fit inside 360-414px */
@media (max-width: 540px) {
  .header__inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .nav { gap: 8px; }
  .logo--c { gap: 8px; }
  .logo--c .logo__mark { width: 32px; height: 32px; }
  .logo--c .logo__mark span { font-size: 11px; }
  .logo--c .logo__top { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .logo--c .logo__sub { display: none; }

  /* Lang switch: flag only, drop EN/PT label to save width */
  .lang-switch__btn { padding: 3px 5px; gap: 0; }
  .lang-switch__label { display: none; }
  .flag { width: 18px; height: 13px; }

  /* Compact CTA */
  .header .btn { padding: 8px 12px; font-size: 12px; line-height: 1.1; }
}

@media (max-width: 380px) {
  .logo--c .logo__top { max-width: 92px; font-size: 12px; }
  .header .btn { padding: 7px 10px; font-size: 11px; }
}

@media (max-width: 360px) {
  .logo--c .logo__name { display: none; }   /* hide wordmark, keep AAL square only */
  .header__inner { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .lang-switch__btn { padding: 3px 4px; }
  .flag { width: 16px; height: 12px; }
  .header .btn { padding: 6px 9px; font-size: 11px; }
}

/* Long/short button label swap (used on PT page where label is long) */
.btn__short { display: none; }
@media (max-width: 540px) {
  .header .btn__long { display: none; }
  .header .btn__short { display: inline; }
}

/* ========================================
   DEEP MOBILE STABILITY (extra hardening)
   ======================================== */
@media (max-width: 540px) {
  /* No element may exceed viewport width */
  img, video, iframe, table, pre { max-width: 100%; height: auto; }

  /* Section + container constraints */
  section, header, footer, main, .container { max-width: 100vw; }
  .container { padding-left: 16px; padding-right: 16px; box-sizing: border-box; }

  /* Cards / grids never push out */
  .price-card, .ob-card, .faq__item, .hero, .trust-strip, .pricing-grid > * {
    max-width: 100%; box-sizing: border-box;
  }

  /* Long tokens (URLs, big numbers) wrap instead of forcing scroll */
  a, p, h1, h2, h3, h4, span, li { word-break: break-word; overflow-wrap: anywhere; }

  /* Trust strip wraps cleanly */
  .trust-strip__row { flex-wrap: wrap; }
}

/* Belt-and-braces: cap document scroll on every browser */
html { overflow-x: clip; }
body { position: relative; overflow-x: clip; }
