/* ═══════════════════════════════════════════════════════════════
   NeoNiu · neoniu.css
   Identitat visual pròpia — independent del portfolio personal
   Paleta: blau nit mèdic + accent cian clar + blanc càlid
   Tipografia: Nunito (display) + DM Sans (cos)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ── TOKENS ── */
:root {
  --nn-bg:        #0f1e2e;
  --nn-bg2:       #162638;
  --nn-bg3:       #1e3348;
  --nn-panel:     #1A3A5C;
  --nn-border:    #2a4a68;
  --nn-accent:    #4AADDE;
  --nn-accent2:   #7ecfef;
  --nn-warm:      #f0e6d3;
  --nn-text:      #e8f4fb;
  --nn-muted:     #7aa8c4;
  --nn-faint:     #3a6080;

  --nn-display:   'Nunito', sans-serif;
  --nn-body:      'DM Sans', sans-serif;

  --nn-radius:    6px;
  --nn-radius-lg: 12px;
  --nn-shadow:    0 4px 24px rgba(0,0,0,0.35);
  --nn-shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--nn-bg);
  color: var(--nn-text);
  font-family: var(--nn-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--nn-bg); }
::-webkit-scrollbar-thumb { background: var(--nn-accent); border-radius: 2px; }

/* ── LAYOUT ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 2rem; }

/* ════════════════════════════════════
   NAV
════════════════════════════════════ */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(15, 30, 46, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nn-border);
  padding: 0.9rem 0;
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo / nom projecte */
.nav-logo {
  font-family: var(--nn-display);
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0;
}
/* Neo i Niu en el mateix flux de text sense separació */
.nav-logo .neo { font-weight: 800; color: #FFFFFF; letter-spacing: -0.01em; }
.nav-logo .niu { font-weight: 300; color: #B8D4ED; letter-spacing: -0.01em; margin-left: -0.05em; }
.nav-logo .badge {
  font-family: var(--nn-body);
  font-size: 0.62rem;
  font-weight: 500;
  background: rgba(74,173,222,0.15);
  color: var(--nn-accent);
  border: 1px solid rgba(74,173,222,0.3);
  border-radius: 3px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

/* Links de nav (ancores internes) */
.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}
.nav-mobile-only { display: none; }
.nav-links a {
  font-family: var(--nn-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--nn-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--nn-accent);
  border-radius: 1px;
  transition: width 0.2s;
}
.nav-links a:hover { color: var(--nn-text); }
.nav-links a:hover::after { width: 100%; }

/* Link de retorn al portfolio — discret però visible */
.nav-portfolio-link {
  font-family: var(--nn-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--nn-faint);
  text-decoration: none;
  border: 1px solid var(--nn-faint);
  border-radius: 3px;
  padding: 0.25rem 0.7rem;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.nav-portfolio-link:hover {
  color: var(--nn-muted);
  border-color: var(--nn-muted);
}
.nav-portfolio-link::before { content: '← '; }

/* ── SELECTOR D'IDIOMA ── */
.nn-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.nn-lang-btn {
  font-family: var(--nn-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--nn-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.nn-lang-btn:hover { color: var(--nn-accent); }
.nn-lang-btn.active {
  color: var(--nn-accent);
  border-color: var(--nn-accent);
}
.nn-lang-sep {
  color: var(--nn-border);
  font-size: 0.72rem;
  line-height: 1;
}

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
#hero {
  padding-top: 7rem;
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

/* Fons: gradient radial suau + línia horitzontal de profunditat */
#hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -15%;
  width: 65vw; height: 65vw;
  background: radial-gradient(circle, rgba(74,173,222,0.08) 0%, transparent 65%);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nn-border), transparent);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}


.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--nn-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--nn-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-kicker .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--nn-accent);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

h1 {
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--nn-text);
  margin-bottom: 1.25rem;
}
h1 .accent { color: var(--nn-accent); }
h1 .soft { color: var(--nn-muted); font-weight: 300; }

