/* iCell Prime: home. Depende de core.css. */

/* 1. Abertura
   Celular e tablet: o aparelho fica num palco acima do texto e ocupa a altura que sobra,
   para a headline nunca ficar em cima dele. A partir de 900 px, palco ao lado do texto. */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--hdr-h) + 16px) 0 28px;
  overflow: hidden;
  background:
    radial-gradient(70% 45% at 68% 26%, rgba(212, 170, 104, .2) 0%, rgba(212, 170, 104, .05) 45%, transparent 70%),
    linear-gradient(180deg, #0e0e10 0%, #070708 60%, #050506 100%);
}

.hero__light {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 150vw;
  aspect-ratio: 1;
  background: repeating-conic-gradient(from 0deg, rgba(242, 215, 162, .05) 0deg 1.4deg, transparent 1.4deg 11deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .45) 32%, transparent 64%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .45) 32%, transparent 64%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero__stage {
  --dev-w: min(60vw, 300px);
  position: relative;
  flex: 1 0 168px;
  margin-bottom: 8px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
}

.hero__ring {
  position: absolute;
  left: 60%;
  top: calc(16px + var(--dev-w) * .55);
  width: calc(var(--dev-w) * 1.7);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 250deg, rgba(242, 215, 162, .55) 320deg, transparent 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
  opacity: .5;
  transform: translate(-50%, -50%);
  animation: ring-spin 16s linear infinite;
}

@keyframes ring-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero__device {
  position: absolute;
  left: 60%;
  top: 16px;
  width: var(--dev-w);
  margin-left: calc(var(--dev-w) / -2);
  transform: rotate(-7deg);
  transform-origin: 50% 40%;
}

.hero__device img {
  width: 100%;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__title {
  max-width: 11.5em;
  margin-bottom: 18px;
  font-size: clamp(38px, 10.4vw, 86px);
  font-weight: 620;
  letter-spacing: -.052em;
  line-height: .98;
  text-wrap: balance;
}

.hero__lede {
  max-width: 30em;
  margin-bottom: 26px;
  font-size: clamp(15px, 4vw, 18px);
}

.hero__actions .btn {
  flex: 1 1 100%;
}

.hero__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}

