/* ============================================================
   THEME LAB - grigio freddo, mono, blocchi a finestra
   Caricato dopo style.css, sovrascrive solo token e componenti.
   Riferimento di stile: typesafe.ai (senza easter egg)
   ============================================================ */

:root {
  --bg: #E3E3E3;
  --bg-soft: #D6D6D6;
  --ink: #1E1E1E;
  --ink-soft: #4B4B4B;
  --ink-faint: #7A7A7A;
  --line: #B9B9B9;
  --line-strong: #1E1E1E;
  --accent: #1E1E1E;
  --accent-hover: #000000;
  --sand: #D6D6D6;
  --bar: color-mix(in srgb, var(--ink) 6%, transparent);

  --radius: 0;
  --radius-lg: 0;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #1E1E1E;
  --bg-soft: #171717;
  --ink: #E3E3E3;
  --ink-soft: #B3B3B3;
  --ink-faint: #7A7A7A;
  --line: #3C3C3C;
  --line-strong: #E3E3E3;
  --accent: #E3E3E3;
  --accent-hover: #FFFFFF;
  --sand: #171717;
  --bar: color-mix(in srgb, var(--ink) 7%, transparent);
}

/* ---------- base ---------- */

body { font-size: 16px; }

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.03em; }

/* niente corsivo: le parole in em diventano il secondo tono grigio */
.hero-title em,
.section-title em,
.dv-title em,
.dv-col-title em,
.serv-card-title em,
.contact-card-title em,
.nav-mark em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-faint);
}

.hero-lede em,
.dv-bullet-body em { font-style: normal; }

.container { padding: 0 32px; }
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section--sand { background: var(--bg); }
.section:nth-of-type(even) { background: var(--bg-soft); }

/* superfici tinteggiate: una sola scala (stessa luce, croma minimo),
   cambia solo la tonalita'. Ogni tinta ha un ruolo fisso su tutto il sito:
   sand = metodo/appunti, rose = servizi, lilac = progetti,
   sky = processo, aqua = contatti/CTA. I token sono ridefiniti
   localmente, cosi' card, bordi e bottoni seguono da soli. */
[data-tint] {
  --bg: oklch(88.5% 0.02 var(--h));
  --bg-soft: oklch(85% 0.022 var(--h));
  --line: oklch(66% 0.035 var(--h));
  --bar: color-mix(in srgb, var(--ink) 7%, transparent);
  background: var(--bg);
}
[data-theme="dark"] [data-tint] {
  --bg: oklch(26% 0.014 var(--h));
  --bg-soft: oklch(22.5% 0.014 var(--h));
  --line: oklch(42% 0.025 var(--h));
}
[data-tint="sand"]  { --h: 80; }
[data-tint="rose"]  { --h: 15; }
[data-tint="lilac"] { --h: 310; }
[data-tint="sky"]   { --h: 245; }
[data-tint="aqua"]  { --h: 185; }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
}

/* ---------- etichette mono ---------- */

.section-eyebrow-line {
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 28px;
}

.section-eyebrow-line::before { display: none; }

.section-eyebrow-num { color: var(--ink); font-weight: 500; }
.section-eyebrow-num::before { content: '['; }
.section-eyebrow-num::after { content: ']'; }

/* ---------- nav ---------- */

.nav {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line-strong);
}

.nav-inner { padding: 16px 32px; }

.nav-mark {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  align-items: center;
}

.nav-mark img { display: block; height: 32px; width: auto; }
[data-theme="dark"] .nav-mark img { filter: invert(1); }

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-link.is-active::after { bottom: -20px; }

.lang-opt { border-radius: 0; }
.lang-opt.is-active { background: var(--ink); color: var(--bg); }

.theme-btn { border-radius: 0; border: 1px solid var(--line); }
.theme-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

@media (max-width: 768px) {
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav-links { gap: 14px; }
  .nav-link { font-size: 11px; white-space: nowrap; letter-spacing: 0.04em; }
  .nav-link.is-active::after { bottom: -16px; }
  .nav-mark img { height: 28px; }
}

/* link dentro i paragrafi di presentazione */
.hero-lede a,
.dv-intro a,
.serv-card-text a,
.contact-card-lede a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-faint);
}
.hero-lede a:hover,
.dv-intro a:hover,
.serv-card-text a:hover,
.contact-card-lede a:hover { text-decoration-color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding: 104px 0 88px; position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }

