/* === Blue & Purple — style.css === */
/* Plus Jakarta Sans loaded via <link> in HTML head */

/* === Tokens === */
:root {
  /* Brand palette */
  --base-light: #FBFAFD;
  --subtle-light: #F2EEF9;
  --brand-purple: #6346FF;
  --brand-dark: #1A1028;
  --ink: #14121A;
  --purple-hover: #4E36D9;
  --purple-soft: #A79BFF;
  --purple-tint: #E9E4FD;

  /* Neutrals */
  --text-secondary: #5A595F;
  --border: #E3E3E4;
  --divider: #ECECED;
  --neutral-tint: #F4F4F5;
  --muted: #A1A0A3;

  /* Layout */
  --max-content: 1080px;
  --section-px: 2.5rem;
  --section-py: 4rem;
}

/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--base-light);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* === Typography === */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
h1 { font-size: 2.5rem; line-height: 1.15; font-weight: 800; }
h2 { font-size: 1.5rem; line-height: 1.25; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.lede {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 56ch;
}

.inline-link {
  color: var(--brand-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover { color: var(--purple-hover); }

/* === Container === */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding-left: var(--section-px);
  padding-right: var(--section-px);
}

/* === Pictogram (themable via CSS custom properties through <use> shadow DOM) === */
.pictogram {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}
.pict-square { fill: var(--pict-square-color, var(--brand-dark)); }
.pict-chevron { fill: var(--pict-chevron-color, var(--brand-purple)); }
.on-dark {
  --pict-square-color: var(--subtle-light);
  --pict-chevron-color: var(--purple-soft);
}

/* === Site header === */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem var(--section-px);
  border-bottom: 1px solid var(--divider);
  background: var(--base-light);
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}
.wordmark {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.w-blue, .w-purple { color: var(--brand-dark); }
.w-amp { color: var(--brand-purple); padding: 0 0.05em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.9375rem;
}
.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:not(.btn):hover { color: var(--brand-purple); }
.site-nav a.active { color: var(--brand-purple); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.375rem;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-primary {
  background: var(--brand-purple);
  color: var(--base-light);
}
.btn-primary:hover { background: var(--purple-hover); color: var(--base-light); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--base-light);
}
.btn-on-dark {
  background: var(--base-light);
  color: var(--ink);
}
.btn-on-dark:hover { background: var(--purple-tint); color: var(--ink); }

/* === Sections === */
section.content {
  padding: var(--section-py) var(--section-px);
  border-bottom: 1px solid var(--divider);
}
section.content:last-of-type { border-bottom: none; }
section.dark, .on-dark {
  background: var(--brand-dark);
  color: var(--base-light);
}
section.dark h1, section.dark h2, section.dark h3,
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--base-light); }
section.subtle { background: var(--subtle-light); }

.section-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

/* === Hero === */
.hero {
  padding: 5rem var(--section-px) 4rem;
}
.hero-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.75rem;
  max-width: 20ch;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: 2rem;
}
.hero-actions { margin-bottom: 1.5rem; }
.hero-proof {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

/* === Multi-column grids === */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

/* === Marker columns (Home "Cosa facciamo") === */
.col-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.col-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}
.col-item::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-purple);
  margin-bottom: 1rem;
}

/* === Steps (Home "Come funziona") === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-purple);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* === Method 3×9 grid === */
.dimension-group { margin-top: 3rem; }
.dimension-group:first-of-type { margin-top: 2rem; }
.dimension-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--brand-purple);
}
.dimension-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-purple);
  background: var(--purple-tint);
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
}
.dimension-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}
.elements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.element-card {
  background: var(--base-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}
.element-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}
.element-card .element-purpose {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.element-card .element-block { margin-top: 1rem; }
.element-card .element-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.375rem;
}
.element-card .element-text {
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

/* === Pricing layout === */
.pricing-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: var(--max-content);
  margin: 0 auto;
}
.toc {
  position: sticky;
  top: 6rem;
  font-size: 0.875rem;
  border-left: 2px solid var(--divider);
  padding-left: 1.25rem;
}
.toc strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0.4rem 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand-purple); }
.toc a.active { color: var(--brand-purple); font-weight: 600; }

