/* ==========================================================================
   Velune · site design system
   Brand: teal-blue #0EA5E9 (matches the app's primary token)
   Light/dark via prefers-color-scheme. Motion gated by prefers-reduced-motion.
   ========================================================================== */

:root {
  --brand: #0ea5e9;
  --brand-dark: #0284c7;
  --brand-soft: rgba(14, 165, 233, 0.12);
  --brand-glow: rgba(14, 165, 233, 0.35);

  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --surface: rgba(255, 255, 255, 0.72);
  --card: #ffffff;
  --text-high: #0f172a;
  --text-mid: rgba(15, 23, 42, 0.74);
  --text-low: rgba(15, 23, 42, 0.55);
  --outline: rgba(15, 23, 42, 0.08);
  --shadow: 0 8px 30px rgba(2, 32, 71, 0.08);
  --shadow-lift: 0 16px 44px rgba(2, 32, 71, 0.14);

  --radius: 20px;
  --radius-sm: 12px;
  --max-w: 1100px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --bg-soft: #19191c;
    --surface: rgba(24, 24, 28, 0.72);
    --card: #1d1d21;
    --text-high: rgba(255, 255, 255, 0.92);
    --text-mid: rgba(255, 255, 255, 0.72);
    --text-low: rgba(255, 255, 255, 0.55);
    --outline: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 16px 44px rgba(0, 0, 0, 0.55);
  }
}

/* Base ------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text-high);
  line-height: 1.65;
  font-size: 16.5px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  vertical-align: middle;
}

::selection {
  background: var(--brand-soft);
}

/* Language toggle visibility --------------------------------------------- */

html[data-lang="pt"] .lang-en {
  display: none !important;
}

html[data-lang="en"] .lang-pt {
  display: none !important;
}

/* Layout helpers ---------------------------------------------------------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section.tight {
  padding: 64px 0;
}

/* Nav ---------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--outline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text-high);
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-mid);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text-high);
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav-links a.nav-anchor {
    display: none;
  }
}

/* Language toggle pill */

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 3px;
  background: var(--bg-soft);
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-low);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  /* Comfortable touch target — on mobile this is the main nav control once the
     anchor links collapse (≤640px). */
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}

@media (max-width: 640px) {
  .lang-toggle button {
    min-height: 40px;
    padding: 9px 16px;
  }
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}

/* Logo mark ----------------------------------------------------------------- */

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  box-shadow: 0 4px 14px var(--brand-glow);
  flex: none;
}

/* Hero ----------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
}

.hero-blob {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 130%;
  background:
    radial-gradient(
      42% 52% at 28% 36%,
      var(--brand-soft) 0%,
      transparent 100%
    ),
    radial-gradient(
      36% 48% at 78% 24%,
      rgba(14, 165, 233, 0.08) 0%,
      transparent 100%
    );
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-blob {
    animation: blob-drift 26s ease-in-out infinite alternate;
  }

  @keyframes blob-drift {
    from {
      transform: translate3d(-2%, 0, 0) scale(1);
    }
    to {
      transform: translate3d(2%, 3%, 0) scale(1.06);
    }
  }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero .lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-mid);
  margin: 0 0 34px;
  max-width: 34em;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.play-badge img {
  height: 60px;
  width: auto;
  transition: transform 0.3s var(--ease);
}

.play-badge:hover img {
  transform: translateY(-2px) scale(1.02);
}

/* Placeholder shown until the app is published on Google Play.
   Uses currentColor so it reads on both the light hero and the teal CTA band. */
.coming-soon {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid currentColor;
  opacity: 0.8;
}

.hero-note {
  font-size: 13.5px;
  color: var(--text-low);
  margin-top: 14px;
}

/* CSS phone mockup ------------------------------------------------------------ */

.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  width: 264px;
  height: 540px;
  border-radius: 40px;
  border: 1px solid var(--outline);
  background: var(--card);
  box-shadow: var(--shadow-lift);
  padding: 14px;
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: phone-float 7s ease-in-out infinite alternate;
  }

  @keyframes phone-float {
    from {
      transform: translateY(0) rotate(-0.6deg);
    }
    to {
      transform: translateY(-12px) rotate(0.6deg);
    }
  }
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
}

