/* PreciRadar — Editorial dark / lime accent */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&family=Geist:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0F1411;
  --bg-2: #161C18;
  --bg-3: #1E2620;
  --line: #2A332C;
  --line-2: #3A463D;
  --ink: #F5F7F2;
  --ink-2: #C5CDC2;
  --muted: #7A8579;
  --muted-2: #5A6359;
  --lime: #C8FF3D;
  --lime-dim: #9AC92E;
  --coral: #FF6B47;
  --coral-dim: #C94E2E;
  --merca: #00A859;     /* Mercadona green, subdued */
  --carre: #4A90E2;     /* Carrefour blue, subdued */
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(200,255,61,0.06), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(255,107,71,0.04), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* === Layout === */
.shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .shell { padding: 0 20px; }
}

/* === Nav === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--lime);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--lime);
  opacity: 0.4;
}
.brand-mark::before {
  inset: -6px;
}
.brand-mark::after {
  inset: -12px;
  opacity: 0.2;
}
.brand-mark-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.15s;
}
.nav-links a:hover { color: var(--lime); }
.nav-links a.active { color: var(--ink); border-color: var(--lime); }

.nav-cta {
  font-size: 13px;
  padding: 9px 16px;
  background: var(--lime);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.15s;
}
.nav-cta:hover { transform: translateY(-1px); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* === Type === */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.eyebrow-lime {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime);
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.serif-i { font-style: italic; font-family: var(--serif); font-weight: 400; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--lime);
  color: var(--bg);
}
.btn-primary:hover { background: #d4ff5e; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }

/* === Card === */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}

/* === Tag/Pill === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.pill-up {
  background: rgba(255,107,71,0.12);
  color: var(--coral);
}
.pill-down {
  background: rgba(200,255,61,0.12);
  color: var(--lime);
}
.pill-neutral {
  background: var(--bg-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.pill-merca { background: rgba(0,168,89,0.14); color: #4FD18C; }
.pill-carre { background: rgba(74,144,226,0.14); color: #7AB1F0; }

/* === Footer === */
.footer {
  margin-top: 100px;
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .footer { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* === Utilities === */
.mono { font-family: var(--mono); }
.lime { color: var(--lime); }
.coral { color: var(--coral); }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }

.grid { display: grid; gap: 20px; }
.flex { display: flex; }
.center { display: flex; align-items: center; justify-content: center; }

/* === Number ticker style === */
.numeric {
  font-family: var(--serif);
  font-feature-settings: 'tnum';
  letter-spacing: -0.02em;
}

/* === Tab bar === */
.tabs {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.tab {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--ink-2); }
.tab.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

/* === Inputs === */
.input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--lime); }
.input::placeholder { color: var(--muted-2); }

/* === Sparkline / chart === */
.sparkline { display: block; width: 100%; height: 100%; }

/* === Marquee === */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 60s linear infinite;
  padding-left: 48px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.marquee-item .name { color: var(--muted); }
.marquee-item .price { color: var(--ink); }

/* === Dot grid bg === */
.dot-grid {
  background-image: radial-gradient(circle, var(--line-2) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* === Helpers for grids === */
.row { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: repeat(3, 1fr); }
  .row-4 { grid-template-columns: repeat(4, 1fr); }
}

/* === Selection === */
::selection { background: var(--lime); color: var(--bg); }

/* === Scrollbar === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
