/* Raquete.store — landing do grupo de promoções.
   Importar tokens.css antes deste arquivo. Todas as cores vêm dos tokens. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/barlow-condensed-800-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/barlow-condensed-900-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
}

:root {
  --court-line: color-mix(in srgb, var(--brand-white) 62%, transparent);
  --court-line-soft: color-mix(in srgb, var(--brand-white) 9%, transparent);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --slant: -12deg;
  scrollbar-color: var(--border) var(--background-deep);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-body);
  font: 400 var(--font-size-base) / var(--line-height-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--brand-primary); color: var(--text-inverse); }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 30;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--brand-primary); color: var(--text-inverse); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: min(calc(100% - 2 * var(--page-gutter)), var(--container-max-width));
  margin-inline: auto;
}

.section { padding-block: var(--section-gap); }

.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  color: var(--text-primary);
  text-wrap: balance;
}
.h2 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem); }
.lime { color: var(--brand-primary); }

.section__intro { max-width: 46ch; margin-top: var(--space-3); color: var(--text-body); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--button-height); max-width: 100%;
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent; border-radius: var(--radius-md);
  font: 700 var(--type-button) / 1.3 var(--font-body);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color var(--duration-fast) ease-out, border-color var(--duration-fast) ease-out,
    transform 100ms ease-out;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--large { min-height: var(--button-height-lg); padding-inline: var(--space-8); font-size: var(--font-size-lg); }
.btn--block { width: 100%; }

.btn--primary { background: var(--primary-default); color: var(--primary-foreground); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { background: var(--primary-active); }

.btn--secondary { background: transparent; color: var(--secondary-default); border-color: var(--secondary-default); }
.btn--secondary:hover { background: var(--surface-hover); }
.btn--secondary:active { background: var(--surface); }

.btn--tertiary { background: var(--surface); color: var(--text-primary); border-color: var(--border-control); }
.btn--tertiary:hover { background: var(--background); }

/* Sobre o campo verde-limão: botão navy com texto lime */
.btn--inverse { background: var(--brand-dark); color: var(--brand-primary); }
.btn--inverse:hover { background: var(--surface); }
.btn--inverse:active { background: var(--background-deep); }
.btn--inverse:focus-visible { outline-color: var(--brand-dark); }

/* ---------- Header ---------- */
.site-header { padding-block: var(--space-5) var(--space-2); }
.site-header .container { display: flex; align-items: center; justify-content: center; gap: var(--space-6); }
.brand { display: block; width: min(100%, 290px); }
.brand img { width: 100%; }
.site-header .btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__inner { display: grid; }
.hero__copy { padding-block: var(--space-6) var(--space-8); }

.hero__title { font-weight: 900; font-size: clamp(3.5rem, 1.1rem + 12vw, 6rem); line-height: 0.92; }
.hero__title span { display: block; }

.hero__lead {
  max-width: 34ch; margin-top: var(--space-5);
  font-size: var(--font-size-lg); line-height: 1.5; color: var(--text-body);
}
.hero__cta { margin-top: var(--space-6); }
.hero__cta .btn { width: 100%; }
.hero__note { margin-top: var(--space-3); font-size: var(--font-size-sm); color: var(--text-secondary); }

/* Arte: faixa de velocidade verde-limão com o tenista da marca em navy */
.hero__art { position: relative; height: 250px; margin-inline: calc(-1 * var(--page-gutter)); }
.hero__slab, .hero__stripe { position: absolute; transform: skewY(-5deg); transform-origin: 100% 100%; }
.hero__slab { inset: 20% 0 -30% 0; background: var(--brand-primary); }
.hero__stripe--cyan { inset: 4% 0 auto 0; height: 8px; background: var(--brand-secondary); }
.hero__stripe--lime { inset: 11% 0 auto 0; height: 4px; background: var(--lime-600); }
.hero__player {
  position: absolute; right: 8%; bottom: -12%; height: 82%; aspect-ratio: 753 / 900;
  background: var(--brand-dark);
  -webkit-mask: url("img/symbol.webp") center / contain no-repeat;
  mask: url("img/symbol.webp") center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__slab { animation: slab-in 900ms var(--ease-out-expo) backwards; }
  .hero__stripe--cyan { animation: slab-in 900ms var(--ease-out-expo) 80ms backwards; }
  .hero__stripe--lime { animation: slab-in 900ms var(--ease-out-expo) 140ms backwards; }
  .hero__player { animation: player-in 900ms var(--ease-out-expo) 220ms backwards; }
}
@keyframes slab-in { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes player-in { from { opacity: 0; translate: 48px 0; } to { opacity: 1; translate: 0 0; } }

/* ---------- Faixa "para quem joga" ---------- */
.band { background: var(--background-deep); padding-block: var(--space-8); }
.band__list {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-4);
  font-size: clamp(1.75rem, 0.9rem + 4vw, 3.25rem);
}
.band__list li { display: flex; align-items: baseline; gap: var(--space-4); }
.band__list li + li::before { content: "/"; color: var(--brand-secondary); font-style: normal; }

