/* ==========================================================================
   Sonho no Chile: tela de boas vindas
   Estrutura: 1) tokens  2) reset  3) hero  4) marca  5) titulo  6) social
              7) animacoes  8) responsivo
   ========================================================================== */

/* 1. Tokens
   ------------------------------------------------------------------------ */
:root {
  --vermelho: #e5342a;
  --vermelho-claro: #ff5449;
  --branco: #ffffff;
  --branco-suave: rgba(255, 255, 255, 0.86);
  --escuro: #0a1220;

  --fonte-titulo: "Caprasimo", Georgia, "Times New Roman", serif;
  --fonte-texto: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --fonte-cursiva: "Dancing Script", "Snell Roundhand", "Apple Chancery",
                   "Segoe Script", "Brush Script MT", cursive;

  --sombra-texto: 0 2px 18px rgba(0, 0, 0, 0.45);
  --curva: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Reset enxuto
   ------------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--escuro);
  color: var(--branco);
  font-family: var(--fonte-texto);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

svg { width: 100%; height: 100%; display: block; }

[hidden] { display: none !important; }

/* 3. Hero: foto do Costanera Center em toda a viewport
   ------------------------------------------------------------------------ */
.hero {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: var(--altura-viewport, 100vh);

  background-image: linear-gradient(
      rgba(0, 0, 0, .45),
      rgba(0, 0, 0, .55)
    ), url('./assets/fotocostanera.jpg');

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;

  display: grid;
  place-items: center;
  padding: clamp(28px, 7vw, 72px) clamp(20px, 6vw, 64px);
  isolation: isolate;
}

/* Vinheta suave nas bordas: da profundidade sem clarear o centro da foto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, .5) 100%);
}

.hero__conteudo {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2.4vw, 22px);
}

/* 4. Marca
   ------------------------------------------------------------------------ */
.marca {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(6px, 2vw, 18px);
}

.marca__img {
  width: clamp(120px, 24vw, 190px);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .45));
}

.marca__selo-nome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.marca__selo {
  width: clamp(52px, 11vw, 74px);
  height: clamp(52px, 11vw, 74px);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .5));
}

.marca__nome {
  font-family: var(--fonte-titulo);
  font-size: clamp(15px, 3.2vw, 20px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--branco);
  text-shadow: var(--sombra-texto);
}

.marca__nome em {
  font-style: normal;
  color: var(--vermelho-claro);
}

/* 5. Titulo e assinatura
   ------------------------------------------------------------------------ */
.hero__titulo {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: clamp(40px, 10.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
  text-shadow: var(--sombra-texto);
}

.hero__destaque {
  color: var(--vermelho-claro);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45), 0 0 34px rgba(229, 52, 42, .35);
}

.hero__assinatura {
  margin: 0;
  font-family: var(--fonte-cursiva);
  font-weight: 600;
  font-size: clamp(24px, 5.6vw, 44px);
  line-height: 1.25;
  color: var(--branco-suave);
  text-shadow: var(--sombra-texto);
}

.hero__risco {
  display: block;
  width: clamp(120px, 26vw, 190px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, .55) 20%,
    var(--vermelho) 50%,
    rgba(255, 255, 255, .55) 80%,
    transparent
  );
  opacity: .9;
  margin: clamp(4px, 1.6vw, 12px) 0;
}

/* 6. Instagram
   ------------------------------------------------------------------------ */
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--branco);
  text-decoration: none;
  font-size: clamp(15px, 3.4vw, 18px);
  font-weight: 500;
  letter-spacing: .01em;
  transition: transform .35s var(--curva), background-color .35s var(--curva),
              border-color .35s var(--curva), box-shadow .35s var(--curva);
}

.social__icone {
  width: 22px;
  height: 22px;
  flex: none;
}

.social:hover,
.social:focus-visible {
  transform: translateY(-2px);
  background: rgba(229, 52, 42, .82);
  border-color: rgba(255, 255, 255, .5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .38);
}

.social:focus-visible {
  outline: 2px solid var(--branco);
  outline-offset: 3px;
}

/* 7. Animacoes de entrada (somente CSS)
   ------------------------------------------------------------------------ */
@keyframes surgir {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revelar {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Revela a foto sem transform, para o hero nunca ultrapassar a viewport */
.hero {
  animation: revelar 1.1s ease-out both;
}

.marca,
.hero__titulo,
.hero__assinatura,
.hero__risco,
.social {
  animation: surgir .95s var(--curva) both;
}

.marca            { animation-delay: .10s; }
.hero__titulo     { animation-delay: .28s; }
.hero__assinatura { animation-delay: .46s; }
.hero__risco      { animation-delay: .60s; }
.social           { animation-delay: .74s; }

@media (prefers-reduced-motion: reduce) {
  .hero,
  .marca,
  .hero__titulo,
  .hero__assinatura,
  .hero__risco,
  .social {
    animation: none;
  }
  .social { transition: none; }
}

/* 8. Responsivo
   ------------------------------------------------------------------------ */

/* Em telas verticais o corte central esconderia a torre: puxa o
   enquadramento para a direita e mantem o Costanera Center visivel */
@media (max-aspect-ratio: 1 / 1) {
  .hero { background-position: 70% center; }
}

@media (max-aspect-ratio: 3 / 4) {
  .hero { background-position: 74% center; }
}

/* Telas baixas e deitadas: menos respiro entre os blocos */
@media (max-height: 520px) {
  .hero { padding: 24px 20px; }
  .hero__conteudo { gap: 10px; }
  .marca { margin-bottom: 2px; }
  .marca__selo { width: 44px; height: 44px; }
  .hero__titulo { font-size: clamp(30px, 7vh, 52px); }
  .hero__assinatura { font-size: clamp(18px, 4.2vh, 28px); }
}

@media (min-width: 1440px) {
  .hero__conteudo { width: min(780px, 100%); }
}
