/* ==========================================================================
   DoraCraft | landing page
   Sistema: preto e branco. A cor mora nos produtos (vaso do hero e galeria).
   Ideia central: camadas. Degraus entre seções, vaso impresso no hero.
   ========================================================================== */

@property --pla {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff7bac;
}

:root {
  --black: #0a0a0a;
  --white: #fff;
  --g50: #f4f4f4;
  --g200: #e4e4e4;
  --g500: #6b6b6b;
  --g700: #3f3f3f;

  --on-dark: rgba(255, 255, 255, .72);
  --line-dark: rgba(255, 255, 255, .16);

  --wrap: 1180px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --step-h: 44px;

  /* degraus: dez camadas subindo da esquerda para a direita */
  --stairs: polygon(
    0 100%, 0 90%, 10% 90%, 10% 80%, 20% 80%, 20% 70%, 30% 70%, 30% 60%,
    40% 60%, 40% 50%, 50% 50%, 50% 40%, 60% 40%, 60% 30%, 70% 30%, 70% 20%,
    80% 20%, 80% 10%, 90% 10%, 90% 0, 100% 0, 100% 100%
  );
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

svg, img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.sec--dark :focus-visible, .top :focus-visible, .foot :focus-visible { outline-color: var(--white); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  padding: .6rem 1rem; border-radius: 8px; background: var(--white); color: var(--black);
  font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip:focus { top: 1rem; }

/* ---------- tipografia ---------- */
h1, h2, h3 { text-wrap: balance; }

h2 {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 650;
}

h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 650; letter-spacing: -.015em; }

.lead { max-width: 34rem; font-size: 1.15rem; line-height: 1.55; color: var(--g700); text-wrap: pretty; }
.sec--dark .lead { color: var(--on-dark); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .7rem 1.45rem;
  background: transparent;
  border: 1.5px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background-color .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }

.btn--sm { min-height: 2.6rem; padding: .45rem 1.15rem; font-size: .95rem; }
.btn--lg { min-height: 3.75rem; padding: .9rem 2.1rem; font-size: 1.1rem; }

.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: var(--g200); }

.btn--ghost { border-color: rgba(255, 255, 255, .38); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #2a2a2a; }

/* ---------- seções e degraus ---------- */
.sec {
  position: relative;
  padding-block: clamp(5rem, 10vw, 9rem);
}

/* a borda de cada seção sobe sobre a anterior em degraus, como camadas de impressão */
.sec--step::before {
  content: "";
  position: absolute; left: 0; right: 0;
  bottom: calc(100% - 1px);
  height: var(--step-h);
  background: inherit;
  clip-path: var(--stairs);
  pointer-events: none;
}

.sec--dark  { background: var(--black); color: var(--white); }
.sec--light { background: var(--white); }

.head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- cabeçalho ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; padding-block: 1.25rem; color: var(--white); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.logo {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.45rem; line-height: 1; letter-spacing: -.04em; text-decoration: none;
}
.logo b { font-weight: 750; }
.logo span { font-weight: 300; }
.logo__mark { width: 1.5rem; height: 1.5rem; flex: none; }

.nav { display: none; gap: 2.25rem; }
.nav a {
  padding-block: .3rem; border-bottom: 1.5px solid transparent;
  font-weight: 450; font-size: .98rem; color: var(--on-dark); text-decoration: none;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--white); border-color: var(--white); }

@media (min-width: 860px) { .nav { display: flex; } }

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(7.5rem, 12vw, 10rem);
  padding-bottom: clamp(6rem, 10vw, 9rem);
}

.hero__grid { display: grid; gap: 3.5rem; align-items: center; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4rem; }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: .95;
  letter-spacing: -.05em;
  font-weight: 700;
}

.lede {
  max-width: 33rem; margin-top: 1.75rem;
  font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.55;
  color: var(--on-dark);
  text-wrap: pretty;
}

.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }

/* ---------- vaso impresso (SVG montado em js/main.js) ---------- */
.stage { display: grid; justify-items: center; gap: 1.5rem; }

.vase {
  --pla: #ff7bac;
  --layer-ms: 38ms;
  --start-ms: 450ms;
  --print-ms: 2432ms;
  width: min(100%, 440px);
  height: auto;
  overflow: visible;
  transition: --pla .5s ease;
}