.phone-header {
  height: 86px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: flex;
  align-items: flex-end;
  padding: 0 16px 12px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.phone-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-card {
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--outline);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.phone-lines {
  flex: 1;
}

.phone-line {
  height: 8px;
  border-radius: 4px;
  background: var(--outline);
  margin: 5px 0;
}

.phone-line.short {
  width: 55%;
}

.phone-chartbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 74px;
  padding: 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--outline);
}

.phone-chartbar i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-soft) 100%);
  opacity: 0.85;
}

/* Brand showcase ------------------------------------------------------------ */

.showcase {
  /* Sit snugly under the hero, with breathing room before the features. */
  padding: 8px 0 24px;
}

.showcase-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-lift);
  padding: clamp(10px, 1.8vw, 18px);
  overflow: hidden;
}

.showcase-img {
  display: block;
  width: 100%;
  height: auto;
  /* Reserve space up-front (matches the asset) so there's no layout shift, and
     show the whole graphic — never crop important parts. */
  aspect-ratio: 1794 / 876;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

/* Section headings ------------------------------------------------------------ */

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
}

.section .sub {
  color: var(--text-mid);
  max-width: 38em;
  margin: 0 0 48px;
}

/* Feature grid ------------------------------------------------------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 880px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--outline));
}

.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 21px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--text-mid);
}

/* CTA band ------------------------------------------------------------------------ */

.cta-band {
  background:
    radial-gradient(
      90% 140% at 50% -20%,
      rgba(255, 255, 255, 0.18) 0%,
      transparent 60%
    ),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: calc(var(--radius) + 8px);
  color: #fff;
  text-align: center;
  padding: 64px 32px;
  box-shadow: 0 24px 60px var(--brand-glow);
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 10px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 30px;
  max-width: 36em;
}

/* Footer ----------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--outline);
  padding: 44px 0 56px;
  margin-top: 96px;
  font-size: 14.5px;
  color: var(--text-low);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text-mid);
}

.footer a:hover {
  color: var(--brand);
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

/* Legal / article pages ---------------------------------------------------------------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 32px;
}

.article h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 6px;
}

.article .meta {
  color: var(--text-low);
  font-size: 14px;
  margin-bottom: 36px;
}

.article h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 38px 0 10px;
}

.article p,
.article li {
  color: var(--text-mid);
}

.article ul {
  padding-left: 22px;
}

.article strong {
  color: var(--text-high);
}

/* Scroll-reveal animation ------------------------------------------------------------------ */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.7s var(--ease),
      transform 0.7s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  /* Hero entrance */
  .enter {
    opacity: 0;
    transform: translateY(18px);
    animation: enter-up 0.85s var(--ease) forwards;
    animation-delay: var(--enter-delay, 0s);
  }

  @keyframes enter-up {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Buttons --------------------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  box-shadow: 0 10px 26px var(--brand-glow);
}

.button:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px var(--brand-glow);
}

.button:focus-visible,
.lang-toggle button:focus-visible,
.nav-brand:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 3px;
}

/* Verification page ----------------------------------------------------------------------------- */

.verify-section {
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.verify-section::before,
.not-found-section::before {
  content: "";
  position: absolute;
  inset: -18% -18% auto -18%;
  height: 70%;
  background:
    radial-gradient(
      42% 52% at 25% 20%,
      var(--brand-soft) 0%,
      transparent 100%
    ),
    radial-gradient(
      35% 42% at 78% 18%,
      rgba(20, 184, 166, 0.1) 0%,
      transparent 100%
    );
  pointer-events: none;
  z-index: 0;
}

.verify-section > .container,
.not-found-section > .container {
  position: relative;
  z-index: 1;
}

.verify-page-head {
  max-width: 760px;
  margin-bottom: 44px;
}

.verify-page-head h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 0 0 16px;
}

.verify-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: start;
  gap: 24px;
}

