/* ---------- Design tokens ---------- */
:root {
  --slate: #2e3140;
  --sky: #b8c6e8;
  --deep-sky: #6f86c4;
  --light: #f2f3f7;
  --mint: #8fcfc7;
  --mint-deep: #2f6b63;
  --accent: #e8b95a;
  --danger: #d6483f;

  --bg: #ffffff;
  --bg-alt: var(--light);
  --surface: #ffffff;
  --ink: var(--slate);
  --ink-soft: #5b5f72;
  --border: #e3e6ef;
  --primary: var(--deep-sky);
  --primary-contrast: #ffffff;
  --shadow: 0 10px 30px rgba(46, 49, 64, 0.08);
  --shadow-sm: 0 2px 10px rgba(46, 49, 64, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Theme follows the device/browser setting only — no manual toggle, so this is the
   only place light/dark values are defined (no [data-theme] attribute variant). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171b21;
    --bg-alt: #10141a;
    --surface: #1f242c;
    --ink: #f2f3f7;
    --ink-soft: #b6bccb;
    --border: #2c323d;
    --primary: var(--sky);
    --primary-contrast: #10141a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Always visible by default (never animation-hidden on load) — an autoplaying keyframe
     fade-in was tried here and could get stuck frozen on its opening frame (opacity: 0) under
     throttling, leaving the page permanently blank. main.js fades the page OUT to this same
     opacity property just before a same-site navigation; the next page then simply appears at
     its normal opacity, which still reads as a smooth cross-page transition. */
  opacity: 1;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.18s ease;
}
/* Set synchronously by an inline script at the very top of <head> (before pt.json/en.json's
   fetch resolves), so a stored EN preference never flashes the PT fallback text baked into the
   HTML. i18n.js removes this class once translations are applied — see that file's loadLang().
   A <noscript> override and a JS-side timeout fallback both guard against this ever getting
   stuck hidden (e.g. scripts blocked, fetch failure). */
html.tc-i18n-loading body { opacity: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--primary); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 38px; width: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 15px;
}
.nav-links a { color: var(--ink-soft); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-contrast);
}

.nav-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
}
.header-cta { display: none; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .header-cta { display: inline-flex; }
}

/* Popover: absolutely positioned against .site-header (its nearest positioned ancestor, itself
   sticky) so opening it overlays the page instead of pushing content down in normal flow. */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
  z-index: 60;
}
.mobile-nav.open { display: block; }
.mobile-nav .container { height: auto; display: flex; flex-direction: column; padding: 16px 24px; gap: 4px; }
.mobile-nav a:not(.btn) {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:not(.btn):last-of-type { border-bottom: none; }
.mobile-nav-cta { margin-top: 12px; }
@media (min-width: 900px) {
  .mobile-nav { display: none !important; }
}

/* Dims the page behind the open mobile-nav popover; also doubles as a tap-to-close target.
   z-index must stay below .site-header's (50) — .site-header is its own stacking context, so
   .mobile-nav's z-index:60 only ranks it against its header siblings, not against this backdrop;
   if the backdrop's z-index exceeded the header's, it would paint over the whole header,
   popover included. */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 23, 0.45);
  z-index: 40;
}
body.nav-open .nav-backdrop { display: block; }
@media (min-width: 900px) {
  .nav-backdrop { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--sky) 35%, transparent), transparent 55%),
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--deep-sky) 30%, transparent), transparent 50%);
}
.hero .container {
  display: grid;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--deep-sky);
  background: color-mix(in srgb, var(--deep-sky) 22%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) {
  .eyebrow { color: var(--sky); }
}

