/**
 * BridgeWorks — Pagina "Come funziona"
 * Riusa le variabili e gli stili di home.css.
 */

body.how-page {
  background: var(--cream);
}

/* ——— Hero della pagina ——— */
.how-page-hero {
  position: relative;
  padding: 7rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(167, 243, 208, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 100%, rgba(253, 164, 175, 0.32), transparent 55%),
    linear-gradient(168deg, var(--cream) 0%, var(--cream-deep) 100%);
  overflow: hidden;
}

.how-page-hero .container {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.how-page-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}

.how-page-hero h1 {
  margin: 0 0 1.1rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}

.how-gradient {
  font-style: italic;
  color: var(--terracotta, #b87262);
}

.how-page-lead {
  margin: 0 auto 1.85rem;
  max-width: 38rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-page-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.how-page-anchors a {
  display: inline-flex;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.how-page-anchors a:hover {
  border-color: rgba(61, 155, 122, 0.55);
  background: var(--white);
  transform: translateY(-2px);
}

/* ——— Blocchi generici ——— */
.how-block {
  padding: 4.5rem 1.5rem;
  scroll-margin-top: 5rem;
}

.how-block .container {
  max-width: 1080px;
  margin: 0 auto;
}

.how-block--alt {
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 100%);
}

.how-block-header {
  max-width: 44rem;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.how-block-kicker {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}

.how-block-header h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink);
}

.how-block-header h2 em {
  font-style: italic;
  color: var(--sage);
}

.how-block-header p {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-underline {
  position: relative;
  white-space: nowrap;
}

.how-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.45em;
  background: rgba(167, 243, 208, 0.55);
  z-index: -1;
  border-radius: 999px;
}

/* ——— Flow verticale (Per candidati) ——— */
.how-flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.how-flow-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  padding: 1.4rem 0;
}

@media (min-width: 720px) {
  .how-flow-step {
    grid-template-columns: 4rem 1fr;
    gap: 1.75rem;
    padding: 1.6rem 0;
  }
}

.how-flow-bullet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.how-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d9b7a, #2dd4bf);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(45, 212, 191, 0.32);
  z-index: 2;
}