/* nuvole dither: canvas generato in script.js, sfuma verso il basso */
.hero-dither {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.24;
}

.hero-title {
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 40px;
}

.hero-lede {
  font-size: 17px;
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-actions { margin: 40px 0 0; }

.hero-sys {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-sys span {
  padding: 8px 14px;
  border-right: 1px solid var(--line);
}

.hero-sys span:last-child { border-right: none; }
.hero-sys span:first-child { color: var(--ink); background: var(--bar); }

.hero-strip {
  margin-top: 72px;
  border: 1px solid var(--line);
  counter-reset: strip;
}

.hero-strip-item,
.hero-strip-item:last-child,
.hero-strip-item:not(:first-child):not(:last-child) {
  padding: 24px;
  border-right: 1px solid var(--line);
  counter-increment: strip;
}

.hero-strip-item:last-child { border-right: none; }

.hero-strip-icon { display: none; }

.hero-strip-item::before {
  content: '[0' counter(strip) ']';
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.hero-strip-title { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.hero-strip-text { font-size: 13.5px; }

@media (max-width: 900px) {
  .hero-strip-item,
  .hero-strip-item:last-child,
  .hero-strip-item:not(:first-child):not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 20px 16px;
  }
  .hero-strip-item:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 56px; }
  .hero-title { font-size: clamp(38px, 11vw, 48px); }
  .hero-sys { display: flex; }
  .hero-sys span { flex: 1 1 auto; border-bottom: 1px solid var(--line); }
}

/* ---------- bottoni ---------- */

.btn-primary,
.btn-ghost,
.btn-line {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 13px 20px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn-primary { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 78%, var(--bg)); border-color: color-mix(in srgb, var(--ink) 78%, var(--bg)); }

.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--bar); color: var(--ink); border-color: var(--ink); }

.btn-line { border: 1px solid var(--ink); }
.btn-line:hover .arrow { transform: none; }

/* ---------- blocchi a finestra ---------- */

.serv-card,
.process-step,
.pcard,
.contact-card-mini {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s var(--ease);
}

.serv-card:hover,
.process-step:hover,
.pcard:hover,
.contact-card-mini:hover {
  border-color: var(--ink);
  transform: none;
}

/* barra del titolo */
.serv-card-num,
.process-step-num,
.pcard-meta,
.contact-card-mini-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.serv-card-num::after,
.process-step-num::after,
.contact-card-mini-num::after {
  content: '\2237';
  color: var(--ink-faint);
  letter-spacing: 0;
}

.serv-card-title,
.serv-card-text,
.process-step-title,
.process-step-text,
.contact-card-mini-title,
.contact-card-mini-text {
  padding: 0 20px;
}

.serv-card-title,
.process-step-title,
.contact-card-mini-title {
  margin: 22px 0 10px;
  font-family: var(--font-serif);
  font-weight: 500;
}

.serv-card-title { font-size: 24px; letter-spacing: -0.025em; }
.process-step-title { font-size: 18px; }
.contact-card-mini-title { font-size: 20px; }

.serv-card-text,
.process-step-text,
.contact-card-mini-text {
  margin: 0;
  padding-bottom: 24px;
  font-size: 14.5px;
}

.serv-grid { gap: 12px; margin-top: 40px; }
.process-steps { gap: 12px; margin-top: 40px; }
.projects { gap: 12px; }
.contact-card-grid { gap: 12px; padding-top: 0; border-top: none; margin-bottom: 48px; }

/* elenco progetti: righe da tabella */
.projects { border-top: 1px solid var(--line); }

.projects .pcard {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 16px 44px;
  align-items: baseline;
  padding: 28px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: none;
  transition: background 0.15s var(--ease);
}

.projects .pcard:hover { background: var(--bar); border-color: var(--line); }

.projects .pcard-meta {
  display: block;
  padding: 4px 0 0;
  margin: 0;
  background: transparent;
  border: none;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.projects .pcard-main { padding: 0; }
.projects .pcard-title { font-size: clamp(21px, 2.2vw, 27px); font-weight: 500; letter-spacing: -0.025em; }
.projects .pcard-desc { font-size: 14.5px; }

.projects .pcard-arrow {
  position: static;
  align-self: start;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-faint);
}

.projects .pcard:hover .pcard-arrow { transform: none; color: var(--ink); }

