﻿

@layer reset, tokens, base, layout, components, utilities;

/* —— Design tokens —— */
@layer tokens {
  :root {
    --green: #007aff;
    --green-bright: #04be02;
    --green-dark: #202124;
    --heading: #202124;
    --teal-cta: #007aff;
    --purple-cta: #5f6368;
    --text: #202124;
    --text-muted: #5f6368;
    --text-caption: #8e8e92;
    --text-link: #007aff;
    --surface: #ffffff;
    --surface-raised: #f5f8fa;
    --surface-top: #ffffff;
    --canvas: #f5f8fa;
    --canvas-desktop: #e8ecf0;
    --on-primary: #ffffff;
    --border-light: rgb(0 0 0 / 8%);
    --border-green: color-mix(in srgb, var(--green) 25%, transparent);
    --nav-pad-x: 0.625rem;
    --shell-max: 30.375rem;
    --header-z: 1100;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-soft: 0 4px 24px rgb(0 0 0 / 45%);
    --shadow-cta: 0 2px 12px rgb(0 0 0 / 50%);
    --focus-ring-color: var(--green-bright);
    --radius-md: 0.75rem;
    --fluid-xs: clamp(0.65rem, 2.4vw, 0.75rem);
    --fluid-sm: clamp(0.75rem, 2.8vw, 0.875rem);
    --fluid-base: clamp(0.875rem, 3.2vw, 1rem);
    --fluid-md: clamp(1rem, 3.6vw, 1.125rem);
    --fluid-lg: clamp(1.15rem, 4.5vw, 1.45rem);
    --fluid-xl: clamp(1.35rem, 5vw, 1.75rem);
    color-scheme: light;
  }
}

/* —— Reset —— */
@layer reset {
  :where(*, *::before, *::after) {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: clamp(15px, 3.8vw, 18px);
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

/* —— Base —— */
@layer base {
  body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fluid-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--canvas);
    padding-block-start: var(--site-header-h, 7.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

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

  a:any-link {
    color: var(--text-link);
    text-decoration: none;
  }

  :where(
    a,
    button,
    summary,
    input,
    select,
    textarea,
    [tabindex]:not([tabindex="-1"])
  ):focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  :where(button, .btn, .btn-cta, .site-nav__menu, .app-banner__close) {
    font: inherit;
  }
}

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

body.is-banner-hidden {
  --banner-h: 0;
}

body.nav-open {
  overflow: hidden;
}

/* —— Layout: header + shell share same width —— */
@layer layout {
  .site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: var(--header-z);
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: none;
  }

  .site-header__shell,
  .shell {
    width: 100%;
    max-width: var(--shell-max);
    margin-inline: auto;
  }

  .site-header__shell {
    pointer-events: auto;
    background: var(--surface-raised);
    box-shadow: var(--shadow-soft);
  }

  .shell {
    overflow-x: hidden;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-top) 100%);
    color: var(--text);
  }

  .landing__container {
    width: 100%;
    padding-inline: var(--nav-pad-x);
  }

  .prose {
    width: 100%;
  }

  .shell > .content-block {
    padding-inline: var(--nav-pad-x);
  }

  .shell > .content-block > .landing__container {
    padding-inline: 0;
  }

  @media (min-width: 768px) {
    body {
      background: var(--canvas-desktop);
    }

    .site-header__shell,
    .shell {
      box-shadow:
        0 0 0 1px var(--border-green),
        var(--shadow-soft);
    }

    .shell {
      background: var(--surface-top);
      min-height: calc(100vh - var(--site-header-h, 7.5rem));
    }
  }
}