.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero .subtitle {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.trust-badge { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.hero-visual { display: flex; justify-content: center; }

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: 240px;
  margin: 0 auto;
  border-radius: 34px;
  padding: 10px;
  background: var(--slate);
  box-shadow: var(--shadow);
}
.phone::before {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  z-index: 2;
}
.phone .screen {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 390 / 844;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.floating { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-head p { color: var(--ink-soft); font-size: 17px; }

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

/* Features */
.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 15px; }

/* Screenshots */
.screenshot-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  justify-items: center;
}
.screenshot-item { text-align: center; max-width: 260px; }
.screenshot-item p {
  margin-top: 18px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 14px;
}
@media (min-width: 720px) { .screenshot-grid { grid-template-columns: repeat(3, 1fr); } }

/* Below 720px: a swipeable, scroll-snapped carousel instead of a stack — main.js applies a
   scale/opacity/translateY parallax to items as they slide toward/away from center. */
@media (max-width: 719px) {
  .screenshot-grid {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 9%;
    margin: 0 -24px;
    padding: 10px 9% 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .screenshot-grid::-webkit-scrollbar { display: none; }
  .screenshot-item {
    flex: 0 0 82%;
    max-width: none;
    scroll-snap-align: center;
    transition: transform 0.08s linear, opacity 0.08s linear;
    will-change: transform, opacity;
  }
  .screenshot-item .phone { transition: transform 0.08s linear; will-change: transform; }
}

.carousel-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
@media (max-width: 719px) { .carousel-dots { display: flex; } }
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  transition: background-color 0.15s ease, width 0.15s ease;
}
.carousel-dot.active { background: var(--primary); width: 20px; }

/* Audience */
.audience-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .audience-grid { grid-template-columns: repeat(4, 1fr); } }
.audience-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
}
.audience-card .num {
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}
.audience-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.audience-card p { font-size: 14px; color: var(--ink-soft); }

/* Privacy / GDPR — deliberately given more visual weight than a plain section: a bordered,
   tinted card with a soft glow, so it reads as a standout trust signal, not just more copy. */
.privacy-panel {
  position: relative;
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow);
}
.privacy-panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.privacy-icon {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.privacy-icon svg { width: 28px; height: 28px; }
.privacy-panel h2 { position: relative; font-size: clamp(24px, 4vw, 30px); font-weight: 800; margin-bottom: 14px; }
.privacy-panel p { position: relative; color: var(--ink-soft); font-size: 16px; margin-bottom: 24px; }
.privacy-badges { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.privacy-badges span {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-contrast);
  background: var(--primary);
  padding: 8px 16px;
  border-radius: 999px;
}

/* CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate), var(--deep-sky) 65%, var(--sky));
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
  pointer-events: none;
}
.cta-mark-wrap {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.cta-mark { width: 60px; height: 60px; }
.cta-content { position: relative; }
.cta-banner h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; margin-bottom: 12px; }
.cta-banner p { opacity: 0.9; margin-bottom: 26px; font-size: 16px; }
.cta-banner .btn-primary { background: #ffffff; color: var(--deep-sky); }

@media (min-width: 720px) {
  .cta-banner {
    flex-direction: row;
    text-align: left;
    padding: 56px 60px;
    gap: 40px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg-alt);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand img { height: 32px; margin-bottom: 12px; }
.footer-brand p { color: var(--ink-soft); font-size: 14px; max-width: 32ch; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: var(--ink); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Contact page ---------- */
.contact-hero { padding: 56px 0 20px; text-align: center; }
.contact-hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; margin-bottom: 14px; }
.contact-hero p { color: var(--ink-soft); font-size: 17px; max-width: 52ch; margin: 0 auto; }

.contact-wrap { padding: 20px 0 90px; }
.contact-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 560px) {
  .form-row.two-col { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .req { color: var(--danger); }

.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.form-status.show { display: block; }
/* Solid backgrounds with white text, not a low-opacity tint — a tint composited over the card's
   own (theme-dependent) surface color made the text nearly illegible in dark mode. Fixed colors
   guarantee the same contrast regardless of theme. */
.form-status.success { background: #1f7a52; color: #ffffff; }
.form-status.error { background: var(--danger); color: #ffffff; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; }

@media (max-width: 899px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-ctas { justify-content: center; }
}
@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}