.hero__trust li {
  display: grid;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.hero__trust strong {
  color: var(--white);
  font-size: 13px;
  font-weight: 620;
}

.hero__trust span {
  color: rgba(255, 255, 255, .5);
}

/* Entrada da abertura em CSS puro: aparece no primeiro quadro, sem esperar JS */
.hero__device,
.hero__in {
  animation: rise 1.1s var(--ease) both;
}

.hero__device {
  animation-name: rise-device;
  animation-duration: 1.6s;
}

.hero__in:nth-child(2) { animation-delay: .06s; }
.hero__in:nth-child(3) { animation-delay: .14s; }
.hero__in:nth-child(4) { animation-delay: .22s; }
.hero__in:nth-child(5) { animation-delay: .3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-device {
  from { opacity: 0; transform: translateY(48px) rotate(-3deg) scale(.94); }
  to { opacity: 1; transform: rotate(-7deg); }
}

@media (min-width: 600px) {
  .hero__actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    align-items: center;
    min-height: max(100svh, 720px);
    padding: calc(var(--hdr-h) + 40px) 0 48px;
  }

  .hero__light {
    left: 70%;
    top: 40%;
    width: 110vw;
  }

  /* O aparelho começa abaixo do menu, para não passar por trás dos links */
  .hero__stage {
    position: absolute;
    top: max(calc(var(--hdr-h) + 24px), calc(50% - 46svh));
    right: 4vw;
    width: 42vw;
    height: 92svh;
    margin: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero__ring {
    left: 50%;
    top: 46%;
    width: 118%;
  }

  .hero__device {
    left: 50%;
    width: 64%;
    margin-left: -32%;
    top: 4%;
  }

  .hero__device img {
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
  }

  .hero__content {
    padding-right: 36vw;
  }

  .hero__title {
    max-width: 10.5em;
    font-size: clamp(56px, 5.3vw, 80px);
  }

  .hero__trust {
    max-width: 560px;
    margin-top: 44px;
  }
}

/* Telas de 900 a 1180 px: o aparelho encosta mais à direita para não tocar a headline */
@media (min-width: 900px) and (max-width: 1180px) {
  .hero__stage {
    right: 0;
  }
}

/* 2. Universo Apple
   Layout final em CSS: sem JS, sem GSAP ou em modo leve, a composição aparece pronta.
   Com .is-pinned (home.js), o palco vira tela cheia e o GSAP traz cada peça de fora. */

.eco {
  --w: min(94vw, 560px, 52svh);
  position: relative;
  background: linear-gradient(180deg, #050506 0%, #0b0b0d 50%, #050506 100%);
}

.eco__stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 36px;
  padding: var(--sec) 0;
  overflow: hidden;
}

.eco__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(140vw, 1200px);
  aspect-ratio: 1;
  margin: calc(min(140vw, 1200px) / -2) 0 0 calc(min(140vw, 1200px) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(212, 170, 104, .2), rgba(212, 170, 104, .06) 45%, transparent 72%);
  pointer-events: none;
}

.eco__head {
  position: relative;
  z-index: 3;
  padding-inline: 20px;
  text-align: center;
}

.eco__head .eyebrow {
  margin-bottom: 12px;
}

.eco__title {
  font-size: clamp(40px, 11vw, 96px);
  font-weight: 620;
  letter-spacing: -.055em;
  line-height: .98;
}

.eco__comp {
  position: relative;
  z-index: 2;
  width: var(--w);
  aspect-ratio: 1;
}

.eco__item {
  position: absolute;
  display: block;
}

.eco__item img {
  width: 100%;
}

.eco__mac { z-index: 1; left: 8%; top: 12%; width: 84%; }
.eco__ipad { z-index: 2; left: 0; top: 41%; width: 42%; transform: rotate(-5deg); }
.eco__phone { z-index: 4; left: 38%; top: 30%; width: 25%; }
.eco__watch { z-index: 3; left: 74%; top: 44%; width: 23%; transform: rotate(7deg); }
.eco__pods { z-index: 5; left: 61%; top: 66%; width: 21%; }

.eco__floor {
  position: absolute;
  z-index: 0;
  left: 4%;
  right: 4%;
  top: 74%;
  height: 22%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), rgba(0, 0, 0, .25) 55%, transparent);
}

.eco__caption {
  display: none;
}

.eco__end {
  position: relative;
  z-index: 3;
  max-width: 34em;
  padding-inline: 20px;
  text-align: center;
}

.eco__end .eyebrow {
  margin-bottom: 12px;
}

.eco__end-title {
  margin-bottom: 12px;
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 620;
  letter-spacing: -.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.eco__end p:last-child {
  font-size: 15px;
}

@media (min-width: 900px) {
  .eco {
    --w: min(86vw, 1120px, (100svh - 280px) * 1.7778);
  }

  .eco__comp {
    aspect-ratio: 16 / 9;
  }

  .eco__mac { left: 24%; top: 4%; width: 52%; }
  .eco__ipad { left: 5%; top: 32%; width: 28%; }
  .eco__phone { left: 51%; top: 26%; width: 13%; }
  .eco__watch { left: 69%; top: 42%; width: 12.5%; }
  .eco__pods { left: 82%; top: 54%; width: 11%; }
  .eco__floor { left: 2%; right: 2%; top: 70%; height: 26%; }
}

/* Palco preso (ativado pelo home.js) */

.eco.is-pinned .eco__stage {
  display: block;
  height: 100vh;
  height: 100lvh;
  padding: 0;
}

/* O título nasce grande no centro e o GSAP o leva ao topo, reduzindo (texto reduzido fica nítido). */
.eco.is-pinned .eco__head {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50svh - 76px);
  transform-origin: 50% 0;
}

.eco.is-pinned .eco__comp {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50svh - var(--w) / 2 + 2svh);
  margin-inline: auto;
}

.eco.is-pinned .eco__caption {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: calc(50svh + var(--w) / 2 + 10px);
  display: block;
  height: 28px;
  text-align: center;
}

.eco.is-pinned .eco__caption span {
  position: absolute;
  left: 0;
  right: 0;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: 0;
}