/* ---------- Quadra: categorias ---------- */
.court-section__head { margin-bottom: var(--space-8); }

.court {
  --alley: 14px;
  position: relative;
  display: grid;
  grid-template-columns: var(--alley) minmax(0, 1fr) minmax(0, 1fr) var(--alley);
  grid-template-rows: auto auto 18px auto auto;
  max-width: 880px; margin-inline: auto;
  border: 2px solid var(--court-line);
  background: var(--surface);
}
.court__alley { grid-row: 1 / -1; }
.court__alley--left { grid-column: 1; border-right: 2px solid var(--court-line); }
.court__alley--right { grid-column: 4; border-left: 2px solid var(--court-line); }

.court__zone {
  display: grid; place-items: center;
  padding: var(--space-6) var(--space-3);
  font-size: clamp(1.5rem, 0.7rem + 3.8vw, 2.5rem);
  text-align: center;
}
.court__zone--back { grid-column: 2 / 4; min-height: 104px; }
.court__zone--box { min-height: 132px; }
.court__zone--back-top { grid-row: 1; border-bottom: 2px solid var(--court-line); }
.court__zone--box-1 { grid-column: 2; grid-row: 2; border-right: 2px solid var(--court-line); }
.court__zone--box-2 { grid-column: 3; grid-row: 2; }
.court__zone--box-3 { grid-column: 2; grid-row: 4; border-right: 2px solid var(--court-line); }
.court__zone--box-4 { grid-column: 3; grid-row: 4; }
.court__zone--back-bottom { grid-row: 5; border-top: 2px solid var(--court-line); }

/* Rede: atravessa a quadra e passa um pouco das linhas laterais */
.court__net {
  grid-column: 1 / -1; grid-row: 3; position: relative; z-index: 1;
  margin-inline: -12px;
  border-top: 3px solid var(--brand-white);
  background-color: var(--background-deep);
  background-image:
    repeating-linear-gradient(90deg, var(--court-line-soft) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, var(--court-line-soft) 0 1px, transparent 1px 7px);
}
.court__ball {
  position: absolute; z-index: 2; right: calc(var(--alley) + 9%); bottom: 21%;
  width: 16px; height: 16px; border-radius: var(--radius-full);
  background: var(--brand-primary);
}

.court-notes {
  display: grid; gap: var(--space-3);
  max-width: 880px; margin: var(--space-6) auto 0;
  color: var(--text-body);
}
.court-notes li { display: flex; gap: var(--space-3); align-items: flex-start; }
.court-notes svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--brand-primary); }

/* ---------- Fotos ---------- */
.shots { background: var(--background-deep); }
.shots__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--grid-gap); margin-top: var(--space-8);
}
.shot img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
}
.shot figcaption {
  margin-top: var(--space-2); padding-inline-start: 4%;
  font-size: var(--font-size-sm); font-weight: 600; color: var(--text-body);
}
.shot { margin: 0; }

/* ---------- Sobre ---------- */
.about__text {
  display: grid; gap: var(--space-4);
  max-width: 56ch;
}
.about__title { font: 700 var(--type-h4) / 1.3 var(--font-body); color: var(--text-primary); }

/* ---------- Fechamento: campo verde-limão ---------- */
.closing { position: relative; background: var(--brand-primary); color: var(--text-inverse); overflow: hidden; }
.closing::before {
  content: ""; position: absolute; inset: -1px 0 auto 0; height: clamp(28px, 6vw, 72px);
  background: var(--background);
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
}
.closing__inner { padding-block: calc(var(--section-gap) + 40px) var(--section-gap); }
.closing__title { color: var(--text-inverse); font-weight: 900; font-size: clamp(2.75rem, 1.2rem + 7vw, 5.5rem); line-height: 0.94; max-width: 12ch; }
.closing__text { max-width: 40ch; margin-top: var(--space-4); font-size: var(--font-size-lg); line-height: 1.5; font-weight: 600; color: var(--lime-900); }
.closing__cta { margin-top: var(--space-8); }
.closing__cta .btn { width: 100%; }
.closing__net {
  height: 28px;
  border-top: 3px solid var(--brand-dark);
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--brand-dark) 35%, transparent) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--brand-dark) 35%, transparent) 0 1px, transparent 1px 9px);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--background-deep); padding-block: var(--space-10); }
.site-footer .container { display: grid; gap: var(--space-5); }
.site-footer__brand { width: 200px; }
.site-footer p { max-width: 62ch; font-size: var(--font-size-sm); color: var(--text-secondary); }

/* ---------- Barra fixa ---------- */
.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  padding: var(--space-3) var(--page-gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--surface-elevated); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
}
.sticky-cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  width: min(100%, var(--container-max-width)); margin-inline: auto;
}
.sticky-cta__label { display: none; font-weight: 600; color: var(--text-primary); }
.sticky-cta .btn { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .sticky-cta { animation: bar-in 250ms ease-out; }
}
@keyframes bar-in { from { translate: 0 100%; } to { translate: 0 0; } }