.hero-desc {
  font-size: 1.05rem;
  color: var(--nn-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-desc strong { color: var(--nn-text); font-weight: 500; }

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Botons */
.btn {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.5rem;
  border-radius: var(--nn-radius);
  text-decoration: none;
  transition: all 0.22s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--nn-accent);
  color: var(--nn-bg);
}
.btn-primary:hover {
  background: var(--nn-accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,173,222,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--nn-muted);
  border: 1px solid var(--nn-border);
}
.btn-outline:hover {
  border-color: var(--nn-accent);
  color: var(--nn-accent);
  transform: translateY(-2px);
}

/* Stats sota el CTA */
.hero-stats {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--nn-border);
}
.stat {
  flex: 1;
  padding-right: 1.5rem;
}
.stat + .stat {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-left: 1px solid var(--nn-border);
}
.stat:last-child { padding-right: 0; }
.stat-num {
  font-family: var(--nn-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--nn-accent);
  line-height: 1;
  white-space: nowrap;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--nn-muted);
  font-weight: 400;
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

/* Columna dreta: imatge */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-img-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
  border: 1px solid var(--nn-border);
  box-shadow: var(--nn-shadow-lg);
}
.hero-img-frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.85) saturate(0.9);
}
/* Pip d'estat sobre la imatge */
.hero-img-badge {
  position: absolute;
  bottom: 1rem; left: 1rem;
  background: rgba(15,30,46,0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--nn-border);
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-img-badge .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite;
}
.hero-img-badge span {
  font-family: var(--nn-body);
  font-size: 0.7rem;
  color: var(--nn-muted);
  letter-spacing: 0.05em;
}

/* ════════════════════════════════════
   SECCIONS GENERALS
════════════════════════════════════ */
section { padding: 5rem 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--nn-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--nn-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-eyebrow::before {
  content: '';
  width: 1.5rem; height: 1px;
  background: var(--nn-accent);
}

h2 {
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nn-text);
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--nn-muted);
  max-width: 580px;
  margin-bottom: 3rem;
  font-weight: 300;
  line-height: 1.75;
}

/* ════════════════════════════════════
   SECCIÓ PROBLEMA (#problema)
════════════════════════════════════ */
#problema { background: var(--nn-bg); }

.problema-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.problema-text p {
  font-size: 0.95rem;
  color: var(--nn-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-weight: 300;
}
.problema-text p strong { color: var(--nn-text); font-weight: 500; }

/* Targeta de patent / dada destacada */
.info-card {
  background: var(--nn-bg2);
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.info-card .ic-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--nn-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.info-card .ic-value {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--nn-text);
}

/* Columna dreta: stats numèrics */
.problema-stats {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
}
.p-stat {
  background: var(--nn-bg2);
  padding: 1.5rem 1.75rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.p-stat:hover { background: var(--nn-bg3); }
.p-stat-num {
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--nn-accent);
  line-height: 1;
  min-width: 4.5rem;
}
.p-stat-text { font-size: 0.85rem; color: var(--nn-muted); font-weight: 300; line-height: 1.5; }
.p-stat-text strong { color: var(--nn-text); font-weight: 500; display: block; font-size: 0.9rem; }

/* ════════════════════════════════════
   SECCIÓ VÍDEO (#video)
════════════════════════════════════ */
#video {
  background: var(--nn-bg2);
  border-top: 1px solid var(--nn-border);
  border-bottom: 1px solid var(--nn-border);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--nn-radius-lg);
  border: 1px solid var(--nn-border);
  box-shadow: var(--nn-shadow-lg);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ════════════════════════════════════
   SECCIÓ SOLUCIÓ (#solucio)
════════════════════════════════════ */
#solucio { background: var(--nn-bg); }

/* Diagrama de flux: 3 blocs + fletxes */
.solucio-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 3rem;
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
}
.flow-node {
  flex: 1;
  background: var(--nn-bg2);
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  transition: background 0.2s;
}
.flow-node:hover { background: var(--nn-bg3); }
.flow-node + .flow-node {
  border-left: 1px solid var(--nn-border);
}
/* Fletxa entre nodes */
.flow-node + .flow-node::before {
  content: '→';
  position: absolute;
  left: -0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--nn-faint);
  background: var(--nn-bg2);
  padding: 0 0.15rem;
  z-index: 1;
}
.flow-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.flow-title {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--nn-text);
  margin-bottom: 0.2rem;
}
.flow-sub {
  font-size: 0.72rem;
  color: var(--nn-muted);
  font-weight: 300;
}

