/* ============================================================
   Pizza Solidária – AMA Jundiaí
   style.css – Custom styles (complemento ao Tailwind)
   ============================================================ */

/* ── Variáveis ── */
:root {
  --ama-blue:      #1a4f8a;
  --ama-blue-mid:  #2563eb;
  --ama-red:       #e53e3e;
  --ama-yellow:    #f6ad55;
  --ama-green:     #38a169;
  --border-radius: 1.25rem;
  --shadow-card:   0 4px 24px rgba(26,79,138,.10);
  --shadow-hover:  0 8px 32px rgba(26,79,138,.18);
  --font-heading:  'Nunito', sans-serif;
  --font-body:     'Inter', sans-serif;
  --transition:    .25s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: #1a202c;
  background-color: #f9fafb;
}

/* ── Scrollbar customizada ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--ama-blue); border-radius: 99px; }

/* ============================================================
   HEADER / GLASS
   ============================================================ */
.glass-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 79, 138, 0.08);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  min-height: 88vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(160deg, #0f3460 0%, #1a4f8a 45%, #2563eb 80%, #1e40af 100%);
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(230, 62, 62, .15) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(246, 173, 85, .12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-title-big {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: -2px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.hero-title-vidas {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 8.5rem);
  letter-spacing: -3px;
  line-height: .9;
  background: linear-gradient(135deg, #f6ad55, #ed8936, #f6ad55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}

.price-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 2rem;
  padding: 1.25rem 2.5rem;
  color: #fff;
  font-family: var(--font-heading);
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  padding: .9rem 2.2rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(229,62,62,.45);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary-hero:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 32px rgba(229,62,62,.55);
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg { display: block; width: 100%; height: 60px; }

/* ============================================================
   PUZZLE PIECES BACKGROUND
   ============================================================ */
.puzzle-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.puzzle-piece {
  position: absolute;
  font-size: 2rem;
  opacity: .04;
  animation: floatPuzzle linear infinite;
  user-select: none;
}

.puzzle-piece--1 { left: 5%;  top: 10%; animation-duration: 18s; animation-delay: 0s; }
.puzzle-piece--2 { left: 88%; top: 15%; animation-duration: 22s; animation-delay: 3s; }
.puzzle-piece--3 { left: 20%; top: 75%; animation-duration: 16s; animation-delay: 6s; }
.puzzle-piece--4 { left: 70%; top: 60%; animation-duration: 20s; animation-delay: 1s; }
.puzzle-piece--5 { left: 50%; top: 40%; animation-duration: 25s; animation-delay: 8s; }

@keyframes floatPuzzle {
  0%   { transform: translateY(0) rotate(0deg);   opacity: .04; }
  50%  { transform: translateY(-30px) rotate(180deg); opacity: .07; }
  100% { transform: translateY(0) rotate(360deg); opacity: .04; }
}

/* ============================================================
   SECTION HELPERS
   ============================================================ */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ama-blue);
  background: rgba(37, 99, 235, .08);
  padding: .3rem 1rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.5px;
}

/* ============================================================
   FLAVOR CARDS
   ============================================================ */
.flavor-card {
  position: relative;
  background: #fff;
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
  cursor: default;
}

.flavor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(26, 79, 138, .2);
}

.flavor-card--featured {
  border-color: var(--ama-red) !important;
  box-shadow: 0 4px 24px rgba(229,62,62,.18), var(--shadow-card);
}

.flavor-card--featured:hover {
  box-shadow: 0 8px 40px rgba(229,62,62,.28), var(--shadow-hover);
}

.featured-ribbon {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  font-family: var(--font-heading);
  padding: .25rem 2.5rem;
  transform: rotate(45deg);
  letter-spacing: .05em;
}

.flavor-emoji-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: transform var(--transition);
}

.flavor-card:hover .flavor-emoji-wrapper { transform: scale(1.1) rotate(-5deg); }