@media (max-width: 720px) {
  .projects .pcard { grid-template-columns: minmax(0, 1fr) auto; padding: 20px 16px; gap: 6px 16px; }
  .projects .pcard-meta { grid-column: 1 / -1; padding: 0; margin-bottom: 4px; }
}

.projects-foot { border-top: 1px solid var(--line); }
.projects-foot-text { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

/* ---------- doppio valore ---------- */

.dv-quote {
  font-style: normal;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  padding: 24px 24px 24px 56px;
  background: transparent;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  margin: 0 0 48px;
  position: relative;
}

@media (max-width: 480px) {
  .dv-quote { font-size: 19px; padding: 20px 18px 20px 46px; }
  .dv-quote::before { left: 18px; top: 20px; }
}

.dv-quote::before {
  content: '\2237';
  position: absolute;
  left: 22px;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink-faint);
}

.dv-intro { font-size: 17px; margin-bottom: 56px; }

.dv-col-tag,
.dv-col-tag--marketing,
.dv-col-tag--ai {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 7px 12px;
  letter-spacing: 0.1em;
}

.dv-col-tag-icon { width: 8px; height: 8px; border-radius: 0; opacity: 1; }

.dv-col-title { font-weight: 500; font-size: 30px; letter-spacing: -0.03em; }

.dv-bullet-icon {
  background: transparent;
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  justify-content: flex-start;
}

.dv-bullet-body em { color: var(--ink-soft); }

/* ---------- contatti ---------- */

.contact-card-title { font-weight: 500; font-size: clamp(32px, 4.8vw, 56px); letter-spacing: -0.035em; }
.contact-card-lede { margin-bottom: 40px; }
.contact-card-actions { border-top: 1px solid var(--line); }
.contact-card-email { font-size: 12px; color: var(--ink-soft); }

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: var(--bg);
  border-top: none;
  padding: 56px 0 40px;
}

.footer-inner { align-items: flex-start; gap: 24px 40px; }

.footer-meta,
.footer-link { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.footer-link:hover { color: var(--bg); }

@media (max-width: 768px) {
  .footer-inner { padding: 0 16px; }
  .footer-links { flex-wrap: wrap; gap: 14px 20px; }
}

/* ---------- selezione e motion ---------- */

::selection { background: var(--ink); color: var(--bg); }

[data-reveal] { transform: translateY(12px); transition-duration: 0.5s; }

/* ============================================================
   PAGINE INTERNE: portfolio, blog, progetti, landing
   ============================================================ */

/* niente corsivo nemmeno qui */
.page-head-title em,
.detail-title em,
.detail-section-title em,
.note-card-title em,
.note-article-body h2 em,
.next-project-title em,
.sub-project-title em,
.fronte-title em,
.casestudy-feat-title em,
.lp-hero-title em,
.guida-hero h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-faint);
}

.detail-body em,
.note-article-body p em,
.note-article-body li em,
.detail-result-fig,
.reel-feature-fig,
.hero-card--dark .hero-card-sub { font-style: normal; }

.casestudy-feat-title em { color: color-mix(in srgb, var(--bg) 55%, transparent); }

/* angoli tondi residui scritti in chiaro nel css base */
.filter,
.casestudy-feat-tag,
.slider-btn,
.hero-card-client,
.pcard-stat--overlay,
.casestudy-feat-impact-icon,
.hero-photo-icon,
.step-circle,
.lp-badge,
.pill { border-radius: 0; }

/* testata pagina */
.page-head { padding: 88px 0 56px; }
.page-head-eyebrow { color: var(--ink); letter-spacing: 0.12em; }
.page-head-title { font-weight: 500; letter-spacing: -0.04em; font-size: clamp(40px, 6.4vw, 80px); line-height: 0.98; }
.page-head-lede { font-size: 17px; }

/* filtri portfolio */
.filters { gap: 6px; }
.filter { padding: 8px 12px; letter-spacing: 0.08em; }

/* righe progetto nel portfolio: stesse regole della home */
.portfolio-grid { border-top: 1px solid var(--line); }
.portfolio-grid .pcard {
  padding: 28px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: none;
  transition: background 0.15s var(--ease);
}
.portfolio-grid .pcard:hover { background: var(--bar); }
.portfolio-grid .pcard-meta { color: var(--ink-soft); letter-spacing: 0.12em; }
.portfolio-grid .pcard-title { font-weight: 500; letter-spacing: -0.025em; }
.portfolio-grid .pcard-desc { font-size: 14.5px; }
.portfolio-grid .pcard-arrow { font-family: var(--font-mono); font-size: 14px; }
.portfolio-grid .pcard:hover .pcard-arrow { transform: none; }

