/* ===========================================================
   Compossar — Solucions gràfiques integrals
   Shared stylesheet. Brand tokens + layout + components.
   =========================================================== */

:root {
  --bg:        #f6f4f0;
  --bg-soft:   #efece6;
  --surface:   #ffffff;
  --ink:       #1c1b1a;
  --ink-2:     #56524e;
  --ink-3:     #6b6660;
  --ink-mute:  #9c968f;
  --line:      #ebe6df;
  --line-2:    #e6e1da;
  --brand:     #E8521E;
  --brand-dk:  #d4471a;
  --brand-tint:rgba(232,82,30,0.10);
  --dark:      #1c1b1a;
  --dark-2:    #26231f;
  --max:       1200px;
  --radius:    16px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 48px;
  max-width: var(--max);
  margin: 0 auto;
}
.site-header .logo { display: flex; }
.site-header .logo img { height: 30px; width: auto; display: block; }
.site-nav { display: flex; gap: 30px; align-items: center; }
.nav-link {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  transition: color .2s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-back { font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 10px;
  transition: transform .18s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  box-shadow: 0 6px 18px -8px rgba(232,82,30,0.6);
}
.btn-primary:hover { background: var(--brand-dk); transform: translateY(-1px); }
.btn-lg { font-size: 16px; padding: 16px 32px; border-radius: 11px; }
.btn-on-brand { background: #fff; color: var(--brand); }
.btn-on-brand:hover { background: #fff; transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; font-size: 15px; padding: 13px 26px; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }

/* ---------- Sections / type ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 0 48px; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.kicker {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 28px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.icon-badge {
  border-radius: 12px;
  background: var(--brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: #f5f2ef;
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

/* Service grid (homepage) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.service-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 32px;
  min-height: 288px;
  display: flex;
  flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -26px rgba(28,27,26,0.35);
  border-color: #ddd5ca;
}

/* Catalog card (textil / articles) */
.cat-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(28,27,26,0.35); }
.cat-card .thumb {
  width: 100%;
  height: 248px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 30% 20%, #f3efe9 0%, #e7e1d8 60%, #ddd5c9 100%);
  color: var(--ink-mute);
  position: relative;
  overflow: hidden;
}
.cat-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.35) 0 2px, transparent 2px 14px);
  opacity: .5;
}
.cat-card .thumb svg { width: 46px; height: 46px; opacity: .55; position: relative; }
.cat-card .thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; }
.cat-card .thumb:has(img)::after { display: none; }
.cat-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.cat-card:hover .cat-link svg { transform: translateX(3px); }
.cat-link svg { transition: transform .2s var(--ease); }

/* Dark panel (techniques / uses) */
.panel-dark {
  background: var(--dark);
  color: #f3efe9;
  border-radius: 20px;
  padding: 46px 48px;
}
.panel-dark .sub { color: #a8a199; }
.chip-dark { background: var(--dark-2); border-radius: 12px; }

/* CTA band */
.cta-band {
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band .sub { color: #ffe2d6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-2); background: var(--bg-soft); }
.colophon { font-size: 13px; color: var(--ink-mute); }

/* ---------- Page-load reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s var(--ease) forwards; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
  .d1 { animation-delay: .05s; }
  .d2 { animation-delay: .13s; }
  .d3 { animation-delay: .21s; }
  .d4 { animation-delay: .29s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .site-header { padding: 20px 22px; flex-wrap: wrap; }
  .site-nav { gap: 18px; }
  .section { padding: 0 22px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .panel-dark { padding: 34px 26px; }
  .cta-band { padding: 34px 28px; }
}