.how-flow-step:nth-child(2) .how-flow-num { background: linear-gradient(135deg, #2dd4bf, #67e8f9); }
.how-flow-step:nth-child(3) .how-flow-num { background: linear-gradient(135deg, #fda4af, #fb7185); }
.how-flow-step:nth-child(4) .how-flow-num { background: linear-gradient(135deg, #38bdf8, #6366f1); }

.how-flow-line {
  position: absolute;
  top: 2.75rem;
  bottom: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(180deg, rgba(61, 155, 122, 0.4), rgba(56, 189, 248, 0.4));
  z-index: 1;
}

.how-flow-line--last { display: none; }

.how-flow-body h3 {
  margin: 0.2rem 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.how-flow-body p {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-flow-body p em {
  font-style: italic;
  color: var(--sage);
  font-weight: 700;
}

.how-flow-body a {
  color: var(--sage);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.how-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 500;
}

.how-list li {
  margin-bottom: 0.5rem;
}

.how-list li strong {
  color: var(--ink);
  font-weight: 700;
}

.how-callout {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(167, 243, 208, 0.35);
  border-left: 3px solid var(--sage);
  border-radius: 0 12px 12px 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}

.how-callout--soft {
  background: var(--blossom-soft);
  border-left-color: #fb7185;
}

.how-callout strong { color: var(--ink); font-weight: 800; }

.how-founding-banner {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 45%, #fff7ed 100%);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  .how-founding-banner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem 1.5rem;
  }
}

.how-founding-banner__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78350f;
  background: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}

.how-founding-banner__body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.how-founding-banner__body p + p {
  margin-top: 0.45rem;
}

.how-founding-banner__body strong {
  color: var(--ink);
  font-weight: 700;
}

.how-founding-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #e07a5f 0%, #c45d3e 100%);
  box-shadow: 0 8px 20px rgba(196, 93, 62, 0.22);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}

.how-founding-banner__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(196, 93, 62, 0.28);
}

/* ——— Cards (Per aziende) ——— */
.how-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .how-cards { grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
}

@media (min-width: 1000px) {
  .how-cards { grid-template-columns: repeat(4, 1fr); }
}

.how-card {
  position: relative;
  padding: 1.85rem 1.4rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.how-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.how-card-num {
  position: absolute;
  top: -1rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d9b7a, #2dd4bf);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(45, 212, 191, 0.32);
}

.how-card:nth-child(2) .how-card-num { background: linear-gradient(135deg, #2dd4bf, #67e8f9); }
.how-card:nth-child(3) .how-card-num { background: linear-gradient(135deg, #fda4af, #fb7185); }
.how-card:nth-child(4) .how-card-num { background: linear-gradient(135deg, #38bdf8, #6366f1); }

.how-card h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.how-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ——— Matching: comparison cards ——— */
.how-matching {
  background:
    radial-gradient(ellipse 70% 60% at 90% 10%, rgba(253, 164, 175, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(167, 243, 208, 0.22), transparent 55%),
    var(--cream);
}

.how-matching-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 920px;
  margin: 0 auto;
}

@media (min-width: 780px) {
  .how-matching-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.how-matching-card {
  padding: 1.65rem 1.5rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.how-matching-card--bad {
  border: 1px solid rgba(120, 113, 108, 0.18);
  background: linear-gradient(180deg, var(--white) 0%, #fafaf8 100%);
  opacity: 0.95;
}

.how-matching-card--good {
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: linear-gradient(180deg, var(--white) 0%, rgba(236, 253, 245, 0.6) 100%);
  box-shadow: 0 16px 36px rgba(61, 155, 122, 0.1), var(--shadow-soft);
}

.how-tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.how-tag--neutral {
  color: var(--ink-soft);
  background: rgba(120, 113, 108, 0.12);
}

.how-tag--sage {
  color: #fff;
  background: var(--sage);
  box-shadow: 0 4px 10px rgba(61, 155, 122, 0.28);
}

.how-matching-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.how-matching-card p {
  margin: 0 0 0.6rem;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-matching-card p strong { color: var(--ink); font-weight: 700; }

.how-matching-meta {
  margin-top: 0.6rem !important;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem !important;
  font-style: italic;
}

.how-matching-note {
  margin: 2.75rem auto 0;
  max-width: 880px;
  padding: 1.65rem 1.65rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.how-matching-note h3 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ——— Test cards ——— */
.how-tests {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto;
}

@media (min-width: 780px) {
  .how-tests { grid-template-columns: repeat(3, 1fr); }
}

.how-test {
  padding: 1.5rem 1.35rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.how-test:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.how-test-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--sage-soft);
  border: 1px solid rgba(110, 231, 183, 0.4);
  color: #047857;
}

.how-test:nth-child(2) .how-test-icon { background: var(--blossom-soft); border-color: rgba(253, 164, 175, 0.4); color: #be185d; }
.how-test:nth-child(3) .how-test-icon { background: var(--sky-soft); border-color: rgba(103, 232, 249, 0.4); color: #0e7490; }

.how-test-icon .bw-icon {
  width: 1.6rem;
  height: 1.6rem;
}

.how-test h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.how-test p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-test-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.how-test-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ——— Data section ——— */
.how-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 920px;
  margin: 0 auto;
}

@media (min-width: 780px) {
  .how-data-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

.how-data-card {
  padding: 1.65rem 1.5rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.how-data-card--yes {
  border: 1px solid rgba(110, 231, 183, 0.45);
  background: linear-gradient(180deg, var(--white) 0%, rgba(236, 253, 245, 0.55) 100%);
}

.how-data-card--no {
  border: 1px solid rgba(253, 164, 175, 0.45);
  background: linear-gradient(180deg, var(--white) 0%, rgba(255, 228, 233, 0.55) 100%);
}

.how-data-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.how-data-card--yes h3::before { content: "✓ "; color: var(--sage); }
.how-data-card--no h3::before { content: "✕ "; color: #fb7185; }

.how-data-footer {
  margin: 2.25rem auto 0;
  max-width: 36rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.how-data-footer a {
  color: var(--sage);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ——— FAQ accordion ——— */
.how-faq {
  background: var(--cream);
}

.how-faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.how-faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.how-faq-item[open] {
  border-color: rgba(110, 231, 183, 0.55);
  box-shadow: 0 8px 22px rgba(45, 212, 191, 0.08);
}

.how-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s var(--ease);
}

.how-faq-item summary::-webkit-details-marker { display: none; }

.how-faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-soft);
  color: var(--sage);
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.how-faq-item[open] summary { color: var(--sage); }
.how-faq-item[open] summary::after {
  content: "×";
  background: var(--sage);
  color: #fff;
  transform: rotate(0deg);
}

.how-faq-item p {
  margin: 0;
  padding: 0 1.3rem 1.2rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ——— CTA finale (riusa .cta della home, override piccolo) ——— */
.how-page-cta {
  border-top: none;
}

@media (max-width: 600px) {
  .how-block { padding: 3.5rem 1.25rem; }
  .how-page-hero { padding: 6rem 1.25rem 3rem; }
}