/* === Plans === */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.plan {
  background: var(--base-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}
.plan-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-purple);
  margin-bottom: 0.5rem;
}
.plan h3 { font-size: 1.0625rem; margin-bottom: 0.75rem; }
.plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  color: var(--ink);
}
.plan-unit {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.plan ul { margin: 0.75rem 0; padding: 0; list-style: none; }
.plan ul li {
  font-size: 1rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  position: relative;
}
.plan ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand-purple);
}
.plan-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.plan-addon {
  grid-column: span 2;
  background: var(--subtle-light);
  border: 1px dashed var(--brand-purple);
}
.plan-keep {
  grid-column: span 2;
  background: var(--neutral-tint);
  border: 1px solid var(--divider);
}
.plan-keep h3 {
  color: var(--text-secondary);
  font-weight: 600;
}
.plan-keep .plan-name {
  color: var(--text-secondary);
}

/* === Scope === */
.scope-section { margin-top: 2.5rem; }
.scope-dim-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-purple);
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.scope-item {
  border-top: 1px solid var(--divider);
  padding: 1.25rem 0;
}
.scope-item h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.scope-item p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0.25rem 0;
}
.scope-item .label {
  font-weight: 600;
  color: var(--ink);
}

/* === Contact block === */
.contact-block {
  background: var(--subtle-light);
  border-radius: 6px;
  padding: 2rem;
  margin-top: 1.5rem;
}
.contact-block > p:first-child { margin-bottom: 1.25rem; }
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}
.email-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: ui-monospace, "SF Mono", Monaco, monospace;
  font-size: 1.0625rem;
  color: var(--brand-purple);
  padding: 0.375rem 0;
  margin: 0;
  text-align: left;
  transition: color 0.15s ease;
  align-self: flex-start;
}
.email-copy:hover { color: var(--purple-hover); }
.copy-hint {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  background: var(--base-light);
  border-radius: 3px;
  transition: all 0.2s ease;
}
.email-copy.copied .copy-hint {
  background: var(--brand-purple);
  color: var(--base-light);
}
.contact-fallback {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}
.contact-includes {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.contact-includes strong { color: var(--ink); }

/* === Frameworks index === */
.framework-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--divider);
}
.framework-item:last-child { border-bottom: none; }
.framework-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.framework-tag {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  letter-spacing: 0.05em;
}
.framework-meta .sep { color: var(--muted); }
.framework-item h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.framework-item h3 a {
  color: var(--ink);
  text-decoration: none;
}
.framework-item h3 a:hover { color: var(--brand-purple); }
.framework-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0.5rem 0;
  max-width: 70ch;
}
.read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-purple);
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* === Single framework === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--brand-purple); }
.article-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--divider);
}
.share {
  display: flex;
  gap: 0.5rem;
}
.share a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--subtle-light);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}
.share a:hover { background: var(--purple-tint); color: var(--brand-purple); }
.article {
  max-width: 720px;
  margin: 0 auto;
}
.article h1 {
  font-size: 2.25rem;
  margin: 1.5rem 0 1rem;
  line-height: 1.15;
}
.article-lede {
  font-size: 1.125rem;
  color: var(--text-secondary);
  padding-left: 1.125rem;
  border-left: 3px solid var(--brand-purple);
  margin: 1.5rem 0 2.5rem;
}
.article-prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
}
.article-prose p { color: var(--ink); margin-bottom: 1rem; }
.article-prose ul, .article-prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.article-prose li { margin-bottom: 0.5rem; }
.article-prose blockquote {
  border-left: 3px solid var(--brand-purple);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}
