/* Tarjecard — Design System */

:root {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-muted: #f0eee8;
  --ink: #1a1a1a;
  --ink-2: #3a3a38;
  --ink-3: #6b6b66;
  --ink-4: #9a9a93;
  --line: #e5e2d8;
  --line-strong: #d4d4ce;
  --accent: #e85a2c;
  --accent-ink: #ffffff;
  --accent-soft: #fde8df;
  --accent-2: #2a2522;
  --success: #1f7a4a;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 14px;
  --shadow-s: 0 1px 0 rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-m: 0 4px 20px -8px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-l: 0 24px 48px -12px rgba(0,0,0,0.18);
  --pad-x: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 5.5vw, 76px); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.2; }
h4 { font-size: 17px; line-height: 1.3; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
img { display: block; max-width: 100%; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'ss01' on, 'zero' on;
  font-size: 0.85em;
  letter-spacing: 0.01em;
}
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Layout */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.container-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d44c1f; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Pills / tags */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
}
.pill-accent { background: var(--accent-soft); color: #a23912; border-color: #f7c8b4; }
.pill-dark { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Hero section — dot grid texture */
.hero-section {
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26,26,26,0.18) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 80%, transparent 100%);
}
.hero-section > * { position: relative; z-index: 1; }

/* Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-m); }

/* Placeholder imagery */
.ph {
  position: relative;
  background: var(--bg-muted);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,0.025) 14px 15px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-m);
  overflow: hidden;
}
.ph-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(250,250,247,0.8);
  padding: 4px 8px;
  border-radius: 3px;
}

/* Card thumbnail image area — tamaño controlado aquí, no en JS */
.card-thumb { aspect-ratio: 2/1; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Card visual mock (PVC card shape) */
.card-mock {
  width: 80%;
  aspect-ratio: 1.586/1;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.4) inset;
}

/* Section */
section { padding: clamp(60px, 8vw, 120px) 0; }
.section-tight { padding: clamp(40px, 5vw, 80px) 0; }

/* Divider */
.hr { height: 1px; background: var(--line); width: 100%; }

/* Forms */
.input, .textarea, .select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--bg-elev);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease;
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
}
.textarea { height: auto; padding: 14px 16px; resize: vertical; min-height: 120px; }
.label {
  display: block;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* ── HEADER ─────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, backdrop-filter 0.2s ease;
}
#site-header.scrolled {
  background: rgba(250,250,247,0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

/* Nav desktop */
.nav-link { transition: color 0.15s ease; }
.nav-link:hover { color: var(--ink) !important; }

/* Mobile menu */
.mobile-nav { display: none; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; color: var(--ink); text-decoration: none; border-radius: 8px; }
.mobile-nav a:hover { background: var(--bg-muted); }

/* Responsive header */
@media (max-width: 900px) {
  .nav-desktop, .header-contact { display: none !important; }
  .btn-mobile-menu { display: flex !important; }
}

/* ── FOOTER ─────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(6, 1fr) !important; }
  .footer-grid > *:first-child { grid-column: span 6 !important; }
  .footer-grid > *:not(:first-child) { grid-column: span 2 !important; }
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-grid > * { grid-column: span 1 !important; }
  .footer-grid > *:first-child { grid-column: span 2 !important; }
  .footer-bottom { flex-direction: column !important; gap: 12px !important; }
}

/* ── CATALOG ─────────────────────────────── */
.cat-tile:hover { transform: translateY(-2px); }
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cat-grid > * { grid-column: span 1 !important; min-height: 180px !important; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 1100px) { .featured-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .featured-grid { grid-template-columns: 1fr !important; } }

.brand-tile:hover { background: #2a2522 !important; }
@media (max-width: 900px) { .brands-row { grid-template-columns: repeat(2, 1fr) !important; } }

@media (max-width: 900px) { .usecases-grid { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 600px) { .usecases-grid { grid-template-columns: 1fr !important; } }

@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr !important; } }

/* ── CATALOG PAGE ─────────────────────────── */
@media (max-width: 1100px) { .results-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 900px) { .catalog-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 560px) { .results-grid { grid-template-columns: 1fr !important; } }
.filter-check input[type="checkbox"] { display: none; }
.filter-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check-box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s ease;
}
.check-box.checked { background: var(--ink); border-color: var(--ink); }

/* ── PRODUCT PAGE ─────────────────────────── */
@media (max-width: 960px) { .product-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 1100px) { .related-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .related-grid { grid-template-columns: 1fr !important; } }

/* ── BRAND PAGE ─────────────────────────── */
@media (max-width: 980px) { .brand-hero, .brand-why { grid-template-columns: 1fr !important; } }
@media (max-width: 1100px) { .brand-products { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .brand-products { grid-template-columns: 1fr !important; } }
@media (max-width: 700px) { .brand-list { grid-template-columns: 1fr !important; } }

/* ── ABOUT PAGE ─────────────────────────── */
@media (max-width: 900px) {
  .about-intro { grid-template-columns: 1fr !important; }
  .metric-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .process-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── BLOG PAGE ─────────────────────────── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-featured { grid-template-columns: 1fr !important; }
}

/* ── QUOTE PAGE ─────────────────────────── */
@media (max-width: 960px) { .quote-grid { grid-template-columns: 1fr !important; } }

/* ── MISC ─────────────────────────────── */
::selection { background: var(--accent); color: #fff; }