.flavor-emoji { font-size: 2.5rem; line-height: 1; }

.flavor-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .75rem;
  border-radius: 999px;
  margin-bottom: .75rem;
}

.flavor-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  color: #1a202c;
  margin-bottom: 1rem;
  text-align: center;
}

.flavor-ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  space-y: .5rem;
  text-align: left;
}

.flavor-ingredients li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: #4a5568;
  padding: .25rem 0;
  border-bottom: 1px solid #f7fafc;
}

.ingredient-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.flavor-price {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--ama-blue);
  background: rgba(37, 99, 235, .06);
  padding: .5rem 1rem;
  border-radius: .75rem;
  margin-top: auto;
}

/* ============================================================
   INFO CARDS (Retirada)
   ============================================================ */
.info-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), background var(--transition);
}

.info-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
}

.info-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.info-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: .25rem;
}

.info-value {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  color: #fff;
  line-height: 1.1;
}

.info-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-top: .25rem;
}

/* ============================================================
   PIX CARD
   ============================================================ */
.pix-card {
  background: #fff;
  border-radius: calc(var(--border-radius) * 1.5);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  border: 2px solid rgba(56, 161, 105, .2);
}

.pix-key-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: linear-gradient(135deg, #f0fff4, #e6fffa);
  border: 2px solid #9ae6b4;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.pix-key-text {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #276749;
  flex: 1;
  word-break: break-all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--ama-green);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: .4rem .9rem;
  border-radius: .6rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover  { background: #276749; transform: scale(1.05); }
.copy-btn.copied { background: #276749; }

.qr-box {
  background: #fff;
  border: 3px solid var(--ama-blue);
  border-radius: 1rem;
  padding: .75rem;
  box-shadow: 0 4px 16px rgba(26,79,138,.15);
}

.qr-image {
  display: block;
}

.pix-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   FORM CARD
   ============================================================ */
.form-card {
  background: #fff;
  border-radius: calc(var(--border-radius) * 1.5);
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(26,79,138,.12);
  border: 1px solid rgba(26,79,138,.08);
}

@media (max-width: 640px) {
  .form-card { padding: 1.5rem 1rem; }
  .pix-card  { padding: 1.5rem 1rem; }
}

/* ── Progress Steps ── */
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}

.step-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #718096;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.step-item.active .step-circle {
  background: var(--ama-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.2);
}

.step-item.done .step-circle {
  background: var(--ama-green);
  color: #fff;
}

.step-label {
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #718096;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.step-item.active .step-label { color: var(--ama-blue); }
.step-item.done  .step-label { color: var(--ama-green); }

.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  border-radius: 1px;
  transition: background var(--transition);
  margin-bottom: 1.25rem;
}

.step-line.done { background: var(--ama-green); }

/* ── Fieldset / Block ── */
.form-block {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.form-block-legend {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ama-blue);
  padding: 0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 2px solid rgba(26,79,138,.1);
  padding-bottom: .75rem;
  width: 100%;
}

.legend-icon { font-size: 1.2rem; }

/* ── Form Groups ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .9rem;
  color: #2d3748;
  margin-bottom: .5rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: .8rem 1rem .8rem 2.75rem;
  border: 2px solid #e2e8f0;
  border-radius: .875rem;
  font-size: .95rem;
  font-family: var(--font-body);
  color: #1a202c;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--ama-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-input.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 4px rgba(229, 62, 62, .1);
}

.form-input.valid {
  border-color: var(--ama-green);
  box-shadow: 0 0 0 4px rgba(56, 161, 105, .1);
}

.form-select { cursor: pointer; }

.form-textarea {
  resize: vertical;
  min-height: 90px;
  padding-top: .8rem;
  line-height: 1.5;
}

/* ── Quantity controls ── */
.qty-wrapper {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.qty-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid #e2e8f0;
  border-radius: .75rem;
  background: #f7fafc;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ama-blue);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: var(--ama-blue);
  color: #fff;
  border-color: var(--ama-blue);
  transform: scale(1.08);
}

