:root{
  --navy:        #0F2E52;
  --navy-deep:   #253064;
  --azure:       #30ace3;
  --gold:        #ffde0d;
  --gold-soft:   #ffde0d;
  --cream:       #FBF7EE;
  --ink:         #10233F;
  --ink-soft:    #4C5D78;
  --line:        #DDE3EC;
  --white:       #FFFFFF;

  --display: "Poppins", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }

html,body{
  background:var(--white);
  color:var(--ink);
  font-family:var(--body);
  -webkit-font-smoothing:antialiased;
}

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

button{
  font-family:inherit;
  cursor:pointer;
  border:none;
  background:none;
  color:inherit;
}

button:focus-visible, input:focus-visible{
  outline:2.5px solid var(--azure);
  outline-offset:3px;
}

/* ---------- topbar ---------- */
.topbar{
  padding:22px min(6vw,64px);
  border-bottom:1px solid var(--line);
}
.brand{
  font-family:var(--body);
  font-weight:800;
  font-size:13px;
  letter-spacing:.14em;
  color:var(--navy);
}

/* ---------- hero ---------- */
.hero{
  position:relative;
  isolation:isolate;
  width:min(1240px, calc(100% - 48px));
  margin:0 auto;
  padding:30px 0 64px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:56px;
  align-items:center;
}

.hero-copy{ max-width:520px; }

.eyebrow{
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.16em;
  color:var(--azure);
  margin-bottom:18px;
}

.hero h1{
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(40px,5vw,60px);
  line-height:1.06;
  letter-spacing:-1px;
  color:var(--navy-deep);
}

.lede{
  margin-top:22px;
  font-size:18px;
  line-height:1.55;
  color:var(--ink-soft);
  max-width:440px;
}