@media (max-width: 720px) {
  .portfolio-grid .pcard { padding: 20px 16px; }
}

/* case study in evidenza (pannello scuro) */
.casestudy-feat { padding: 36px 36px 40px; }
.casestudy-feat-tag { border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); background: transparent; }
.casestudy-feat-title { font-weight: 500; letter-spacing: -0.03em; }
.casestudy-feat-impact-row { border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); background: transparent; }
.casestudy-feat-impact-icon { background: transparent; font-family: var(--font-mono); }

/* blog: lista */
.note-card { padding: 32px 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--bg); }
.note-card:hover { padding-left: 20px; padding-right: 20px; background: var(--bar); }
.note-card-meta { color: var(--ink-soft); }
.note-card-title { font-weight: 500; letter-spacing: -0.025em; }
.note-card-excerpt { font-size: 14.5px; }
.note-card-tag { color: var(--ink-soft); }

/* blog: articolo */
.note-article-meta { color: var(--ink); }
.note-article-body p,
.note-article-body ul li {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
}
.note-article-body p em { color: var(--ink-soft); }
.note-article-body h2 { font-weight: 500; font-size: 30px; letter-spacing: -0.03em; }
.note-article-body ul li::before { content: '\2192'; font-family: var(--font-mono); color: var(--ink); }
.note-article-cta { background: transparent; border: 1px solid var(--line); }
.note-article-cta .btn-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

/* pagina progetto */
.detail-back { color: var(--ink); }
.detail-meta { color: var(--ink-soft); }
.detail-title { font-weight: 500; letter-spacing: -0.04em; font-size: clamp(40px, 6.4vw, 80px); line-height: 0.98; }
.detail-lede { font-size: 20px; }
.detail-cover { border: 1px solid var(--line); }
.detail-section-num { color: var(--ink); }
.detail-section-num::before { content: '['; }
.detail-section-num::after { content: ']'; }
.detail-section-title { font-weight: 500; }
.detail-result-fig { font-weight: 500; letter-spacing: -0.04em; }
.detail-aside { background: transparent; border: 1px solid var(--line); border-left: 1px solid var(--line); }
.fronte-num { font-weight: 500; }
.fronte-num::before { content: '['; }
.fronte-num::after { content: ']'; }
.reel-feature { background: transparent; border: 1px solid var(--line); }
.reel-feature:hover { background: var(--ink); border-color: var(--ink); }
.slider-slide { background: var(--bg-soft); }
.slider-btn { background: transparent; }
.next-project-eyebrow { color: var(--ink); }
.next-project-title { font-weight: 500; letter-spacing: -0.03em; }
.sub-project-num { font-weight: 500; }
.sub-project-title { font-weight: 500; letter-spacing: -0.035em; }

/* etichetta di settore nel portfolio: testo semplice, non barra */
.portfolio-grid .pcard-meta,
.projects .pcard-meta {
  background: transparent;
  border: none;
  padding: 4px 0 0;
}

/* landing con <style> inline caricato dopo: specificita' alzata con body */
body .lp-hero-title em {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: 1em;
  color: var(--ink-faint);
}
body .lp-badge,
body .lp-pkg-flag,
body .lp-badge-dot,
body .guida-success .check { border-radius: 0; }
body .guida-hero h1 { font-weight: 500; letter-spacing: -0.035em; }
body .guida-hero h1 em { font-style: normal; color: var(--ink-faint); }
body .guida-card .cover-mini { background: var(--ink); }
body .guida-card .cover-mini .k { color: color-mix(in srgb, var(--bg) 50%, transparent); }
body .guida-card .cover-mini .ti { color: var(--bg); font-weight: 500; }
body .guida-card .cover-mini .ti em { font-style: normal; color: color-mix(in srgb, var(--bg) 55%, transparent); }
body .guida-card .cover-mini .accent { background: var(--bg); }
body .guida-btn { color: var(--bg); }
body .lp-hero-title { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.04em; }
body .guida-card .cover-mini::after { background: color-mix(in srgb, var(--bg) 8%, transparent); }