.eco.is-pinned .eco__end {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100lvh - 100svh + 28px);
  margin-inline: auto;
}

.eco.is-pinned .eco__item,
.eco.is-pinned .eco__head,
.eco.is-pinned .eco__end,
.eco.is-pinned .eco__comp {
  will-change: transform, opacity;
}

@media (min-width: 900px) {
  .eco.is-pinned .eco__comp {
    top: calc(50svh - var(--w) * 9 / 32 + 1svh);
  }

  .eco.is-pinned .eco__caption {
    top: calc(50svh + var(--w) * 9 / 32 - 6px);
  }
}

/* 3. Compra */

.buy__grid {
  display: grid;
  gap: 48px;
}

.buy__grid > *,
.care__grid > *,
.place__grid > *,
.brands__head > * {
  min-width: 0;
}

.buy__copy .t-h2 {
  margin-bottom: 20px;
}

.buy__copy .t-lede {
  margin-bottom: 24px;
}

.buy__copy .chips {
  margin-bottom: 28px;
}

.carousel {
  position: relative;
  margin-inline: -20px;
}

.carousel__track {
  display: flex;
  gap: 12px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline-offset: -2px;
}

.slide {
  position: relative;
  display: grid;
  flex: 0 0 82%;
  grid-template-rows: 1fr auto;
  aspect-ratio: 4 / 5;
  padding: 22px 22px 20px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #f1eee7 0%, #e4dfd4 100%);
  scroll-snap-align: start;
}

.slide picture {
  display: grid;
  place-items: center;
  min-height: 0;
}

.slide img {
  width: auto;
  max-width: 82%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slide figcaption {
  display: grid;
  gap: 2px;
  padding-top: 14px;
}

.slide figcaption strong {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -.02em;
}

.slide figcaption span {
  color: var(--muted);
  font-size: 13px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel__dots button {
  position: relative;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(9, 9, 9, .18);
  transition: width .5s var(--ease), background-color .3s ease;
}

.carousel__dots button::before {
  content: "";
  position: absolute;
  inset: -12px -6px;
}

.carousel__dots button[aria-current="true"] {
  width: 34px;
}

.carousel__dots i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}

.carousel__dots button[aria-current="true"] i {
  transform: scaleX(1);
}

.carousel.is-auto .carousel__dots button[aria-current="true"] i {
  animation: dot-fill var(--interval, 3.5s) linear both;
}

.carousel.is-paused .carousel__dots button[aria-current="true"] i {
  animation-play-state: paused;
}

@keyframes dot-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (min-width: 900px) {
  .buy__grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 64px;
  }

  .carousel {
    margin-inline: 0;
  }

  .carousel__track {
    padding-inline: 0;
    scroll-padding-inline: 0;
  }

  .slide {
    flex-basis: 78%;
  }
}

/* 4. Assistência */

.care {
  overflow: hidden;
  background: linear-gradient(180deg, #070708 0%, #0d0d0f 100%);
}

.care__light {
  position: absolute;
  right: -30vw;
  top: -10%;
  width: 90vw;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(212, 170, 104, .14), transparent 70%);
  pointer-events: none;
}

.care__grid {
  position: relative;
  display: grid;
  gap: 36px;
}

.care__copy .t-h2 {
  margin-bottom: 18px;
}

.compare {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

.compare__img,
.compare__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.compare__before,
.compare__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translate3d(-50%, 0, 0);
}

.compare__inner {
  transform: translate3d(50%, 0, 0);
}

.compare__handle {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 18px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.compare__handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
}

.compare__handle i {
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
}

.compare__handle i:first-child {
  border-right: 6px solid var(--ink);
}

.compare__handle i:last-child {
  border-left: 6px solid var(--ink);
}

.compare:focus-within .compare__handle span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.compare__tag {
  position: absolute;
  z-index: 2;
  top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(9, 9, 9, .62);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
}

.compare__tag--before { left: 14px; }
.compare__tag--after { right: 14px; }

.care__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-dark);
}

.care__facts dt {
  color: var(--white);
  font-size: 15px;
  font-weight: 620;
}