.steps{
  list-style:none;
  margin-top:40px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.steps li{
  font-size:15px;
  font-weight:600;
  color:var(--navy);
  display:flex;
  align-items:baseline;
  gap:12px;
}
.steps .num{
  font-family:var(--display);
  font-weight:600;
  font-size:13px;
  color:var(--azure);
}

.hero-photo{
  position:relative;
  aspect-ratio:1/1;
  border-radius:28px;
  background-image:url("img/bg-botelho.jpg?v=2");
  background-size:cover;
  background-position:center 20%;
  box-shadow:0 30px 60px -20px rgba(15,46,82,.35);
}
.hero-photo-xs {
  display: none;
  aspect-ratio:1/1;
  border-radius:28px;
  background-image:url("img/bg-botelho.jpg?v=2");
  background-size:cover;
  background-position:center 20%;
  box-shadow:0 30px 60px -20px rgba(15,46,82,.35);
}
.hero-photo::after{
  content:"";
  position:absolute; inset:0;
  border-radius:28px;
  /*background:linear-gradient(180deg, rgba(10,33,64,0) 55%, rgba(10,33,64,.55) 100%);*/
}

/* ---------- builder card ---------- */
.builder{
  width:min(1240px, calc(100% - 48px));
  margin:0 auto 96px;
  display:flex;
  justify-content:center;
}

.card{
  width:100%;
  max-width:440px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:36px 32px 30px;
  box-shadow:0 20px 50px -28px rgba(15,46,82,.28);
  text-align:center;
}

/* ---------- avatar circle ---------- */
.avatar-stage{
  display:flex;
  justify-content:center;
  margin-bottom:26px;
}

.avatar-circle{
  position:relative;
  width:min(340px, 78vw);
  aspect-ratio:1/1;
}

.ring{
  position:absolute; inset:0;
  border-radius:50%;
  padding:4px;
  background:#fff;
  box-shadow:0 10px 26px -6px rgba(15,46,82,.28);
  transition:background .25s ease;
}

.avatar-inner{
  position:absolute; inset:4px;
  border-radius:50%;
  overflow:hidden;
  background:var(--cream);
}

.user-photo{
  position:absolute;
  top:0; left:0;
  max-width:none;
  touch-action:none;
  cursor:grab;
  -webkit-user-drag:none;
  user-select:none;
}
.user-photo:active{ cursor:grabbing; }

.drag-hint{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  padding:4px 10px;
  border-radius:999px;
  background:rgba(10,33,64,.62);
  color:#fff;
  font-size:10.5px;
  font-weight:600;
  letter-spacing:.02em;
  pointer-events:none;
  opacity:0;
  transition:opacity .2s ease;
  white-space:nowrap;
}
.drag-hint.visible{ opacity:1; }

.avatar-placeholder{
  position:absolute; inset:0;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:6px;
  padding:20px;
  text-align:center;
  bottom: 38%;
}
.avatar-placeholder span{
  font-weight:700;
  font-size:14.5px;
  color:var(--navy);
}
.avatar-placeholder small{
  font-size:12.5px;
  color:var(--ink-soft);
}

.banner{
  position:absolute;
  left:50%;
  bottom:0%;
  transform:translateX(-50%);
  width:100%;
  pointer-events:none;
}
.banner-img{
  width:100%;
  height:auto;
  display:block;
  filter:drop-shadow(0 6px 14px rgba(15,46,82,.35));
}

/* ---------- upload button ---------- */
.btn-upload{
  width:100%;
  padding:14px;
  border:1.5px dashed var(--navy);
  border-radius:14px;
  background:rgba(29,95,160,.05);
  color:var(--navy);
  font-weight:700;
  font-size:14.5px;
  display:flex; align-items:center; justify-content:center; gap:8px;
  transition:background .15s ease, border-color .15s ease;
}
.btn-upload:hover{ background:rgba(29,95,160,.1); }

/* ---------- zoom ---------- */
.zoom-control{ margin-top:22px; text-align:left; }
.zoom-label{
  font-size:12.5px;
  font-weight:700;
  color:var(--ink-soft);
  letter-spacing:.02em;
}
.zoom-row{
  margin-top:10px;
  display:flex; align-items:center; gap:10px;
}
.zoom-btn{
  flex:0 0 auto;
  width:28px; height:28px;
  border-radius:50%;
  border:1.5px solid var(--line);
  font-size:16px; font-weight:700;
  color:var(--navy);
  display:flex; align-items:center; justify-content:center;
}
.zoom-btn:hover{ border-color:var(--azure); color:var(--azure); }

input[type="range"]{
  flex:1;
  -webkit-appearance:none;
  height:4px;
  border-radius:2px;
  background:var(--line);
  outline-offset:6px;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:16px; height:16px;
  border-radius:50%;
  background:var(--azure);
  border:2px solid #fff;
  box-shadow:0 1px 4px rgba(15,46,82,.4);
  cursor:pointer;
}
input[type="range"]::-moz-range-thumb{
  width:16px; height:16px; border:2px solid #fff; border-radius:50%;
  background:var(--azure); cursor:pointer;
}

/* ---------- frame picker ---------- */
.frame-picker{ margin-top:26px; text-align:left; }
.section-label{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.1em;
  color:var(--ink-soft);
  margin-bottom:12px;
}
.frame-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.frame-opt{
  border:2px solid var(--line);
  border-radius:14px;
  padding:12px 8px 10px;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  transition:border-color .15s ease, transform .1s ease;
}
.frame-opt:hover{ border-color:var(--azure); }
.frame-opt.active{
  border-color:var(--navy);
  background:rgba(15,46,82,.04);
}
.opt-swatch{
  width:84px; height:84px;
  border-radius:50%;
  flex:0 0 auto;
}
.swatch-navy{ background-image: url("img/thumb1.jpg"); background-size: cover; }
.swatch-gold{ background-image: url("img/thumb2.jpg"); background-size: cover; }
.swatch-botjana{ background-image: url("img/thumb3.jpg"); background-size: cover; }
.opt-name{
  font-size:11.5px;
  font-weight:700;
  color:var(--navy);
  text-align:center;
  line-height:1.25;
}

/* ---------- download ---------- */
.btn-download{
  width:100%;
  margin-top:26px;
  padding:15px;
  border-radius:14px;
  background:var(--line);
  color:#8b97a8;
  font-weight:800;
  font-size:15px;
  display:flex; align-items:center; justify-content:center; gap:9px;
  transition:background .18s ease, color .18s ease, transform .1s ease;
}
.btn-download:not(:disabled){
  background:var(--navy-deep);
  color:var(--gold-soft);
}
.btn-download:not(:disabled):hover{
  transform:translateY(-1px);
  background:var(--navy);
}
.btn-download:disabled{ cursor:not-allowed; }

.privacy{
  margin-top:16px;
  font-size:12px;
  color:var(--ink-soft);
}

.download-error{
  margin-top:14px;
  padding:10px 12px;
  border-radius:10px;
  background:#fdecec;
  border:1px solid #f3b9b9;
  color:#9c2b2b;
  font-size:12.5px;
  line-height:1.4;
}

/* ---------- footer ---------- */
.footer{
  padding:26px min(6vw,64px) 40px;
  text-align:center;
  font-size:12.5px;
  color:var(--ink-soft);
  border-top:1px solid var(--line);
}

/* ---------- responsive ---------- */
@media (max-width:860px){
  .hero{ grid-template-columns:1fr;  }
  .hero-photo{ order:-1; max-width:340px; margin:0 auto; }
  .hero-copy{ max-width:none; text-align:left; }

  .hero-photo-xs {
  display: block;
  }
}

@media (max-width:480px){
  .card{ padding:28px 20px 24px; }
  .frame-options{ gap:8px; }
}

@media (max-width:360px){
  .frame-options{ grid-template-columns:repeat(1,1fr); }
  .opt-swatch{ width:64px; height:64px; }
}

@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; }
}
