/* ==========================================================================
   TAPEÇARIA JUMBO — Design tokens e base (compartilhado site + painel)
   ========================================================================== */
:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --surface: #141418;
  --surface-2: #1b1b20;
  --surface-3: #24242b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f6;
  --text-2: #c9c9cf;
  --muted: #8e8e98;
  --red: #e3141c;
  --red-2: #ff3138;
  --red-deep: #7d070c;
  --red-glow: rgba(227, 20, 28, 0.45);
  --ok: #2fbf71;
  --warn: #f2b33d;
  --info: #4c9bff;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e6e6ea 38%, #9a9aa3 52%, #d8d8de 64%, #ffffff 100%);
  --red-grad: linear-gradient(135deg, #ff3a40 0%, #e3141c 45%, #8c080d 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --shadow-red: 0 18px 50px -14px var(--red-glow);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
  --container: 1240px;
  --nav-h: 76px;
  /* padrão matelassê (losango acolchoado com costura) */
  --quilt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='50%25' r='55%25'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='.07'/%3E%3Cstop offset='1' stop-color='%23000000' stop-opacity='.35'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M32 0L64 32L32 64L0 32Z' fill='url(%23g)'/%3E%3Cpath d='M32 2L62 32L32 62L2 32Z' fill='none' stroke='%23e3141c' stroke-opacity='.55' stroke-width='1' stroke-dasharray='3 3'/%3E%3C/svg%3E");
  --quilt-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M24 1L47 24L24 47L1 24Z' fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='1' stroke-dasharray='2.5 3'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; border-radius: 6px; }

.ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; }
.ic-lg { width: 28px; height: 28px; }
.ic-xl { width: 40px; height: 40px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tipografia */
.display {
  font-family: var(--display); font-weight: 800; font-style: italic; font-stretch: 112%;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95;
}
.chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.red-text { color: var(--red-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-2);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--red-grad); border-radius: 2px; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--text-2); max-width: 60ch; }

/* botões */
.btn {
  --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  letter-spacing: 0.01em; white-space: nowrap; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
  position: relative; isolation: isolate; overflow: hidden;
}
.btn .ic { width: 19px; height: 19px; }
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red-grad); color: #fff; box-shadow: var(--shadow-red), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-red::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -14px var(--red-glow); }
.btn-red:hover::after { transform: translateX(120%); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.btn-light { background: #fff; color: #0b0b0d; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(255, 255, 255, 0.4); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #22b85d; transform: translateY(-2px); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn-xs { --h: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-xs .ic { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); transition: 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.08); }

/* formulários */
.field { display: grid; gap: 8px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text); outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238e8e98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 20, 28, 0.18); background: var(--surface-2); }
.input::placeholder, .textarea::placeholder { color: #5f5f68; }
.select option { background: var(--surface); }

/* toasts */
.toasts { position: fixed; z-index: 9999; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px;
  background: rgba(24, 24, 29, 0.92); border: 1px solid var(--line-2); backdrop-filter: blur(16px);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 500; opacity: 0; transform: translateY(16px) scale(0.98);
  transition: 0.4s var(--ease);
}
.toast.in { opacity: 1; transform: none; }
.toast .ic { width: 20px; height: 20px; }
.toast-ok .ic { color: var(--ok); }
.toast-err .ic { color: var(--red-2); }
.toast-info .ic { color: var(--info); }

/* animações de entrada */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s ease infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-red { color: #ff6b70; background: rgba(227, 20, 28, 0.12); border-color: rgba(227, 20, 28, 0.25); }
.badge-ok { color: #4ade80; background: rgba(47, 191, 113, 0.12); border-color: rgba(47, 191, 113, 0.25); }
.badge-warn { color: #fbbf24; background: rgba(242, 179, 61, 0.12); border-color: rgba(242, 179, 61, 0.25); }
.badge-info { color: #7cb5ff; background: rgba(76, 155, 255, 0.12); border-color: rgba(76, 155, 255, 0.25); }
.badge-mute { color: var(--muted); }
.badge-plain::before { display: none; }

.demo-flag {
  position: fixed; z-index: 9998; top: 10px; left: 50%; transform: translateX(-50%);
  background: var(--warn); color: #1a1200; font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase; box-shadow: var(--shadow);
}

[hidden] { display: none !important; }
/* guia de instalação (iPhone) */
.ios-guide { position: fixed; inset: 0; z-index: 9990; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px); display: grid; align-items: end; justify-items: center; padding: 16px; opacity: 0; transition: opacity 0.3s; }
.ios-guide.in { opacity: 1; }
.ios-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; padding: 26px 22px 22px; text-align: center; box-shadow: var(--shadow); transform: translateY(30px); transition: transform 0.4s var(--ease); }
.ios-guide.in .ios-card { transform: none; }
.ios-card img { margin: 0 auto 14px; border-radius: 16px; }
.ios-card h4 { margin: 0 0 14px; font-size: 19px; }
.ios-card ol { text-align: left; margin: 0 0 20px; padding-left: 20px; display: grid; gap: 10px; color: var(--text-2); font-size: 15px; }
.ios-card ol .ic { display: inline-block; vertical-align: -3px; width: 18px; height: 18px; color: var(--info); }
