/* ==========================================================================
   Volteando iPhones — design tokens, reset, typography
   Inspirado en el lenguaje visual de Apple (tipografía del sistema,
   blanco, minimalismo) con la identidad propia de la marca.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* --- surfaces: blanco y gris clarito, como apple.com --- */
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #f5f5f7;
  --bg-hero: #f5f5f7;

  /* --- lines --- */
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);

  /* --- text --- */
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-faint: #86868b;

  /* --- brand accent: el verde de @volteandoiphones --- */
  --accent: #0a6b5b;
  --accent-bright: #085449;
  --accent-soft: rgba(10, 107, 91, 0.08);
  --accent-ink: #ffffff;

  /* --- semantic (separate from accent) --- */
  --ok: #1f7a3d;
  --ok-soft: rgba(31, 122, 61, 0.08);
  --warn: #a15c07;
  --warn-soft: rgba(161, 92, 7, 0.09);
  --danger: #c8342a;
  --danger-soft: rgba(200, 52, 42, 0.09);
  --muted-status: #86868b;
  --muted-status-soft: rgba(134, 134, 139, 0.1);

  /* --- type: una sola familia tipo SF Pro para todo, como Apple --- */
  --font-display: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-mono: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;

  --fs-hero: clamp(2.75rem, 6vw, 5rem);
  --fs-h2: clamp(1.75rem, 3.4vw, 2.75rem);
  --fs-h3: 1.3rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-micro: 0.78rem;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 24px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px -14px rgba(0, 0, 0, 0.14);
  --shadow-pop: 0 30px 70px -20px rgba(0, 0, 0, 0.28);

  --container: 1220px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* our own display rules (flex, grid) on components would otherwise
   override the browser's default [hidden]{display:none} — author
   styles always beat user-agent styles regardless of specificity. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.mono {
  font-variant-numeric: tabular-nums;
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-bright);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  border-color: transparent;
}

.btn-whatsapp:hover {
  background: #1fb959;
}

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

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
}

/* --- badges / chips --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-condition {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-color: rgba(10, 107, 91, 0.18);
}

.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--muted-status-soft); color: var(--muted-status); }
.badge-promo { background: var(--danger); color: #fff; }

/* --- form controls (shared by filter bar + admin) --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input,
select.input,
textarea.input {
  background: var(--bg-elevated-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus,
select.input:focus,
textarea.input:focus {
  border-color: var(--accent);
}

.input::placeholder {
  color: var(--text-faint);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