/* Grid de característiques 2×2 */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--nn-border);
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
}
.feature {
  background: var(--nn-bg2);
  padding: 2rem;
  transition: background 0.2s;
}
.feature:hover { background: var(--nn-bg3); }
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  line-height: 1;
  color: var(--nn-accent);
}
/* € és un caràcter de text — cal font-family explícita per evitar fallback */
.feature-icon.text-icon {
  font-family: var(--nn-body);
  font-weight: 300;
  font-size: 2rem;
}
.feature-title {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--nn-text);
  margin-bottom: 0.5rem;
}
.feature-desc {
  font-size: 0.87rem;
  color: var(--nn-muted);
  font-weight: 300;
  line-height: 1.65;
}

/* ════════════════════════════════════
   SECCIÓ VALIDACIÓ (#validacio)
════════════════════════════════════ */
#validacio { background: var(--nn-bg2); }

.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.55rem; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--nn-accent), var(--nn-faint));
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item--expandable {
  cursor: pointer;
  margin-left: -1rem;
  padding-left: 1rem;
  padding-right: 0.75rem;
  border-radius: var(--nn-radius-lg);
  transition: background 0.2s;
}
.timeline-item--expandable::before {
  left: -1rem;
}
.timeline-item--expandable:hover,
.timeline-item--expandable.is-open {
  background: var(--nn-bg3);
}
.tl-arrow {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--nn-faint);
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: transform 0.3s ease, color 0.2s;
}
.timeline-item--expandable:hover .tl-arrow,
.timeline-item--expandable.is-open .tl-arrow { color: var(--nn-accent); }
.timeline-item--expandable.is-open .tl-arrow { transform: rotate(180deg); }

.timeline-photo {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.timeline-item--expandable.is-open .timeline-photo {
  max-height: 420px;
}
.timeline-photo .expo-figure { margin-top: 1.25rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--nn-accent);
  border: 2px solid var(--nn-bg2);
  box-shadow: 0 0 0 3px rgba(74,173,222,0.2);
}

.timeline-year {
  font-family: var(--nn-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--nn-accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.timeline-title {
  font-family: var(--nn-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--nn-text);
  margin-bottom: 0.1rem;
}
.timeline-source {
  font-size: 0.78rem;
  color: var(--nn-faint);
  font-weight: 300;
  margin-bottom: 0.4rem;
}
.timeline-desc {
  font-size: 0.88rem;
  color: var(--nn-muted);
  font-weight: 300;
  line-height: 1.65;
  max-width: 580px;
}

/* ════════════════════════════════════
   SECCIÓ DOCUMENTACIÓ (#documentacio)
════════════════════════════════════ */
#documentacio { background: var(--nn-bg); }

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
}
.doc-item {
  background: var(--nn-bg2);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  border-left: 3px solid transparent;
}
.doc-item:hover {
  background: var(--nn-bg3);
  border-left-color: var(--nn-accent);
}
/* Entrada sense link: sense cursor pointer ni hover */
.doc-item--static {
  cursor: default;
  opacity: 0.75;
}
.doc-item--static:hover {
  background: var(--nn-bg2);
  border-left-color: transparent;
}
.doc-icon {
  font-family: var(--nn-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(74,173,222,0.12);
  color: var(--nn-accent);
  border: 1px solid rgba(74,173,222,0.25);
  border-radius: 3px;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
  min-width: 3.2rem;
  text-align: center;
  text-transform: uppercase;
}
.doc-icon.ext { background: rgba(126,207,239,0.08); color: var(--nn-accent2); border-color: rgba(126,207,239,0.2); }
.doc-body { flex: 1; }
.doc-title {
  font-family: var(--nn-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--nn-text);
  margin-bottom: 0.1rem;
}
.doc-meta {
  font-size: 0.75rem;
  color: var(--nn-faint);
  font-weight: 300;
}
.doc-arrow {
  font-size: 0.85rem;
  color: var(--nn-faint);
  transition: color 0.2s, transform 0.2s;
}
.doc-item:hover .doc-arrow { color: var(--nn-accent); transform: translateX(3px); }

/* ════════════════════════════════════
   FIGURA EXPOSICIÓ
════════════════════════════════════ */
.expo-figure {
  margin: 0 auto;
  border-radius: var(--nn-radius-lg);
  overflow: hidden;
  border: 1px solid var(--nn-border);
  box-shadow: var(--nn-shadow);
  max-width: 320px;
}
.expo-figure img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.88) saturate(0.85);
  transition: filter 0.4s;
}
.expo-figure:hover img {
  filter: brightness(0.96) saturate(1);
}
.expo-figure figcaption {
  background: var(--nn-bg2);
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--nn-faint);
  font-weight: 300;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--nn-border);
  border-radius: 0 0 var(--nn-radius-lg) var(--nn-radius-lg);
}

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  background: var(--nn-bg2);
  border-top: 1px solid var(--nn-border);
  padding: 2.5rem 0;
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--nn-display);
  font-size: 1rem;
}
.footer-brand .neo { font-weight: 800; color: #FFFFFF; }
.footer-brand .niu { font-weight: 300; color: #B8D4ED; }
.footer-meta {
  font-size: 0.75rem;
  color: var(--nn-faint);
  font-weight: 300;
  text-align: center;
}
.footer-meta a { color: var(--nn-muted); text-decoration: none; }
.footer-meta a:hover { color: var(--nn-accent); }
.footer-portfolio {
  font-family: var(--nn-body);
  font-size: 0.78rem;
  color: var(--nn-muted);
  text-decoration: none;
  border: 1px solid var(--nn-border);
  border-radius: 3px;
  padding: 0.3rem 0.8rem;
  transition: all 0.2s;
}
.footer-portfolio:hover { color: var(--nn-accent); border-color: var(--nn-accent); }
.footer-portfolio::before { content: '← '; }

/* ════════════════════════════════════
   ANIMATIONS
════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.55s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }

  .problema-body { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .solucio-flow { flex-direction: column; }
  .flow-node + .flow-node { border-left: none; border-top: 1px solid var(--nn-border); }
  .flow-node + .flow-node::before { display: none; }
  footer .container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  h1 { font-size: 2rem; }
  .hero-stats { gap: 1.25rem; }
  .container { padding: 0 1.25rem; }
}

/* ════════════════════════════════════
   HAMBURGER MENU
════════════════════════════════════ */

/* Ocult en escriptori */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nn-muted);
  border-radius: 1px;
  transition: all 0.25s ease;
  transform-origin: center;
}
nav.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--nn-accent);
}
nav.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
nav.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--nn-accent);
}