.related {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--divider);
}
.related-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* === Book page === */
.book-hero {
  padding: 4.5rem var(--section-px);
}
.book-hero-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 4rem;
  align-items: center;
}
.book-hero-cover img {
  width: 100%;
  max-width: 340px;
  border-radius: 3px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.55), 0 8px 20px -8px rgba(0,0,0,0.4);
}
.book-hero-text .eyebrow { color: var(--purple-soft); }
.book-lockup {
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.5rem 0 1rem;
  color: var(--base-light);
}
.book-lockup .book-x {
  color: var(--purple-soft);
  font-weight: 700;
  padding: 0 0.05em;
}
.book-subtitle {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--base-light);
  margin: 0 0 1.5rem;
}
.book-hook {
  font-size: 1.0625rem;
  color: var(--purple-soft);
  max-width: 46ch;
  margin: 0 0 2rem;
  line-height: 1.5;
}
.book-section {
  max-width: 64ch;
}
.book-section h2 { font-size: 1.75rem; }
.book-section p { margin-bottom: 1rem; }

/* === CTA dark === */
.cta-dark {
  background: var(--brand-dark);
  color: var(--base-light);
  padding: 4rem var(--section-px);
  text-align: center;
}
.cta-dark-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}
.cta-dark h2 {
  font-size: 2rem;
  color: var(--base-light);
  max-width: 22ch;
  margin: 0 auto 1.5rem;
  line-height: 1.2;
}
.cta-dark p {
  color: var(--purple-soft);
  margin-bottom: 2rem;
}
.cta-dark .btn-on-dark {
  margin: 0 0.375rem 0.75rem;
}

/* === Footer === */
.site-footer {
  background: var(--brand-dark);
  color: var(--base-light);
  padding: 3rem var(--section-px) 2rem;
}
.site-footer .w-blue,
.site-footer .w-amp,
.site-footer .w-purple { color: var(--base-light); }
.footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer-brand .logo { margin-bottom: 0.75rem; }
.footer-tagline {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.625rem;
  max-width: 32ch;
}
.footer-method {
  color: var(--purple-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0.75rem 0 0;
}
.footer-col strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  color: var(--base-light);
  text-decoration: none;
  font-size: 0.9375rem;
  margin: 0.375rem 0;
}
.footer-col a:hover { color: var(--purple-soft); }
.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(251, 250, 253, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-bottom .iubenda-black {
  display: inline-block;
}
.footer-copyright {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}
.footer-email {
  font-family: ui-monospace, "SF Mono", Monaco, monospace;
  font-size: 0.875rem;
  color: var(--purple-soft);
  text-decoration: none;
}
.footer-email:hover {
  color: var(--base-light);
  text-decoration: underline;
}

/* === Mobile menu (hidden on desktop) === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
}

/* === Responsive === */
/* Pricing-specific: TOC sidebar + 2-col plans get cramped below 960px */
@media (max-width: 960px) {
  .pricing-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .toc { position: static; }
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .plan-keep,
  .plan-addon {
    grid-column: span 1;
  }
}
@media (max-width: 760px) {
  :root {
    --section-px: 1.25rem;
    --section-py: 2.5rem;
  }
  .site-header { padding: 1rem var(--section-px); }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--base-light);
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem var(--section-px) 1.5rem;
    border-bottom: 1px solid var(--divider);
    align-items: stretch;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 0.5rem 0; }
  .site-nav a.btn { text-align: center; justify-content: center; }
  .mobile-menu-toggle { display: inline-block; }
  .hero { padding: 3rem var(--section-px) 2rem; }
  .hero h1 { font-size: 1.875rem; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.375rem; }
  .cols-2, .cols-3, .steps, .elements-grid, .plans-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .book-hero { padding: 3rem var(--section-px); }
  .book-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .book-hero-cover { order: -1; }
  .book-hero-cover img { margin: 0 auto; max-width: 240px; }
  .book-lockup { justify-content: center; font-size: 3.5rem; }
  .book-hook { margin-left: auto; margin-right: auto; }
  .pricing-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; }
  .plan-addon { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .article-meta-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
