/* Página de criação do presente */

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

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: #3b1a12;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 140, 80, 0.25), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 6 L38 28 L28 50 L18 28 Z' fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='1.6'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #8c0f1b, #6d0a14);
  background-attachment: fixed;
}

.page-snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 4px;
}

.brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: #fff3d1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.hero { text-align: center; padding: 8px 16px 18px; color: #ffe9bd; }
.hero h1 {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4rem);
  color: #fff3d1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.hero p { margin: 4px auto 0; max-width: 560px; font-size: 1.05rem; opacity: 0.92; }

main {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.panel {
  background: linear-gradient(#fffaf0, #f7ead0);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 0 0 3px #d9a441, 0 0 0 6px #fff3d1, 0 0 0 8px #d9a441, 0 16px 40px rgba(0, 0, 0, 0.4);
}

.panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--green);
}

.field { display: block; margin-bottom: 16px; }

.field > span.label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-weight: 800;
  color: #5a2a1c;
}

.field .hint { font-weight: 600; font-size: 0.85rem; color: #8a6a55; }

input[type='text'], input[type='email'], input[type='password'], textarea, select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.05rem;
  color: #3b1a12;
  background: #fff;
  border: 2px solid #e2cfa4;
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { min-height: 170px; resize: vertical; line-height: 1.5; }

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(179, 18, 31, 0.18);
}

.row { display: flex; gap: 10px; }
.row > select { flex: 1; min-width: 0; }

button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: #5a2a1c;
  background: #f1dfb4;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
}

button:hover:not(:disabled) { background: #ebd49b; }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible { box-shadow: 0 0 0 4px rgba(179, 18, 31, 0.25); }

.btn-ghost { background: transparent; border: 2px solid #e2cfa4; padding: 8px 12px; }

.btn-cta {
  width: 100%;
  padding: 15px 18px;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(#d62839, #a8101d);
  box-shadow: 0 4px 0 #6d0a14;
}

.btn-cta:hover:not(:disabled) { background: linear-gradient(#e0303f, #b3121f); }
.btn-cta:disabled { cursor: not-allowed; opacity: 0.6; box-shadow: 0 4px 0 #6d0a14; }

.note { margin: 10px 0 0; font-size: 0.88rem; color: #8a6a55; text-align: center; }

.suggest { margin: -8px 0 16px; }

/* prévia */

.preview { position: sticky; top: 16px; }

.preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.preview-head h2 { margin: 0; }

.toggle {
  display: inline-flex;
  padding: 3px;
  background: #f1dfb4;
  border-radius: 12px;
}

.toggle button { padding: 7px 12px; background: transparent; border-radius: 9px; font-size: 0.92rem; }
.toggle button[aria-pressed='true'] { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); color: var(--red); }

.frame-wrap { display: flex; justify-content: center; }

.frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 4px #2a0a10, 0 10px 30px rgba(0, 0, 0, 0.45);
}

.frame.is-phone {
  width: min(100%, 300px);
  aspect-ratio: 9 / 17;
  border-radius: 30px;
  box-shadow: 0 0 0 8px #1b0a0d, 0 0 0 10px #4a2a2e, 0 10px 30px rgba(0, 0, 0, 0.5);
}

.frame-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.footer { text-align: center; padding: 8px 16px 28px; font-size: 0.85rem; color: rgba(255, 233, 189, 0.75); }

@media (max-width: 920px) {
  main { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
}

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