.care__facts dd {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

.care__note {
  margin-bottom: 16px;
  font-size: 15px;
}

.care__more .chips {
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .care__grid {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-areas: "copy media" "more media";
    column-gap: 64px;
    row-gap: 40px;
    align-items: start;
  }

  .care__copy { grid-area: copy; }
  .compare { grid-area: media; align-self: center; }
  .care__more { grid-area: more; }
}

/* 5. Loja física */

.place__grid {
  display: grid;
  gap: 40px;
}

.place__photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1086 / 1130;
  background: var(--stone-2);
}

.place__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place__photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(9, 9, 9, .66);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.place__copy .t-h2 {
  margin-bottom: 18px;
}

.place__copy .t-lede {
  margin-bottom: 26px;
}

.place__addr {
  display: grid;
  gap: 2px;
  margin-bottom: 26px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  font-style: normal;
  font-size: 15px;
}

.place__addr strong {
  font-weight: 620;
}

.place__hours {
  margin-top: 8px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.place__map {
  margin-top: 20px;
  aspect-ratio: 4 / 3;
}

@media (min-width: 900px) {
  .place__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 72px;
  }
}

/* 6. Outras marcas */

.brands__head {
  display: grid;
  gap: 18px;
  margin-bottom: 40px;
}

.brands__rail {
  display: flex;
  gap: 12px;
  width: var(--shell);
  margin-inline: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.brands__rail::-webkit-scrollbar {
  display: none;
}

.bcard {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 0 78%;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  scroll-snap-align: start;
  transition: transform .5s var(--ease);
}

.bcard:active {
  transform: scale(.98);
}

.bcard--samsung {
  background: radial-gradient(80% 60% at 50% 30%, #b8a7e6 0%, #6e5aa8 45%, #241b3d 100%);
}

.bcard--xiaomi {
  background: radial-gradient(80% 60% at 50% 30%, #6b6b70 0%, #2a2a2e 50%, #0e0e10 100%);
}

.bcard--motorola {
  background: #12140f;
}

.bcard__img {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 8%;
  height: 66%;
  transform: translateX(-50%) rotate(-6deg);
  transition: transform .8s var(--ease);
}

.bcard__img img {
  width: auto;
  height: 100%;
}

.bcard__img--cover {
  inset: 0;
  height: auto;
  transform: none;
}

.bcard__img--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bcard::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55));
}

.bcard__txt small {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.bcard__txt h3 {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 620;
  letter-spacing: -.04em;
  line-height: 1;
}

.bcard__txt > span {
  font-size: 14px;
  font-weight: 600;
}

@media (hover: hover) {
  .bcard:hover .bcard__img { transform: translateX(-50%) rotate(-3deg) translateY(-8px); }
  .bcard:hover .bcard__img--cover { transform: scale(1.04); }
}

@media (min-width: 900px) {
  .brands__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    align-items: end;
    gap: 64px;
  }

  .brands__rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
  }
}

/* 7. Chamada final */

.final {
  position: relative;
  padding: var(--sec) 0 calc(var(--sec) + 20px);
  overflow: hidden;
  background: radial-gradient(70% 60% at 80% 40%, rgba(212, 170, 104, .16), transparent 70%), #070708;
}

.final__glow {
  position: absolute;
  right: -20vw;
  top: 10%;
  width: 70vw;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(212, 170, 104, .14), transparent 70%);
  pointer-events: none;
}

.final__device {
  position: absolute;
  right: -16vw;
  top: -4%;
  width: 52vw;
  opacity: .5;
  transform: rotate(14deg);
  pointer-events: none;
}

.final__device img {
  width: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 40%, transparent 85%);
}

.final__copy {
  position: relative;
  z-index: 2;
}

.final__copy .t-h2 {
  max-width: 13em;
  margin-bottom: 18px;
}

.final__copy .t-lede {
  margin-bottom: 30px;
}

@media (min-width: 900px) {
  .final__device {
    right: 6vw;
    top: 8%;
    width: 24vw;
    opacity: .9;
    transform: rotate(9deg);
  }
}

/* Movimento reduzido: tudo estático */

@media (prefers-reduced-motion: reduce) {
  .hero__ring,
  .hero__device img {
    animation: none;
  }
}