.sh0 { stop-color: color-mix(in oklab, var(--pla) 55%, #000); }
.sh1 { stop-color: color-mix(in oklab, var(--pla) 80%, #fff); }
.sh2 { stop-color: color-mix(in oklab, var(--pla) 92%, #fff); }
.sh3 { stop-color: var(--pla); }
.sh4 { stop-color: color-mix(in oklab, var(--pla) 52%, #000); }

/* brilho suave na cor do filamento, aparece quando a peça termina */
.hs0 { stop-color: var(--pla); stop-opacity: .4; }
.hs1 { stop-color: var(--pla); stop-opacity: 0; }

.slice {
  fill: url(#shade);
  transform-box: fill-box;
  transform-origin: left center;
  animation: lay .26s ease-out backwards;
  animation-delay: calc(var(--i) * var(--layer-ms) + var(--start-ms));
}
.slice:nth-child(even) { transform-origin: right center; }

@keyframes lay {
  from { opacity: 0; transform: scaleX(.15); }
  to   { opacity: 1; transform: scaleX(1); }
}

.floor-shadow { fill: rgba(255, 255, 255, .07); }
.plinth rect:first-child { fill: #1c1c1c; }
.plinth__sheen { fill: rgba(255, 255, 255, .18); }

.halo, .rim { opacity: 0; transition: opacity .7s ease; }
.rim__outer { fill: color-mix(in oklab, var(--pla) 80%, #fff); }
.rim__inner { fill: #1a1a1a; }

.vase.is-printed .rim, .vase.is-printed .halo { opacity: 1; }

/* cabeçote da impressora */
.gantry { animation: rise var(--print-ms) linear var(--start-ms) both; transition: opacity .5s ease; }
.gantry line { stroke: rgba(255, 255, 255, .28); stroke-width: 1.5; stroke-dasharray: 3 5; }
.nozzle { animation: sweep .46s ease-in-out infinite alternate; }
.nozzle__body  { fill: #f4f4f4; }
.nozzle__block { fill: #bdbdbd; }
.nozzle__tip   { fill: #fff; }
.vase.is-printed .gantry { opacity: 0; }

@keyframes rise  { from { transform: translateY(490px); } to { transform: translateY(68px); } }
@keyframes sweep { from { transform: translateX(-62px); } to { transform: translateX(62px); } }

/* escolha de cor do filamento */
.swatches { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .7rem; }
.swatches__label { margin-right: .3rem; font-size: .92rem; color: var(--on-dark); }

.sw { position: relative; display: block; cursor: pointer; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw__dot {
  display: block; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25);
  transition: box-shadow .15s;
}
.sw input:checked + .sw__dot { box-shadow: 0 0 0 3px var(--black), 0 0 0 5px var(--white); }
.sw input:focus-visible + .sw__dot { outline: 3px solid var(--white); outline-offset: 7px; }

/* ---------- galeria da loja (estilo feed) ---------- */
.profile {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem;
  padding-bottom: 1.5rem; margin-bottom: .25rem;
}
.profile__avatar {
  display: grid; place-items: center; flex: none;
  width: 4.25rem; height: 4.25rem; border-radius: 50%;
  background: var(--black); color: var(--white);
}
.profile__avatar svg { width: 1.9rem; height: 1.9rem; }
.profile__txt { display: grid; flex: 1 1 14rem; line-height: 1.3; }
.profile__txt strong { font-size: 1.2rem; font-weight: 650; letter-spacing: -.02em; }
.profile__txt span { color: var(--g500); font-size: .95rem; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 700px) { .gallery { gap: 6px; } }

.tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--g200); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }

.tile__over {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .15rem;
  padding: clamp(.6rem, 2vw, 1.1rem);
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .1) 65%);
  color: var(--white); line-height: 1.25;
  opacity: 0; transition: opacity .2s;
}
.tile__name { font-weight: 650; font-size: clamp(.8rem, 1.6vw, 1.1rem); letter-spacing: -.01em; }
.tile__go { font-size: clamp(.72rem, 1.2vw, .9rem); color: rgba(255, 255, 255, .8); }

.tile:focus-visible .tile__over { opacity: 1; }
.tile:focus-visible { outline-offset: -4px; outline-color: var(--white); }
@media (hover: hover) {
  .tile:hover .tile__over { opacity: 1; }
  .tile:hover img { transform: scale(1.04); }
}

.shop-cta { margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- sob encomenda ---------- */
.options { display: grid; gap: 2.5rem; margin-bottom: clamp(3.5rem, 7vw, 6rem); }
@media (min-width: 900px) { .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; } }

.option {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: start; gap: 1.5rem;
  padding-top: 1.5rem; border-top: 1.5px solid currentColor;
}
.option img { width: 6.5rem; height: 6.5rem; border-radius: 10px; }
.option__txt { display: grid; gap: .6rem; }
.option h3 { font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 650; }
.option p { max-width: 30rem; color: var(--on-dark); text-wrap: pretty; }

.steps__title { margin-bottom: 1.5rem; font-size: 1.35rem; }

.steps { display: grid; gap: 2.25rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; } }

.step { padding-top: 1.25rem; border-top: 1.5px solid currentColor; }
.step__n {
  display: block; margin-bottom: 1rem;
  font-size: 4.25rem; line-height: .9; font-weight: 700; letter-spacing: -.06em;
}
.step h3 { margin-bottom: .6rem; }
.step p { color: var(--on-dark); text-wrap: pretty; }

/* ---------- contato ---------- */
.cta__in { display: grid; gap: 3rem; align-items: center; }
.cta__copy { display: grid; justify-items: start; gap: 1.75rem; }
.cta h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.05em; font-weight: 700; }
.cta h2 span { display: block; }
.cta .lead { max-width: 30rem; }
.cta__alt { color: var(--g700); font-size: 1rem; }
.cta__alt a { color: var(--black); font-weight: 600; text-underline-offset: .2em; }

/* a marca em tamanho grande: camadas empilhadas, a de cima mais clara */
.cta__stack { display: none; width: min(100%, 380px); justify-self: end; }
.cta__stack rect { fill: var(--black); }
.cta__stack rect:last-child { fill: #b8b8b8; }

@media (min-width: 900px) {
  .cta__in { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 4rem; }
  .cta__stack { display: block; }
}

/* ---------- rodapé ---------- */
.foot { padding-block: 2.25rem; background: var(--black); color: var(--on-dark); }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; }
.foot .logo { color: var(--white); font-size: 1.25rem; }
.foot p { font-size: .95rem; }
.foot__link { font-weight: 550; color: var(--white); text-underline-offset: .2em; }

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slice { animation: none; }
  .gantry { display: none; }
  .vase, .halo, .rim, .tile img { transition-duration: .01s; }
}