/* ---------- Modal do quiz ---------- */
.quiz {
  width: min(calc(100vw - 2 * var(--page-gutter)), 440px);
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: var(--surface-elevated); color: var(--text-body);
  border: 1px solid var(--border-control); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.quiz::backdrop { background: color-mix(in srgb, var(--background-deep) 80%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .quiz[open] { animation: quiz-in 250ms ease-out; }
  .quiz[open]::backdrop { animation: fade-in 250ms ease-out; }
  .quiz__step { animation: step-in 250ms ease-out; }
}
@keyframes quiz-in { from { opacity: 0; translate: 0 12px; scale: 0.98; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes step-in { from { opacity: 0; translate: 0 8px; } }

.quiz__mark {
  width: 60px; height: 72px; margin: 0 auto var(--space-4);
  background: var(--brand-primary);
  -webkit-mask: url("img/symbol.webp") center / contain no-repeat;
  mask: url("img/symbol.webp") center / contain no-repeat;
}
.quiz__title { font-size: 2.25rem; }
.quiz__text { margin-top: var(--space-3); color: var(--text-body); }
.quiz__answers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-6); }
.quiz__go { margin-top: var(--space-6); }
.quiz__note { margin-top: var(--space-3); font-size: var(--font-size-sm); color: var(--text-secondary); }
.quiz__note a { color: var(--brand-secondary); font-weight: 600; text-underline-offset: 3px; }
.quiz__close {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 0; border-radius: var(--radius-md);
  color: var(--text-secondary); cursor: pointer;
  transition: color var(--duration-fast) ease-out, background-color var(--duration-fast) ease-out;
}
.quiz__close:hover { color: var(--text-primary); background: var(--surface); }
.quiz__close svg { width: 20px; height: 20px; }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .brand { width: 320px; }
  .site-header .container { justify-content: space-between; }
  .site-header .btn { display: inline-flex; }

  .hero__cta .btn, .closing__cta .btn { width: auto; }
  .hero__art { height: 320px; }

  .court { --alley: 28px; grid-template-rows: auto auto 22px auto auto; }
  .court__zone--back { min-height: 132px; }
  .court__zone--box { min-height: 176px; }
  .court__ball { width: 20px; height: 20px; }
  .court-notes { grid-template-columns: 1fr 1fr; gap: var(--space-6); }

  .shots__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .sticky-cta__label { display: block; }
  .sticky-cta .btn { width: auto; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  /* O header fica sobre o hero para a faixa verde-limão subir até o topo da página */
  .site-header { position: absolute; inset: 0 0 auto 0; z-index: 2; padding-block: var(--space-6) 0; }
  .site-header .btn { background: var(--brand-dark); color: var(--brand-primary); border-color: var(--brand-dark); }
  .site-header .btn:hover { background: var(--surface); }
  .site-header .btn:focus-visible { outline-color: var(--brand-dark); }

  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center; gap: var(--grid-gap);
    min-height: clamp(600px, 84vh, 780px);
  }
  .hero__copy { padding-block: 148px var(--space-12); position: relative; z-index: 1; }
  .hero__lead { font-size: var(--font-size-xl); max-width: 32ch; }

  .hero__art { height: auto; align-self: stretch; margin-inline: 0; }
  .hero__slab, .hero__stripe { transform: skewX(var(--slant)); transform-origin: 50% 50%; }
  .hero__slab { inset: -20% -100vw -20% 12%; }
  .hero__stripe--cyan { inset: -20% auto -20% 3%; width: 12px; height: auto; }
  .hero__stripe--lime { inset: -20% auto -20% 7.5%; width: 5px; height: auto; }
  .hero__player { right: auto; left: 13%; bottom: 0; height: 74%; }
  @keyframes slab-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
}

/* Fechamento em duas colunas no desktop: título à esquerda, ação à direita */
@media (min-width: 1024px) {
  .closing__inner {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--grid-gap); align-items: end;
  }
  .closing__title { grid-row: 1 / 3; }
  .closing__text { margin-top: 0; }
  .closing__cta { margin-top: var(--space-6); }
}

/* ---------- QR code do hero (só em computador com mouse) ---------- */
.qr { display: none; align-items: center; gap: var(--space-4); margin: 0; }
.qr__img { flex: none; width: 124px; height: 124px; padding: 8px; border-radius: var(--radius-lg); background: var(--brand-white); box-shadow: var(--shadow-md); }
.qr__img svg { display: block; width: 100%; height: 100%; }
.qr figcaption { max-width: 21ch; font-size: var(--font-size-sm); line-height: 1.4; color: var(--text-body); }
.qr b { display: block; font-size: var(--font-size-base); font-weight: 700; color: var(--text-primary); }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) var(--space-8); }
  .hero__cta .btn { flex: none; }
  .qr.is-ready { display: flex; }
}

/* A página não rola atrás do modal aberto */
html:has(dialog[open]) { overflow: hidden; }

/* ---------- Celulares estreitos: rótulos dos botões em uma linha ---------- */
@media (max-width: 399px) {
  .btn--large { padding-inline: var(--space-4); font-size: var(--font-size-base); }
  .quiz { padding-inline: var(--space-4); }
  .quiz__answers { grid-template-columns: 1fr; }
}
