/* ============================================
   PL Consulting - Design System
   Palette derived from logo (#288890)
   ============================================ */

:root {
  /* Brand teal */
  --teal-900: #0a2e32;
  --teal-800: #103e44;
  --teal-700: #1a5a60;
  --teal-600: #1f7079;
  --teal-500: #288890;   /* PRIMARY - exact logo color */
  --teal-400: #4ba3aa;
  --teal-300: #7ec4c9;
  --teal-200: #b3dde0;
  --teal-100: #d9eeef;
  --teal-50:  #eef7f7;

  /* Neutrals - warm tinted */
  --ink-900: #0c1518;
  --ink-700: #2a3a3e;
  --ink-500: #5b6b6f;
  --ink-400: #8a9799;
  --ink-300: #b5bdbf;
  --ink-200: #d7dcdd;
  --ink-100: #e9eced;
  --ink-50:  #f4f6f6;
  --cream:   #faf8f4;
  --paper:   #ffffff;

  /* Accent - analogous oklch (same chroma/lightness, hue shift) */
  --accent: oklch(0.72 0.13 65);     /* warm amber for highlights */
  --accent-soft: oklch(0.92 0.05 65);

  /* Semantic */
  --bg: var(--cream);
  --fg: var(--ink-900);
  --muted: var(--ink-500);
  --primary: var(--teal-500);
  --primary-strong: var(--teal-700);
  --primary-soft: var(--teal-50);
  --border: var(--ink-200);
  --card: var(--paper);

  /* Type - set per aesthetic */
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 34, 0.04), 0 1px 3px rgba(15, 31, 34, 0.06);
  --shadow:    0 4px 12px rgba(15, 31, 34, 0.06), 0 2px 4px rgba(15, 31, 34, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 31, 34, 0.18);
}

/* Aesthetic: Editoriale (default) */
[data-aesthetic="editoriale"] {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --bg: var(--cream);
  --radius: 10px;
  --radius-lg: 18px;
}

/* Aesthetic: Tech */
[data-aesthetic="tech"] {
  --font-display: "Inter Tight", system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --bg: var(--ink-50);
  --radius: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

/* Aesthetic: Premium */
[data-aesthetic="premium"] {
  --font-display: "Fraunces", "Instrument Serif", Georgia, serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --bg: var(--paper);
  --radius: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
}

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

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--teal-500); color: white; }

/* ============================================
   Typography
   ============================================ */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
[data-aesthetic="editoriale"] .display { font-weight: 400; }
[data-aesthetic="tech"] .display { font-weight: 600; letter-spacing: -0.035em; }
[data-aesthetic="premium"] .display { font-weight: 300; letter-spacing: -0.03em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-700);
  text-wrap: pretty;
  max-width: 60ch;
}

h2, h3, h4 { text-wrap: balance; line-height: 1.15; }

/* ============================================
   Layout
   ============================================ */

.wrap { max-width: 1240px; padding-inline: 28px; margin-inline: auto; }
@media (max-width: 720px) { .wrap { padding-inline: 20px; } }

.section { padding-block: clamp(64px, 9vw, 128px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .18s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  will-change: transform;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px -2px rgba(40, 136, 144, .35);
}
.btn-primary:hover { background: var(--teal-700); box-shadow: 0 6px 16px -2px rgba(40, 136, 144, .5); }

.btn-ghost {
  color: var(--fg);
  border-color: var(--border);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--fg); background: var(--paper); }

.btn-dark {
  background: var(--ink-900);
  color: var(--paper);
}
.btn-dark:hover { background: var(--teal-900); }

[data-aesthetic="tech"] .btn { border-radius: 4px; }
[data-aesthetic="premium"] .btn { border-radius: 0; padding: 16px 28px; }

/* ============================================
   Top nav
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 12px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { white-space: nowrap; }
.nav-logo img { height: 56px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-700);
  position: relative;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.nav-link:hover { color: var(--primary); background: var(--teal-50); }
.nav-link[data-active="true"] { color: var(--primary); font-weight: 500; }
.nav-cta { margin-left: 8px; display: flex; gap: 12px; align-items: center; }

.nav-mobile-toggle { display: none; margin-left: auto; padding: 10px; border-radius: 8px; }
.nav-mobile-toggle:hover { background: var(--teal-50); }

@media (max-width: 1024px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .nav-mobile-open .nav-link { padding: 12px 16px; font-size: 16px; }
}

/* ============================================
   Hero
   ============================================ */