/* —— Components —— */
@layer components {
  /* App banner */
  .app-banner {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: max(6px, env(safe-area-inset-top)) var(--nav-pad-x) 8px;
    padding-inline-start: calc(var(--nav-pad-x) + 42px);
    background: linear-gradient(90deg, #0c3d6b 0%, #14532d 100%);
    border-bottom: 1px solid var(--border-light);
    position: relative;
  }

  .app-banner.is-hidden {
    display: none;
  }

  .app-banner__close {
    position: absolute;
    inset-inline-start: var(--nav-pad-x);
    top: 50%;
    transform: translateY(-50%);
    margin-top: calc(env(safe-area-inset-top, 0px) / 4);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255 255 255 / 70%);
  }

  .app-banner__close:hover {
    background: rgb(255 255 255 / 35%);
  }

  .app-banner__close svg {
    width: 18px;
    height: 18px;
  }

  .app-banner__body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .app-banner__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .app-banner__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
  }

  .app-banner__text strong {
    font-weight: 700;
    font-size: var(--fluid-sm);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-banner__text span {
    font-size: var(--fluid-xs);
    color: rgb(255 255 255 / 88%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-banner__deco {
    font-size: var(--fluid-md);
    flex-shrink: 0;
    margin-inline-start: 2px;
  }

  .app-banner__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.35rem, 1.5vw, 0.45rem) clamp(0.75rem, 3vw, 0.9rem);
    margin-inline-start: 4px;
    font-size: var(--fluid-xs);
    font-weight: 700;
    color: var(--on-primary);
    background-color: var(--teal-cta);
    border-radius: 999px;
    box-shadow: var(--shadow-cta);
    white-space: nowrap;
  }

  /* Main nav */
  .site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px var(--nav-pad-x);
    min-height: 52px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-light);
  }

  .site-nav__menu {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  .site-nav__menu:hover {
    background: color-mix(in srgb, var(--green) 12%, transparent);
  }

  .site-nav__menu span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--green);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.nav-open .site-nav__menu span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  body.nav-open .site-nav__menu span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .site-nav__menu span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .site-nav__logo {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .site-nav__logo img {
    width: clamp(72px, min(52vw, calc(100vw - 14rem)), 220px);
    height: clamp(26px, 8vw, 40px);
    object-fit: contain;
    object-position: left center;
  }

  .site-nav__cta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.6rem, 2.2vw, 0.75rem);
    font-size: var(--fluid-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--on-primary);
    border-radius: var(--radius-md);
    white-space: nowrap;
    box-shadow: var(--shadow-cta);
    transition: opacity 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
  }

  .btn-cta:active {
    transform: scale(0.98);
  }

  .btn-cta--entrar {
    background: color-mix(in srgb, var(--green) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--green) 72%, transparent);
    color: #ffffff;
  }

  .btn-cta--registro {
    background: linear-gradient(135deg, var(--green), var(--green-bright));
    color: var(--on-primary);
  }

  .btn-cta--registro:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--green) 92%, #000), color-mix(in srgb, var(--green-bright) 92%, #000));
  }

  .btn-cta:hover {
    opacity: 0.92;
  }

  /* Nav drawer */
  .nav-drawer {
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
  }

  .nav-drawer::-webkit-scrollbar {
    width: 0;
  }

  .nav-drawer.is-open {
    display: block;
  }

  .nav-drawer__inner {
    padding: 8px var(--nav-pad-x) 14px;
  }

  .nav-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-drawer__list a {
    display: block;
    padding: 12px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s ease;
  }

  .nav-drawer__list a:hover {
    background: color-mix(in srgb, var(--green) 18%, var(--surface));
  }

  .nav-drawer__list a.is-current {
    background: color-mix(in srgb, var(--green) 28%, var(--surface));
    font-weight: 700;
  }

  .nav-drawer__list--flat {
    padding-top: 4px;
  }

  /* Hero */
  .hero-section {
    padding: 1.25rem 0 1.5rem;
  }

  .hero-section h1 {
    margin: 0 0 0.75rem;
    font-size: var(--fluid-xl);
    font-weight: 800;
    line-height: 1.2;
    color: var(--heading);
  }

  .hero-section p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  .hero-media {
    margin-top: 1rem;
    border-radius: 12px;
    max-width: 100%;
  }

  .hero-media img {
    width: 100%;
    object-fit: contain;
  }

  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
  }

  /* Content blocks */
  .content-block {
    padding: 1.25rem 0;
  }

  .content-block + .content-block {
    border-top: 1px solid var(--border-green);
  }

  .card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border-green);
    box-shadow: var(--shadow-soft);
  }

  .card h2 {
    margin: 0 0 0.65rem;
    font-size: var(--fluid-lg);
    font-weight: 800;
    color: var(--heading);
    line-height: 1.25;
  }

  .card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-dark);
  }

  .card p {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    text-align: left;
  }

  .card p:last-child {
    margin-bottom: 0;
  }

  .card--center {
    text-align: center;
  }

  .card--center p {
    text-align: center;
  }

  .game-shot {
    margin: 1rem 0;
    border-radius: 10px;
    max-width: 100%;
  }

  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: var(--fluid-sm);
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .btn-success,
  .btn-primary {
    color: var(--on-primary);
    box-shadow: var(--shadow-cta);
  }

  .btn-success {
    background-color: var(--green);
  }

  .btn-primary {
    background-color: var(--purple-cta);
  }

  .btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
  }

  .brazil-shimmer {
    position: relative;
    overflow: hidden;
  }

  .brazil-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      105deg,
      transparent 40%,
      rgb(255 255 255 / 25%) 50%,
      transparent 60%
    );
    animation: shimmer 2.5s ease-in-out infinite;
    pointer-events: none;
  }

  @keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }

  /* Brand promotion */
  .brand-promo__seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--green) 10%, var(--surface-raised));
    border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
    text-align: center;
  }

  .brand-promo__seal strong {
    font-size: var(--fluid-md);
    color: var(--green-dark);
  }

  .brand-promo__seal span {
    font-size: var(--fluid-xs);
    color: var(--text-muted);
  }

  .brand-promo__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
  }

  .brand-promo__logo {
    width: 96px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgb(0 0 0 / 12%));
  }

  .brand-promo__intro h2 {
    margin: 0 0 0.5rem;
    font-size: var(--fluid-lg);
    color: var(--green-dark);
  }

  .brand-promo__intro p {
    margin: 0;
    font-size: var(--fluid-sm);
    color: var(--text-muted);
    line-height: 1.6;
  }

  .brand-promo__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .brand-promo__figure {
    margin: 0;
    text-align: center;
  }

  .brand-promo__figure img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
  }

  .brand-promo__figure figcaption {
    margin-top: 0.5rem;
    font-size: var(--fluid-xs);
    color: var(--text-caption);
  }

  .brand-promo__pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .brand-promo__pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    text-align: center;
  }

  .brand-promo__pillar strong {
    font-size: var(--fluid-md);
    color: var(--green);
  }

  .brand-promo__pillar span {
    font-size: var(--fluid-xs);
    color: var(--text-muted);
  }

  @media (min-width: 640px) {
    .brand-promo__header {
      flex-direction: row;
      text-align: left;
      align-items: flex-start;
    }

    .brand-promo__grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .brand-promo__pillars {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  /* Inner page */
  .page-inner .hero-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .page-inner .hero-content h1 {
    margin: 0 0 0.65rem;
  }

  .page-inner .hero-content > p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.94rem;
  }

  .advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin: 0.75rem 0;
  }

  @media (min-width: 480px) {
    .advantages-grid {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
  }

  .advantage-card {
    background-color: var(--surface);
    border: 1px solid var(--border-green);
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: var(--shadow-soft);
  }

  .advantage-icon {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
  }

  .advantage-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-dark);
  }

  .advantage-description {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .advantage-list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
  }

  .advantage-list li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-inline-start: 1.15rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
  }

  .advantage-list li::before {
    content: "•";
    position: absolute;
    inset-inline-start: 0;
    color: var(--green);
  }

  /* Footer */
  .site-footer {
    padding: 1.5rem var(--nav-pad-x) 2rem;
    text-align: center;
    background: var(--surface-top);
    border-top: 1px solid var(--border-green);
  }

  .site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
  }

  .site-footer__links a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-link);
  }

  .footer-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .footer-cta img {
    width: 72px;
    height: auto;
  }

  .footer-cta h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--green-dark);
  }

  .footer-cta__text {
    margin: 0;
    max-width: 22rem;
    font-size: var(--fluid-sm);
    color: var(--text-muted);
    line-height: 1.5;
  }

  /* FAQ */
  .faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .faq-item {
    border: 1px solid var(--border-green);
    border-radius: 10px;
    background: color-mix(in srgb, var(--green) 8%, var(--surface));
    overflow: hidden;
  }

  .faq-item[open] {
    background-color: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .faq-item__q {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--green-dark);
    cursor: pointer;
    list-style: none;
    line-height: 1.35;
  }

  .faq-item__q::-webkit-details-marker {
    display: none;
  }

  .faq-item__q::marker {
    content: "";
  }

  .faq-item__q::after {
    content: "+";
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.2;
  }

  .faq-item[open] .faq-item__q::after {
    content: "−";
  }

  .faq-item__a {
    margin: 0;
    padding: 0.75rem 1rem 0.9rem;
    font-size: var(--fluid-sm);
    color: var(--text-muted);
    line-height: 1.55;
    border-block-start: 1px solid var(--border-green);
  }

  .faq-item__a a {
    color: var(--text-link);
    font-weight: 600;
  }
}

/* —— Utilities —— */
@layer utilities {
  .text-center {
    text-align: center;
  }

  .mb-4 {
    margin-bottom: 1rem;
  }

  .mb-5 {
    margin-bottom: 1.25rem;
  }

  .img-fluid {
    max-width: 100%;
    height: auto;
  }

  .animate-fade-in-up {
    animation: fadeUp 0.6s ease both;
  }

  .animate-pulse {
    animation: pulse 2s ease-in-out infinite;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

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

  .hero-section .btn-lg {
    width: 100%;
    max-width: 20rem;
  }

  @media (min-width: 400px) {
    .hero-section .btn-lg {
      width: auto;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .btn:active,
    .btn-cta:active {
      transform: none;
    }
  }
}
