/* ================================================
   LA CATALANA DIGITAL — Design System
   styles.css: variables, reset, base, utilities
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

/* ── Tokens ─────────────────────────────────────── */
:root {
  /* Brand */
  --red:          #d32f2f;
  --red-dark:     #b71c1c;
  --red-light:    #fce4e4;
  --amber:        #ffc107;
  --amber-dark:   #e65100;
  --amber-light:  #fff8e1;

  /* Neutrals */
  --dark:    #111827;
  --gray-9:  #1f2937;
  --gray-7:  #374151;
  --gray-5:  #6b7280;
  --gray-3:  #d1d5db;
  --gray-1:  #f3f4f6;
  --white:   #ffffff;

  /* Semantic */
  --text-primary:   var(--gray-9);
  --text-secondary: var(--gray-5);
  --border:         var(--gray-3);
  --bg:             var(--white);
  --bg-alt:         var(--gray-1);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --s1:  0.25rem;  --s2:  0.5rem;   --s3:  0.75rem;
  --s4:  1rem;     --s5:  1.25rem;  --s6:  1.5rem;
  --s8:  2rem;     --s10: 2.5rem;   --s12: 3rem;
  --s16: 4rem;     --s20: 5rem;     --s24: 6rem;

  /* Radii */
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   20px;
  --r-full: 9999px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --sh:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
  --sh-md: 0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.04);
  --sh-lg: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --sh-xl: 0 25px 50px -12px rgba(0,0,0,.18);

  /* Transitions */
  --t:      200ms cubic-bezier(.4,0,.2,1);
  --t-slow: 400ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
ul, ol { list-style: none; }
a { color: var(--red); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--red-dark); }
p { margin-bottom: var(--s4); }
p:last-child { margin-bottom: 0; }
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  letter-spacing: -0.02em;
}

/* ── Layout ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--s6);
}
.container-sm { max-width: 760px; margin-inline: auto; padding-inline: var(--s6); }

.section     { padding: var(--s20) 0; }
.section-sm  { padding: var(--s12) 0; }
.section-alt { background: var(--bg-alt); }

/* ── Section header ─────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--s12);
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--red);
  background: var(--red-light);
  padding: .25em .875em;
  border-radius: var(--r-full);
  margin-bottom: var(--s3);
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--s4);
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: .75rem 1.625rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(211,47,47,.4);
}
.btn-secondary {
  background: var(--amber);
  color: var(--dark);
  border-color: var(--amber);
}
.btn-secondary:hover {
  background: #ffb300;
  border-color: #ffb300;
  color: var(--dark);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline:hover {
  background: var(--red);
  color: var(--white);
}
.btn-ghost {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.25);
  color: var(--white);
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }
.btn-sm { padding: .5rem 1.125rem; font-size: 0.875rem; }

/* ── Grids ──────────────────────────────────────── */
.grid       { display: grid; gap: var(--s6); }
.grid-2     { grid-template-columns: repeat(2, 1fr); }
.grid-3     { grid-template-columns: repeat(3, 1fr); }
.grid-4     { grid-template-columns: repeat(4, 1fr); }
.grid-auto  { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ── Two-column split ───────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s12);
  align-items: center;
}
.split-text { display: flex; flex-direction: column; gap: var(--s4); }

/* ── Badge / Tag ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-size: 0.75rem;
  font-weight: 600;
  padding: .25em .75em;
  border-radius: var(--r-full);
}
.badge-red    { background: var(--red-light);  color: var(--red-dark); }
.badge-amber  { background: var(--amber-light); color: var(--amber-dark); }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #7c3aed; }

/* ── Icon wrap ──────────────────────────────────── */
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r);
  font-size: 1.5rem;
  flex-shrink: 0;
  background: var(--red-light);
  color: var(--red);
}
.icon-wrap-lg  { width: 72px; height: 72px; font-size: 2rem; border-radius: var(--r-lg); }
.icon-wrap-xl  { width: 96px; height: 96px; font-size: 2.5rem; border-radius: var(--r-lg); }

.icon-wrap-amber  { background: var(--amber-light); color: var(--amber-dark); }
.icon-wrap-green  { background: #d1fae5; color: #059669; }
.icon-wrap-blue   { background: #dbeafe; color: #1d4ed8; }
.icon-wrap-purple { background: #ede9fe; color: #7c3aed; }
.icon-wrap-teal   { background: #ccfbf1; color: #0f766e; }

/* ── Feature list ───────────────────────────────── */
.feature-list { display: flex; flex-direction: column; gap: var(--s4); }
.feature-item {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}
.feature-item .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 3px;
}
.feature-item h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.feature-item p  { color: var(--text-secondary); }

/* ── Stat block ─────────────────────────────────── */
.stat-block { text-align: center; }
.stat-number {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--red);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: var(--s2);
}
.stat-label { font-size: 1rem; color: var(--text-secondary); }
.stat-prefix,
.stat-suffix { color: var(--red); font-size: 1.5rem; font-weight: 800; }

/* ── Visual placeholder ─────────────────────────── */
.visual {
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--gray-1), #e5e7eb);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}
.visual-tall { aspect-ratio: 3/4; }
.visual-square { aspect-ratio: 1; }

/* ── Breadcrumb ─────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--s6);
  flex-wrap: wrap;
}
.breadcrumb a           { color: var(--text-secondary); }
.breadcrumb a:hover     { color: var(--red); }
.breadcrumb span        { color: var(--text-primary); font-weight: 500; }
.breadcrumb-sep         { color: var(--gray-3); user-select: none; }

/* ── CTA section ────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--red-dark), var(--red) 55%, #e53e3e);
  padding: var(--s20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,193,7,.12) 0%, transparent 60%);
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 { color: var(--white); margin-bottom: var(--s4); }
.cta-section p  { color: rgba(255,255,255,.85); font-size: 1.125rem; margin-bottom: var(--s8); max-width: 620px; margin-inline: auto; }
.cta-section .btn-group { justify-content: center; }

/* ── Highlight box ──────────────────────────────── */
.highlight-box {
  background: linear-gradient(135deg, var(--red-light), var(--amber-light));
  border-left: 4px solid var(--red);
  border-radius: 0 var(--r) var(--r) 0;
  padding: var(--s6);
}

/* ── Accordion ──────────────────────────────────── */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s5) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  transition: color var(--t);
  gap: var(--s4);
}
.accordion-header:hover { color: var(--red); }
.accordion-icon { font-size: 1.25rem; transition: transform var(--t); color: var(--red); flex-shrink: 0; }
.accordion-item.open .accordion-icon { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--t-slow); }
.accordion-item.open .accordion-body { max-height: 600px; }
.accordion-body-inner { padding-bottom: var(--s5); color: var(--text-secondary); line-height: 1.7; }

/* ── Misc utilities ─────────────────────────────── */
.text-center  { text-align: center; }
.text-sm      { font-size: 0.875rem; }
.text-lg      { font-size: 1.125rem; }
.text-red     { color: var(--red); }
.text-amber   { color: var(--amber-dark); }
.text-gray    { color: var(--text-secondary); }
.text-white   { color: var(--white) !important; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.mt-2  { margin-top: var(--s2); }
.mt-4  { margin-top: var(--s4); }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--s4); }
.mb-6  { margin-bottom: var(--s6); }
.mb-8  { margin-bottom: var(--s8); }
.mb-12 { margin-bottom: var(--s12); }

/* ── Back to top ────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--sh-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t);
  z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--red-dark); transform: translateY(-2px); }
