/* qmanda — sistema de marca v2 (base blanca). Fuente de verdad: brand/brand.json
   Se usa tal cual en la guía de estilo y en la landing. Rutas relativas a esta hoja. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-latin.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  color-scheme: light;

  /* Marca */
  --white: #FFFFFF;
  --ink: #14110F;
  --coral: #FF5A36;
  --cream: #F7F3EA;

  /* Derivados del coral */
  --coral-strong: #C2371A;   /* texto y enlaces coral sobre blanco (5,4:1) */
  --coral-hover: #F2492A;    /* hover del botón principal */
  --coral-soft: #FFEEE8;     /* fondos suaves, avisos, selección */

  /* Neutros cálidos */
  --ink-2: #5F5A52;          /* texto secundario (6,8:1) */
  --ink-3: #7A746A;          /* ayudas, pies (4,6:1) */
  --line: #E7E1D5;           /* separadores y bordes de tarjeta */
  --line-strong: #8C857A;    /* borde de campos (3,6:1) */

  /* Color de apoyo: siempre en tinte suave + tono fuerte para texto/icono */
  --mint: #1FAF73;  --mint-strong: #0F7450;  --mint-soft: #E3F6EC;
  --sky: #2456D6;   --sky-soft: #E8EFFF;
  --lila: #6D3FD1;  --lila-soft: #F0EAFF;
  --sun: #FFC533;   --sun-strong: #8A5A00;   --sun-soft: #FFF3CF;
  --danger: #B3261E; --danger-soft: #FDECEA;

  /* Forma */
  --r-card: 28px;
  --r-bubble: 18px;
  --r-field: 14px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20,17,15,.05), 0 6px 20px rgba(20,17,15,.06);
  --shadow-2: 0 2px 4px rgba(20,17,15,.06), 0 18px 48px rgba(20,17,15,.12);

  /* Tipo */
  --font-head: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 17px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--coral-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tipografía ---------- */
h1, h2, h3, .h1, .h2, .h3, .display {
  font-family: var(--font-head); font-weight: 800; font-stretch: 100%;
  letter-spacing: -0.025em; line-height: 1.04; margin: 0; text-wrap: balance;
}
.display { font-size: clamp(42px, 9vw, 84px); letter-spacing: -0.035em; line-height: .98; }
h1, .h1 { font-size: clamp(34px, 6.4vw, 60px); }
h2, .h2 { font-size: clamp(28px, 4.6vw, 44px); }
h3, .h3 { font-size: clamp(20px, 2.6vw, 24px); line-height: 1.15; letter-spacing: -0.015em; }
h4, .h4 { font: 600 17px/1.3 var(--font-ui); margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: clamp(18px, 2.3vw, 21px); line-height: 1.5; color: var(--ink-2); }
.small { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.eyebrow {
  font: 700 13px/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase;
  color: var(--coral-strong); margin: 0 0 14px;
}
.accent { color: var(--coral); }           /* solo en titulares ≥ 28 px */
.num { font-variant-numeric: tabular-nums; }

/* ---------- Estructura ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 104px); }
.section--cream { background: var(--cream); }
.section--soft { background: var(--coral-soft); }
.section--ink { background: var(--ink); color: var(--cream); }
.section--ink .lead, .section--ink .small { color: #CFC8BA; }
.grid { display: grid; gap: clamp(16px, 2.4vw, 24px); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.stack > * + * { margin-top: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 2px solid transparent; border-radius: var(--r-pill);
  font: 700 17px/1 var(--font-ui); letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: var(--ink); box-shadow: 0 6px 18px rgba(255,90,54,.28); }
.btn-primary:hover { background: var(--coral-hover); color: var(--ink); box-shadow: 0 8px 24px rgba(255,90,54,.36); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #2B2622; color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); }
.btn-link { min-height: 0; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn-link:hover { color: var(--coral-strong); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { background: var(--line); color: var(--ink-3); box-shadow: none; cursor: not-allowed; border-color: transparent; }

/* ---------- Formularios ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.field > label, .label { display: block; font: 600 15px/1.3 var(--font-ui); margin-bottom: 7px; color: var(--ink); }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-field);
  background: var(--white); color: var(--ink); font: 400 17px/1.4 var(--font-ui); appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .textarea:hover { border-color: var(--ink); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--coral-soft), 0 0 0 5.5px var(--coral); }
.hint { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.field.is-error .input, .field.is-error .textarea { border-color: var(--danger); background: var(--danger-soft); }
.error { display: none; font-size: 14px; font-weight: 600; color: var(--danger); margin-top: 6px; }
.field.is-error .error { display: block; }

/* Opción seleccionable (checkbox o radio en tarjeta) */
.option {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1.5px solid var(--line); border-radius: 20px; background: var(--white); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.option:hover { border-color: var(--ink); }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option .check {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--white);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.option .check::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg) translateY(-1px) scale(0); transition: transform .12s; }
.option:has(input:checked) { border-color: var(--ink); background: var(--coral-soft); box-shadow: 0 0 0 1px var(--ink); }
.option:has(input:checked) .check { background: var(--coral); border-color: var(--ink); }
.option:has(input:checked) .check::after { transform: rotate(-45deg) translateY(-1px) scale(1); }
.option:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.option-body { flex: 1; min-width: 0; }
.option-title { font: 700 16.5px/1.3 var(--font-ui); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.option-price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.option-desc { display: block; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); margin-top: 3px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 3vw, 30px); }
.card--raised { border-color: transparent; box-shadow: var(--shadow-1); }
.card--cream { background: var(--cream); border-color: transparent; }
.card--ink { background: var(--ink); color: var(--cream); border-color: transparent; }
.card--ink .small { color: #CFC8BA; }
.card--featured { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--coral); }
.card--mint { background: var(--mint-soft); border-color: transparent; }
.card--sky { background: var(--sky-soft); border-color: transparent; }
.card--lila { background: var(--lila-soft); border-color: transparent; }
.card--sun { background: var(--sun-soft); border-color: transparent; }
.card--coral { background: var(--coral-soft); border-color: transparent; }