.qty-input {
  width: 5rem;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
  font-weight: 800;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.qty-total-display {
  margin-top: .5rem;
  font-size: .9rem;
  color: #4a5568;
}

.qty-total-display strong {
  color: var(--ama-blue);
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

/* ── Upload Area ── */
.upload-area {
  position: relative;
  border: 2.5px dashed #cbd5e0;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  overflow: hidden;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--ama-blue);
  background: rgba(37, 99, 235, .04);
}

.upload-area.error { border-color: #e53e3e; }
.upload-area.valid { border-color: var(--ama-green); background: rgba(56,161,105,.04); }

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.upload-placeholder { pointer-events: none; }

.upload-icon-circle {
  width: 56px;
  height: 56px;
  background: rgba(37, 99, 235, .08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background var(--transition);
}

.upload-area:hover .upload-icon-circle { background: rgba(37, 99, 235, .15); }

.upload-preview {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  width: 100%;
}

.upload-preview.hidden { display: none !important; }

.upload-preview-img {
  max-height: 120px;
  max-width: 100%;
  border-radius: .75rem;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.upload-preview-info { text-align: center; }

.upload-preview-name {
  font-weight: 700;
  font-size: .9rem;
  color: #2d3748;
  word-break: break-all;
  max-width: 250px;
  margin: 0 auto;
}

.upload-preview-size {
  font-size: .8rem;
  color: #718096;
  margin-top: .1rem;
}

.upload-remove-btn {
  pointer-events: all;
  display: inline-block;
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ama-red);
  background: rgba(229,62,62,.08);
  border: 1px solid rgba(229,62,62,.2);
  border-radius: .5rem;
  padding: .2rem .7rem;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-heading);
}

.upload-remove-btn:hover { background: rgba(229,62,62,.15); }

/* ── Form Error ── */
.form-error {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #c53030;
  margin-top: .35rem;
  min-height: 1rem;
  transition: opacity var(--transition);
}

/* ── Submit Button ── */
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: linear-gradient(135deg, var(--ama-blue) 0%, #1e40af 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 79, 138, .4);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: .02em;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 79, 138, .5);
  background: linear-gradient(135deg, #1e40af 0%, var(--ama-blue) 100%);
}

.btn-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* ── Success State ── */
.success-check-anim {
  animation: scaleIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ============================================================
   IMPACT CARDS
   ============================================================ */
.impact-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 2px solid rgba(26, 79, 138, .06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.impact-number {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: .5rem;
}

.impact-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: #1a202c;
  margin-bottom: .25rem;
}

.impact-desc {
  font-size: .85rem;
  color: #718096;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(2rem);
  background: #1a202c;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .9rem;
  padding: .85rem 1.75rem;
  border-radius: .875rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.hidden { display: none; }

.toast.toast-success { background: linear-gradient(135deg, #276749, #38a169); }
.toast.toast-error   { background: linear-gradient(135deg, #9b2335, #e53e3e); }
.toast.toast-info    { background: linear-gradient(135deg, #1a4f8a, #2563eb); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top-btn {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  background: var(--ama-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,79,138,.35);
  transition: all var(--transition);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top-btn:hover  { transform: translateY(-3px); background: #1e40af; }
.scroll-top-btn.hidden { display: none; }

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  .hero-section { min-height: 100dvh; }

  .price-badge { padding: 1rem 1.5rem; }

  .step-label { display: none; }

  .step-line { margin-bottom: .5rem; }

  .upload-preview-img { max-height: 80px; }
}

@media (max-width: 480px) {
  .form-input { font-size: .85rem; }
  .btn-submit  { font-size: 1rem; padding: .85rem 1rem; }
}

/* ============================================================
   ACCESSIBILITY: Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
