/* ============================================================
   mantentucoche.es — Design System
   Asphalt / traffic-signal palette. Mobile-first.
   ============================================================ */

:root {
  /* Surfaces — asphalt grades */
  --bg: #101014;
  --bg-grad-1: #16161c;
  --bg-grad-2: #0c0c10;
  --surface: #1a1a21;
  --surface-2: #22222b;
  --surface-3: #2b2b35;
  --surface-rise: #34343f;

  /* Lines & borders */
  --line: #2e2e38;
  --line-soft: #26262e;

  /* Text */
  --text: #f4f1ec;
  --text-2: #b3b1ac;
  --text-3: #75737e;

  /* Signal palette — traffic system */
  --cone: #ff6b2c;        /* primary CTA / capture */
  --cone-ink: #2a1204;
  --road: #35d0ba;        /* ok / success / ITV en plazo */
  --amber: #ffb21e;       /* attention / 15 & 7 días */
  --signal: #ff3e3e;      /* danger / caducada */

  /* Mood per ITV state */
  --mood-bg: #101014;
  --mood-line: #2e2e38;

  /* Gradients */
  --grad-cone: linear-gradient(135deg, #ff7a3d 0%, #f8480e 100%);
  --grad-radial: radial-gradient(1200px 600px at 50% -10%, #23232d 0%, #101014 55%);

  /* Type */
  --font-display: "Manrope", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.38);
  --shadow-cone: 0 8px 24px rgba(255, 107, 44, 0.28);

  /* Space */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;

  /* Layout */
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --max-w: 520px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef0f2;
    --bg-grad-1: #f5f6f8;
    --bg-grad-2: #e7e9ec;
    --surface: #ffffff;
    --surface-2: #f7f7f9;
    --surface-3: #efeff2;
    --surface-rise: #e8e9ed;
    --line: #dcdee3;
    --line-soft: #e6e7eb;
    --text: #17171c;
    --text-2: #5a5a65;
    --text-3: #8b8b96;
    --shadow-sm: 0 1px 3px rgba(20, 20, 40, 0.08);
    --shadow-md: 0 8px 24px rgba(20, 20, 40, 0.12);
    --shadow-cone: 0 8px 24px rgba(248, 72, 14, 0.22);
  }
}

/* ============================================================
   Reset / base
   ============================================================ */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    var(--grad-radial),
    linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--cone);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--cone);
  color: var(--cone-ink);
}

/* ============================================================
   Utilities
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.hairline {
  border: none;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   Motion — controlled, respects reduced motion
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .tab-panel.is-active {
    animation: panel-in 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.86); }
  }

  @keyframes scan-sweep {
    0% { transform: translateY(0); opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    100% { transform: translateY(calc(100% + 0px)); opacity: 0; }
  }

  @keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
  }
}