@media (max-width: 480px) {
  .nav-hamburger { display: flex; }
  .nav-portfolio-link { display: none; }
  .nn-lang-switcher { position: relative; z-index: 160; }

  nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(15, 30, 46, 0.97);
    backdrop-filter: blur(16px);
    padding: 5rem 2rem 2rem;
    border-bottom: 1px solid var(--nn-border);
    z-index: 150;
    animation: fadeUp 0.2s ease both;
  }
  nav.nav-open .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--nn-border);
  }
  nav.nav-open .nav-links .nav-mobile-only { display: list-item; }
  nav.nav-open .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--nn-text);
    letter-spacing: 0.02em;
  }
  nav.nav-open .nav-links a:hover { color: var(--nn-accent); }
  nav.nav-open .nav-links a::after { display: none; }

  nav.nav-open .nav-portfolio-link {
    display: block;
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 151;
  }
}

/* ════════════════════════════════════
   ENQUESTA
════════════════════════════════════ */
#enquesta {
  padding: 5rem 0;
  background: var(--nn-bg2);
  border-top: 1px solid var(--nn-border);
}

.survey-form {
  max-width: 560px;
  margin: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.survey-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.survey-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nn-text);
  letter-spacing: 0.01em;
}

.survey-select,
.survey-textarea {
  background: var(--nn-bg3);
  border: 1px solid var(--nn-border);
  border-radius: var(--nn-radius);
  color: var(--nn-text);
  font-family: var(--nn-body);
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s;
  width: 100%;
}

.survey-select:focus,
.survey-textarea:focus {
  outline: none;
  border-color: var(--nn-accent);
}

.survey-select option {
  background: var(--nn-bg3);
}

.survey-textarea {
  resize: vertical;
  min-height: 100px;
}

.survey-textarea::placeholder {
  color: var(--nn-faint);
}

/* Estrelles — ordre invers per al truc CSS */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
  width: fit-content;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2rem;
  color: var(--nn-faint);
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
  color: var(--nn-accent);
}

.star-rating input:checked ~ label {
  color: #f5c518;
}

.survey-btn {
  align-self: flex-start;
  background: var(--nn-accent);
  color: #0f1e2e;
  border: none;
  border-radius: var(--nn-radius);
  font-family: var(--nn-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.survey-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.survey-note {
  font-size: 0.85rem;
  color: var(--nn-accent2);
  margin-top: -1rem;
}
}