/* Mobile-first: as regras base são para celular; telas maiores ajustam via min-width. */
:root {
  /* Cores da marca */
  --terra: #ab572d;        /* fundo principal */
  --terra-dark: #945336;   /* listras e lateral do banner */
  --wine: #8b3430;         /* texto do botão */
  --white: #ffffff;

  --font-base: "Creato Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 760px;
  --gutter: 20px;

  --header-h: 76px;

  /* Altura do banner: no celular ocupa a tela toda (abaixo do header).
     A escala --s (px por pixel da imagem original, que tem 933px de altura) alinha as
     listras abaixo do banner exatamente com os arcos desenhados nele. */
  --hero-h: clamp(540px, calc(100vh - var(--header-h)), 760px);
  --s: calc(var(--hero-h) / 933);
}

@supports (height: 100svh) {
  :root {
    --hero-h: clamp(540px, calc(100svh - var(--header-h)), 760px);
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-weight: 300;
  color: var(--white);
  background: var(--terra);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

strong {
  font-weight: 700;
}

/* Texto só para leitores de tela e buscadores */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

/* ---------- Listras decorativas ---------- */
/* Mesma geometria de assets/originais/listras.svg: 6 faixas de 20,47 com passo de 47,77 */
.stripes {
  position: absolute;
  z-index: 1;
  width: calc(259.5 * var(--s));
  background: repeating-linear-gradient(
    90deg,
    var(--terra-dark) 0 calc(20.47 * var(--s)),
    transparent 0 calc(47.77 * var(--s))
  );
  pointer-events: none;
}

.stripes--top {
  display: none;
  top: 0;
  left: calc(32.5 * var(--s));
  height: var(--header-h);
}

.stripes--right {
  /* começa exatamente no fim do banner e desce até o fim da página */
  top: calc(var(--header-h) + var(--hero-h));
  bottom: 0;
  right: calc(32.5 * var(--s));
  /* no celular as listras só "escorrem" um pouco abaixo dos arcos e somem antes do texto */
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 64px);
  mask-image: linear-gradient(180deg, #000 0, transparent 64px);
}

/* ---------- Header ---------- */
.header {
  position: relative;
  z-index: 2;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-top: env(safe-area-inset-top);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__logo {
  display: block;
  padding-block: 8px;
}

.header__logo img {
  width: 96px;
  height: auto;
}

.header__line {
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: rgba(255, 255, 255, 0.85);
}

.header__insta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.header__insta img {
  width: 1.45em;
  height: 1.45em;
  filter: brightness(0) invert(1);
}

@media (max-width: 339px) {
  /* telas muito estreitas: só o ícone */
  .header__insta span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .countdown__label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }
}

/* ---------- Hero / contador ---------- */
.hero {
  position: relative;
  height: var(--hero-h);
  background: var(--terra-dark) url("../assets/img/banner.jpg") right center / auto 100% no-repeat;
  background-image: image-set(
    url("../assets/img/banner.webp") type("image/webp"),
    url("../assets/img/banner.jpg") type("image/jpeg")
  );
}

.hero::before {
  /* contraste do texto sobre a silhueta no celular */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 45% at 50% 48%, rgba(80, 35, 18, 0.38), transparent 75%),
    linear-gradient(180deg, rgba(90, 40, 20, 0.15), rgba(90, 40, 20, 0.3));
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
  text-align: center;
}

.hero__title {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: clamp(2.6rem, 14vw, 6rem);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(70, 30, 15, 0.3);
}

.hero__title-light {
  font-weight: 200;
}

.hero__title-strong {
  font-weight: 400;
}

.countdown {
  display: flex;
  gap: clamp(6px, 2.2vw, 18px);
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Cartão estilo "flip clock" (referência: assets/originais/modelo-contador.png) */
.countdown__card {
  --size: min(19.5vw, 124px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: calc(var(--size) * 1.03);
  border-radius: calc(var(--size) * 0.13);
  background: linear-gradient(180deg, #414141 0%, #333 49.6%, #242424 50.4%, #1c1c1c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(40, 15, 5, 0.35);
  font-size: calc(var(--size) * 0.64);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  color: transparent;
  overflow: hidden;
}

.countdown__card::before {
  /* números com o degradê prateado do modelo */
  content: attr(data-value);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff 25%, #e6e6e6 50%, #bdbdbd 51%, #d9d9d9 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}

.countdown__card::after {
  /* linha de divisão do flip */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: #0d0d0d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.countdown__card.is-ticking::before {
  animation: tick 0.45s ease-out;
}

@keyframes tick {
  from { transform: translateY(-12%); opacity: 0.35; }
  to   { transform: none; opacity: 1; }
}

.countdown__label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}

.hero__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  background: rgba(80, 35, 18, 0.18);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.hero__date strong {
  font-weight: 700;
}

.countdown__done {
  font-size: 1.2rem;
  font-weight: 700;
}

.hero__scroll {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  animation: nudge 2s ease-in-out infinite;
}

.hero__scroll svg {
  width: 22px;
  height: 22px;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50%      { transform: translateY(6px); opacity: 0.6; }
}

/* ---------- Sobre ---------- */
.about {
  position: relative;
  z-index: 2;
  padding: 56px 0 48px;
  scroll-margin-top: 0;
}

.about__title {
  font-size: clamp(2rem, 10vw, 3.2rem);
  font-weight: 200;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.45em;
}

.about p {
  font-size: 1.0625rem;
  line-height: 1.55;
  margin-bottom: 1em;
}

.about .about__cta-text {
  margin: 2em 0 1.2em;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.btn-insta {
  display: block;
  width: fit-content;
  margin-inline: auto;
  border-radius: 999px;
  filter: drop-shadow(0 6px 14px rgba(70, 25, 10, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-insta:active {
  transform: scale(0.97);
}

.btn-insta img {
  width: min(250px, 72vw);
  height: auto;
}

/* ---------- Marcas ---------- */
.brands,
.brands__img {
  margin-top: 48px;
}

.brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px 28px;
  font-weight: 700;
  line-height: 1;
}

.brands__img {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}

.brand--body {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 900;
  text-transform: uppercase;
}

.brand--body span:first-child {
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  padding-bottom: 3px;
  border-bottom: 2px solid currentColor;
}

.brand--body span:last-child {
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  margin-top: 4px;
}

.brand--adidas {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.brand--nb {
  font-size: 1rem;
  font-style: italic;
  letter-spacing: -0.02em;
}

.brand--hoka {
  font-size: 1.7rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.brand--asics {
  font-size: 1.7rem;
  font-style: italic;
  letter-spacing: -0.03em;
}

/* ---------- Endereço ---------- */
.address {
  margin-top: 44px;
  text-align: center;
  font-style: normal;
  font-weight: 200;
  font-size: 1.125rem;
  line-height: 1.7;
}

.address a {
  display: inline-block;
  padding: 6px 12px;
}

.address__map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.address__map svg {
  width: 16px;
  height: 16px;
}

/* ---------- Rodapé ---------- */
.footer {
  position: relative;
}

.footer__img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: 30% center;
}

.footer__legal {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px max(var(--gutter), env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(60, 25, 12, 0.55) 45%, rgba(60, 25, 12, 0.75));
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.55;
  font-weight: 300;
}

.footer__company {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.footer__copy {
  margin-top: 6px;
  font-size: 0.7rem;
  opacity: 0.8;
}

/* ---------- Tablet ---------- */
@media (min-width: 700px) {
  :root {
    --header-h: clamp(88px, 10vw, 140px);
    --gutter: 32px;
  }

  .header__inner { gap: clamp(16px, 3vw, 32px); }
  .header__logo img { width: clamp(110px, 12vw, 130px); }
  .header__insta { font-size: clamp(1rem, 1.6vw, 1.2rem); }

  .hero__content { gap: clamp(28px, 4vw, 40px); }
  .hero__title { font-size: clamp(3.5rem, 8vw, 6rem); }
  .countdown__card { --size: clamp(84px, 11vw, 124px); }
  .countdown__label { font-size: 0.8rem; }

  .about { padding: clamp(64px, 8vw, 88px) 0 clamp(56px, 6vw, 72px); }
  .about p {
    font-size: clamp(1.0625rem, 1.5vw, 1.15rem);
    text-align: justify;
    hyphens: auto;
  }

  .brands { gap: 20px clamp(28px, 4vw, 44px); }
  .footer__img { height: clamp(240px, 24vw, 440px); }
}

/* ---------- Desktop ---------- */
@media (min-width: 1100px) {
  :root {
    --hero-h: clamp(560px, 46vw, 820px);
  }

  .stripes--top { display: block; }

  .stripes--right {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero::before { display: none; }

  .hero__content {
    /* centraliza o texto no espaço livre à esquerda da silhueta */
    padding-right: min(38%, calc(720 * var(--s)));
  }

  .hero__scroll { display: none; }

  .btn-insta:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 18px rgba(70, 25, 10, 0.45));
  }

  .header__insta:hover { opacity: 0.8; }
  .address a:hover .address__map { text-decoration-thickness: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .countdown__card.is-ticking::before,
  .hero__scroll { animation: none; }
  .btn-insta { transition: none; }
}