.hero { position: relative; padding-block: clamp(72px, 10vw, 140px) clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero-title { font-size: clamp(48px, 8vw, 104px); }
.hero-title em { font-style: italic; color: var(--primary); }
.hero-lede { margin-top: 24px; max-width: 56ch; }
.hero-cta-row { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta { margin-top: 56px; display: flex; gap: 24px; flex-wrap: wrap; }
.hero-meta-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--fg);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* Hero visual - abstract data shield */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

/* ============================================
   Cards / Services
   ============================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-300);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 920px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .service-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.service-card::after {
  content: "→";
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 22px;
  color: var(--ink-400);
  transition: transform .3s ease, color .25s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.service-card:hover::after { color: var(--primary); transform: translate(4px, -2px); }
.service-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.service-card-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 20px;
  margin-bottom: 12px;
  font-weight: 500;
}
.service-card-desc { color: var(--muted); font-size: 14.5px; line-height: 1.5; flex: 1; }

/* ============================================
   Why us - feature grid
   ============================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--card);
  padding: 32px 28px;
  transition: background-color .2s ease;
}
.feature:hover { background: var(--teal-50); }
.feature-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  letter-spacing: 0.1em;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin-top: 16px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.feature-desc { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ============================================
   Marquee / clients
   ============================================ */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 24px;
  background: var(--paper);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-item {
  font-family: var(--font-mono);
  color: var(--ink-500);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 16px;
}
.marquee-item::after { content: "▪"; color: var(--teal-300); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--ink-900);
  color: var(--ink-200);
  padding-block: 80px 32px;
}
.footer a { transition: color .15s ease; }
.footer a:hover { color: var(--teal-300); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 64px;
}
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-300);
  margin-bottom: 20px;
}
.footer-list { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-bar {
  padding-top: 32px;
  border-top: 1px solid color-mix(in oklab, var(--ink-200) 14%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-400);
}

/* ============================================
   Forms
   ============================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.field-input, .field-textarea, .field-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus, .field-textarea:focus, .field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--teal-50);
}
.field-textarea { resize: vertical; min-height: 120px; font-family: inherit; }

/* ============================================
   Page header (sub-pages)
   ============================================ */

.page-header { padding-block: clamp(72px, 9vw, 120px) clamp(48px, 6vw, 72px); }
.page-header-eyebrow { margin-bottom: 16px; }
.page-header-title { font-size: clamp(40px, 6vw, 76px); }
.page-header-lede { margin-top: 20px; }

/* ============================================
   Animations (subtle, performant)
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.reveal[data-in="true"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Utility
   ============================================ */

.divider { height: 1px; background: var(--border); border: 0; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; } .mt-8 { margin-top: 64px; }

/* tag / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chip-dot {
  width: 20px; height: 20px;
  background: url('../assets/simbolo.png') center/contain no-repeat;
  flex-shrink: 0;
}

/* ============================================
   Quiz / Calculator
   ============================================ */

.tool-shell {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 56px);
}
.progress-track {
  height: 4px;
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .12s ease;
  text-align: left;
  width: 100%;
  font-size: 15px;
}
.quiz-option:hover { border-color: var(--teal-400); background: var(--teal-50); }
.quiz-option[data-selected="true"] { border-color: var(--primary); background: var(--teal-50); }
.quiz-option-key {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink-100);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-700);
  transition: background-color .18s ease, color .18s ease;
}
.quiz-option[data-selected="true"] .quiz-option-key { background: var(--primary); color: white; }

/* Slider for calculator */
.slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--ink-100);
  border-radius: 999px;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .12s ease;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.slider::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: grab;
  border: 0;
}

/* Risk meter */
.risk-meter {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80 0%, #facc15 50%, #ef4444 100%);
  overflow: visible;
}
.risk-indicator {
  position: absolute;
  top: 50%;
  width: 24px; height: 24px;
  background: var(--paper);
  border: 3px solid var(--ink-900);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: left .4s cubic-bezier(.2,.8,.2,1);
}

/* Lang switch */
.lang-switch {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.lang-switch button {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-500);
  text-transform: uppercase;
}
.lang-switch button[data-active="true"] {
  background: var(--paper);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

/* News cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 920px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card-img {
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(
      135deg,
      var(--teal-100),
      var(--teal-100) 8px,
      var(--teal-50) 8px,
      var(--teal-50) 16px
    );
  position: relative;
  display: grid; place-items: center;
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.news-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.news-card-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.news-card-title { font-family: var(--font-display); font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 500; margin-bottom: 12px; }
.news-card-excerpt { color: var(--muted); font-size: 14px; flex: 1; margin-bottom: 16px; }
.news-card-read { color: var(--primary); font-size: 13px; font-weight: 500; }
