:root {
  --purple: #8b4eb1;
  --purple-dark: #6a3590;
  --pink: #f34287;
  --lavender: #cdbdf6;
  --coral: #ff8160;
  --ink: #121014;
  --muted: #6b6475;
  --paper: #f6f5f6;
  --white: #fff;
  --gradient: linear-gradient(100deg, var(--purple), var(--pink));
  font-family: "Lexend", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { position: relative; margin: 0; min-width: 320px; overflow-x: hidden; background: var(--paper); }

.clip-definitions { position: absolute; overflow: hidden; pointer-events: none; }

button, input { font: inherit; }

button, label[for] { -webkit-tap-highlight-color: transparent; }

/* Fundo com manchas lilás e bolhas, como no card */
.backdrop { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob-left { width: 520px; height: 900px; left: -300px; top: -120px; background: radial-gradient(closest-side, #a77fd8, rgba(167,127,216,0)); }
.blob-right { width: 480px; height: 760px; right: -260px; top: 360px; background: radial-gradient(closest-side, #b49be6, rgba(180,155,230,0)); }
.bubbles { position: absolute; }
.bubbles i { position: absolute; display: block; border-radius: 50%; }
.bubbles-top { right: 0; top: 0; width: 180px; height: 200px; }
.bubbles-top i:nth-child(1) { width: 110px; height: 110px; right: 30px; top: -30px; background: var(--pink); }
.bubbles-top i:nth-child(2) { width: 62px; height: 62px; right: -14px; top: 52px; background: var(--lavender); }
.bubbles-top i:nth-child(3) { width: 48px; height: 48px; right: 32px; top: 118px; background: var(--coral); }
.bubbles-bottom { left: 38%; top: 120px; width: 80px; height: 60px; }
.bubbles-bottom i:nth-child(1) { width: 46px; height: 46px; left: 0; top: 0; background: var(--lavender); }
.bubbles-bottom i:nth-child(2) { width: 26px; height: 26px; left: 38px; top: 26px; background: var(--pink); }

.site-header, main, footer { position: relative; z-index: 1; }

.site-header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: auto;
  padding: 0 32px;
}

.brand { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; color: var(--ink); text-decoration: none; line-height: .82; }
.brand-word { font-size: 27px; font-weight: 600; letter-spacing: -.03em; }
.brand-year { font-size: 16px; font-style: italic; font-weight: 400; line-height: 1.1; }
.brand-city { grid-column: 1 / -1; justify-self: end; margin-top: 2px; font-size: 17px; font-weight: 400; }
.event-link { padding: 10px 16px; border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .2s; }
.event-link:hover { background: var(--white); }

.hero {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr);
  gap: 72px;
  align-items: center;
  max-width: 1240px;
  margin: auto;
  padding: 40px 32px 100px;
}

.hero-copy, .generator { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 18px; color: var(--purple); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(64px, 8.4vw, 124px); font-weight: 400; line-height: .95; letter-spacing: -.02em; }
h1 .hash { color: transparent; -webkit-text-stroke: 3px var(--purple); margin-right: .02em; }
.tagline { position: relative; margin: 30px 0 0; padding-left: 20px; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.tagline::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 4px; background: var(--pink); }
.hero-text { max-width: 470px; margin: 22px 0 34px; color: var(--muted); font-size: 17px; font-weight: 300; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-actions > span { color: var(--muted); font-size: 12px; }

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, button:focus-visible, input:focus-visible, .event-link:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: var(--white); background: var(--gradient); box-shadow: 0 14px 30px rgba(139, 78, 177, .3); }
.button-primary:hover { box-shadow: 0 18px 36px rgba(243, 66, 135, .32); }
.button-secondary { color: var(--purple-dark); background: #f1ebf8; }

.generator { width: 100%; max-width: 560px; justify-self: end; }
.card-shell { padding: 12px; border: 1px solid rgba(255,255,255,.9); border-radius: 28px; background: rgba(255,255,255,.55); box-shadow: 0 30px 80px rgba(106, 53, 144, .18); backdrop-filter: blur(12px); }
.card-preview { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1080 / 1350; border-radius: 18px; background: var(--paper); user-select: none; touch-action: none; }
.template { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
/* Área do arco no template: x 74.24, y 367.97, 550.52 × 723.22 de 1080 × 1350 */
.photo-frame {
  position: absolute;
  z-index: 1;
  left: 6.874%;
  top: 27.257%;
  width: 50.974%;
  height: 53.572%;
  overflow: hidden;
  clip-path: url(#photo-clip);
  background: linear-gradient(160deg, #efe8fb, #dccdf5);
  cursor: grab;
}
.photo-frame:active { cursor: grabbing; }
.photo-frame > img { position: absolute; display: block; max-width: none; pointer-events: none; transform-origin: center; will-change: transform; }
.empty-photo { position: absolute; inset: 0; width: 100%; padding-top: 12%; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--purple-dark); background: linear-gradient(160deg, #f4effc, #dccdf5); cursor: pointer; text-align: center; }
.empty-photo[hidden] { display: none; }
.empty-photo-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 7px; border-radius: 50%; color: white; background: var(--gradient); box-shadow: 0 8px 22px rgba(139, 78, 177, .3); }
.empty-photo svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-photo strong { font-size: clamp(13px, 1.4vw, 18px); font-weight: 600; }
.empty-photo small { opacity: .75; font-size: clamp(9px, 1vw, 13px); }

.editor-controls { margin-top: 14px; padding: 19px; color: var(--ink); border-radius: 20px; background: white; box-shadow: 0 12px 30px rgba(106, 53, 144, .08); }
.control-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.control-header strong, .control-header span { display: block; }
.control-header strong { font-size: 14px; font-weight: 600; }
.control-header span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.text-button { padding: 7px 0; border: 0; color: var(--pink); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; }
.file-input { position: fixed; left: -10000px; width: 1px; height: 1px; opacity: .01; }
.photo-frame.is-dragging { outline: 4px solid var(--pink); outline-offset: -4px; }
.zoom-control { display: grid; grid-template-columns: 20px 1fr 20px; align-items: center; gap: 12px; margin: 16px 0; color: #8a8195; }
.zoom-control svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
input[type="range"] { width: 100%; accent-color: var(--purple); }
.download-actions { display: grid; grid-template-columns: 1fr .72fr; gap: 10px; }
.download-actions .button { min-height: 47px; padding: 0 14px; font-size: 13px; }

.steps { max-width: 1180px; margin: auto; padding: 90px 32px; text-align: center; }
.steps .eyebrow { color: var(--pink); }
.steps h2 { margin: 0 0 55px; font-size: clamp(34px, 4vw, 52px); font-weight: 400; line-height: 1.1; letter-spacing: -.02em; }
.steps h2 span { color: var(--purple); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: left; }
.steps article { position: relative; overflow: hidden; min-height: 235px; padding: 32px; border: 1px solid #ebe5f2; border-radius: 28px; background: rgba(255,255,255,.75); }
.steps article::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -30px; border-radius: 50%; background: var(--lavender); opacity: .45; }
.steps article > span { color: var(--pink); font-size: 13px; font-weight: 600; }
.steps h3 { margin: 40px 0 10px; font-size: 21px; font-weight: 500; }
.steps article p { margin: 0; color: var(--muted); font-weight: 300; line-height: 1.6; }

.highlight { max-width: 1180px; margin: 0 auto 90px; padding: 0 32px; }
.highlight p { margin: 0; font-size: clamp(26px, 3.4vw, 44px); letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.highlight p span { display: block; padding-left: clamp(40px, 12vw, 160px); color: var(--pink); }
.highlight small { display: block; max-width: 560px; margin-top: 22px; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.6; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 30px max(32px, calc((100vw - 1180px) / 2)); color: #ded3ee; background: #1d1324; font-size: 12px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; padding: 12px 18px; border-radius: 999px; color: white; background: #1d1324; box-shadow: 0 12px 35px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 52px; padding-top: 30px; }
  .hero-copy { text-align: center; }
  .hero-copy > * { margin-left: auto; margin-right: auto; }
  .tagline { width: fit-content; text-align: left; }
  .hero-actions { justify-content: center; }
  .generator { justify-self: center; max-width: 540px; }
  .bubbles-bottom { display: none; }
}

@media (max-width: 640px) {
  .site-header { height: 80px; padding: 0 16px; }
  .brand-word { font-size: 23px; }
  .brand-year { font-size: 14px; }
  .brand-city { font-size: 14px; }
  .event-link { font-size: 12px; }
  .bubbles-top { transform: scale(.6); transform-origin: top right; }
  .hero { padding: 24px 16px 60px; }
  .hero-text { font-size: 15px; }
  .hero-actions { display: block; }
  .hero-actions .button { width: 100%; }
  .hero-actions > span { display: block; margin-top: 12px; }
  .card-shell { padding: 7px; border-radius: 20px; }
  .card-preview { border-radius: 14px; }
  .editor-controls { padding: 16px; }
  .download-actions { grid-template-columns: 1fr; }
  .steps { padding: 60px 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps article { min-height: 190px; }
  .steps h3 { margin-top: 28px; }
  .highlight { padding: 0 16px; margin-bottom: 60px; }
  footer { flex-direction: column; padding: 28px 16px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
