/* ==========================================================================
   Balão & Cia — design tokens and shared components
   Palette extracted from www.balaoecia.com.br
   ========================================================================== */

:root {
  --brand-50: #fff5eb;
  --brand-100: #ffe8cc;
  --brand-200: #ffd199;
  --brand-500: #fb7d02;
  --brand-600: #e66a00;
  --brand-700: #b85400;

  --accent-50: #fdf2f6;
  --accent-100: #fce5ed;
  --accent-200: #f8cce1;
  --accent-500: #eb6290;
  --accent-600: #d44775;

  --balloon-red: #e8303a;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  --ink-900: #1c1917;
  --ink-700: #44403c;
  --ink-500: #78716c;
  --ink-300: #d6d3d1;
  --ink-200: #e7e5e4;
  --ink-100: #f5f5f4;
  --surface: #ffffff;
  --bg: #faf9f8;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;

  --gradient-brand: linear-gradient(135deg, var(--brand-500) 0%, #f66f3f 50%, var(--accent-500) 100%);
  --gradient-soft: linear-gradient(135deg, var(--brand-50), var(--accent-50));

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.06), 0 1px 3px rgb(28 25 23 / 0.04);
  --shadow: 0 8px 30px rgb(28 25 23 / 0.06);
  --shadow-lg: 0 20px 60px rgb(28 25 23 / 0.1);
  --shadow-brand: 0 10px 30px rgb(251 125 2 / 0.3);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

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

svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

svg .fill,
svg.fill {
  fill: currentColor;
  stroke: none;
}

.muted {
  color: var(--ink-500);
}

.stack {
  display: grid;
  gap: 16px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-500) 55%, transparent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--ink-100);
  --btn-fg: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1.2 var(--font-sans);
  color: var(--btn-fg);
  background: var(--btn-bg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, background-color 0.2s, opacity 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

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

.btn-primary {
  --btn-fg: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgb(251 125 2 / 0.38);
}

.btn-whatsapp {
  --btn-bg: var(--whatsapp);
  --btn-fg: #fff;
  box-shadow: 0 10px 26px rgb(37 211 102 / 0.32);
}

.btn-whatsapp:hover {
  --btn-bg: var(--whatsapp-dark);
}

.btn-outline {
  --btn-bg: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--ink-200);
}

.btn-outline:hover {
  box-shadow: inset 0 0 0 1.5px var(--brand-500);
  --btn-fg: var(--brand-600);
}

.btn-danger {
  --btn-bg: var(--danger-bg);
  --btn-fg: var(--danger);
}

.btn-ghost {
  background: transparent;
  border: 0;
  color: var(--ink-700);
  font: 600 14px var(--font-sans);
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 12px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
}

.btn-lg {
  min-height: 54px;
  padding: 14px 26px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* ---------- Form fields ---------- */

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}

.field small {
  color: var(--ink-500);
  font-size: 12px;
}

input:not([type="checkbox"], [type="radio"], [type="file"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: 500 15px/1.3 var(--font-sans);
  color: var(--ink-900);
  background: var(--surface);
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgb(251 125 2 / 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #a8a29e;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-500);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 92px;
}

.password-wrap button {
  position: absolute;
  right: 6px;
  top: 50%;
  translate: 0 -50%;
}

/* ---------- Chips & alerts ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.alert-error {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ---------- Floating balloons background ---------- */

.balloon-sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.balloon-sky span {
  position: absolute;
  bottom: -160px;
  width: 70px;
  height: 84px;
  border-radius: 50% 50% 48% 52% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / 0.55), transparent 32%), var(--c, var(--brand-500));
  opacity: 0.16;
  animation: balloon-rise var(--d, 22s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.balloon-sky span::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1.5px;
  height: 70px;
  background: currentColor;
  color: var(--c, var(--brand-500));
}

.balloon-sky span:nth-child(1) { left: 6%;  --c: var(--brand-500);  --d: 24s; --delay: -4s; }
.balloon-sky span:nth-child(2) { left: 22%; --c: var(--accent-500); --d: 30s; --delay: -16s; scale: 0.7; }
.balloon-sky span:nth-child(3) { left: 44%; --c: var(--balloon-red); --d: 27s; --delay: -9s; scale: 0.55; }
.balloon-sky span:nth-child(4) { left: 66%; --c: var(--brand-500);  --d: 33s; --delay: -22s; scale: 0.85; }
.balloon-sky span:nth-child(5) { left: 82%; --c: var(--accent-500); --d: 25s; --delay: -12s; }
.balloon-sky span:nth-child(6) { left: 93%; --c: var(--brand-200);  --d: 29s; --delay: -2s; scale: 0.6; }

@keyframes balloon-rise {
  0%   { transform: translate(0, 0) rotate(-4deg); }
  50%  { transform: translate(24px, -60vh) rotate(4deg); }
  100% { transform: translate(-12px, -130vh) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .balloon-sky {
    display: none;
  }
}