.icon-tile { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-strong); margin-bottom: 16px; }
.icon-tile svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile--mint { background: var(--mint-soft); color: var(--mint-strong); }
.icon-tile--sky { background: var(--sky-soft); color: var(--sky); }
.icon-tile--lila { background: var(--lila-soft); color: var(--lila); }
.icon-tile--sun { background: var(--sun-soft); color: var(--sun-strong); }
.card--mint .icon-tile, .card--sky .icon-tile, .card--lila .icon-tile, .card--sun .icon-tile, .card--coral .icon-tile { background: var(--white); }

/* ---------- Chips y avisos ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill); font: 600 13.5px/1.2 var(--font-ui); background: var(--cream); color: var(--ink); }
.chip--coral { background: var(--coral-soft); color: var(--coral-strong); }
.chip--mint { background: var(--mint-soft); color: var(--mint-strong); }
.chip--sky { background: var(--sky-soft); color: var(--sky); }
.chip--lila { background: var(--lila-soft); color: var(--lila); }
.chip--sun { background: var(--sun-soft); color: var(--sun-strong); }
.chip--ink { background: var(--ink); color: var(--white); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.note { border-radius: 18px; padding: 14px 16px; background: var(--sun-soft); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.note--coral { background: var(--coral-soft); }
.note--mint { background: var(--mint-soft); }
.note b { font-weight: 700; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 9px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 13px; height: 7px; border-left: 2.5px solid var(--mint); border-bottom: 2.5px solid var(--mint); transform: rotate(-45deg); }

/* ---------- Chat (el motivo gráfico de la marca) ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: var(--r-bubble); font-size: 15.5px; line-height: 1.4; background: var(--cream); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble--out { align-self: flex-end; background: var(--coral); color: var(--ink); border-radius: var(--r-bubble); border-bottom-right-radius: 6px; }
.bubble--ink { align-self: flex-end; background: var(--ink); color: var(--white); border-radius: var(--r-bubble); border-bottom-right-radius: 6px; }
.bubble small { display: block; font-size: 11.5px; opacity: .65; margin-top: 3px; text-align: right; }
.chat-who { font: 600 12.5px/1 var(--font-ui); color: var(--ink-3); margin: 6px 4px 0; }
.chat-who--out { align-self: flex-end; }

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
table.t { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.t th, .t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th { font: 700 12.5px/1.3 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: var(--cream); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t td.n { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }

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