.verify-card,
.verify-disclaimer {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

.verify-card {
  min-height: 340px;
  padding: clamp(24px, 4vw, 36px);
}

/*
 * Honor the [hidden] attribute even when a state has its own `display` rule
 * (e.g. .verify-loading uses display: grid). Without this, toggling `hidden`
 * in JS would not hide the loading spinner once the result is shown.
 */
.verify-state[hidden] {
  display: none;
}

.verify-state h2 {
  margin: 16px 0 10px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.verify-copy,
.verify-state p {
  color: var(--text-mid);
  margin: 0;
}

.verify-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.verify-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.verify-status.valid {
  color: #075985;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.24);
}

.verify-status.invalid {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.11);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.verify-status.neutral {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.verify-status-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  font-size: 21px;
  font-weight: 900;
}

.verify-status-mark.valid {
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, var(--brand));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.18);
}

.verify-status-mark.invalid {
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.16);
}

.verify-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.verify-field {
  min-width: 0;
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  background: var(--bg-soft);
}

.verify-field dt {
  color: var(--text-low);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.verify-field dd {
  margin: 0;
  color: var(--text-high);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.verify-disclaimer {
  padding: 24px;
  color: var(--text-mid);
}

.verify-disclaimer h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.verify-disclaimer p {
  margin: 0;
  color: var(--text-mid);
  font-size: 14.5px;
}

.verify-loading {
  display: grid;
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.verify-loading h2,
.verify-loading p {
  margin-left: auto;
  margin-right: auto;
}

.verify-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  margin-bottom: 16px;
  animation: verify-spin 0.85s linear infinite;
}

@keyframes verify-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 404 ------------------------------------------------------------------------------------------ */

.not-found-section {
  position: relative;
  overflow: hidden;
  padding-top: 72px;
  padding-bottom: 56px;
}

.not-found-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  min-height: min(620px, calc(100vh - 240px));
}

.not-found-art-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.not-found-art-wrap::before {
  content: "";
  position: absolute;
  inset: 9% 4% 7%;
  border-radius: 999px;
  background:
    radial-gradient(
      58% 60% at 50% 48%,
      rgba(14, 165, 233, 0.18) 0%,
      rgba(14, 165, 233, 0.08) 48%,
      transparent 72%
    ),
    radial-gradient(
      42% 42% at 68% 25%,
      rgba(20, 184, 166, 0.14) 0%,
      transparent 72%
    );
  filter: blur(6px);
  pointer-events: none;
}

.not-found-art {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 390px);
  max-height: min(46vh, 420px);
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(2, 32, 71, 0.1));
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    #000 66%,
    rgba(0, 0, 0, 0.78) 82%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse at center,
    #000 66%,
    rgba(0, 0, 0, 0.78) 82%,
    transparent 100%
  );
}

.not-found-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.not-found-copy p {
  max-width: 34em;
  color: var(--text-mid);
  margin: 0 0 28px;
  font-size: clamp(16.5px, 2vw, 18px);
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  .verify-status.valid {
    color: #7dd3fc;
  }

  .verify-status.invalid {
    color: #fda4af;
  }

  .verify-status.neutral {
    color: #7dd3fc;
  }

  .not-found-art {
    filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.26));
  }
}

@media (max-width: 880px) {
  .verify-grid,
  .not-found-layout {
    grid-template-columns: 1fr;
  }

  .verify-page-head {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .verify-page-head .kicker,
  .not-found-copy .kicker {
    margin-left: auto;
    margin-right: auto;
  }

  .not-found-layout {
    text-align: center;
    min-height: 0;
  }

  .not-found-copy {
    order: 2;
  }

  .not-found-art-wrap {
    min-height: 260px;
  }

  .not-found-copy p {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 620px) {
  .verify-section,
  .not-found-section {
    padding-top: 54px;
  }

  .verify-card,
  .verify-disclaimer {
    border-radius: var(--radius);
  }

  .verify-card {
    padding: 22px;
  }

  .verify-result-head {
    align-items: flex-start;
  }

  .verify-fields {
    grid-template-columns: 1fr;
  }

  .not-found-art-wrap {
    min-height: 220px;
  }

  .not-found-art {
    width: min(100%, 300px);
    max-height: 31vh;
  }
}
