/* Analisi viso e cute — tavola tecnica (D106). Graph paper under the page. */

.an {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(rgba(23, 25, 26, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 26, .055) 1px, transparent 1px),
    linear-gradient(rgba(23, 25, 26, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 26, .025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.an h2 { margin: 0 0 28px; font-size: clamp(36px, 3.8vw, 56px) !important; line-height: 1.06 !important; }

/* The drawing: lines draw themselves once their group is on. */
.bp { display: block; width: 100%; height: auto; overflow: visible; }
.bp-line,
.bp-guide,
.bp-dim,
.bp-accent { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bp-line { stroke: var(--cream); stroke-width: 1.6; }
.bp-guide { stroke: rgba(23, 25, 26, .3); stroke-width: 1; stroke-dasharray: 4 5; }
.bp-dim { stroke: var(--gold); stroke-width: 1.4; }
.bp-accent { stroke: var(--gold-line); stroke-width: 2.2; }
.bp-paper { fill: #FFFFFF; stroke: var(--hair-strong); }
.bp-lens { fill: rgba(184, 153, 104, .12); stroke: var(--gold-line); stroke-width: 2.2; }
.bp-label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; fill: var(--gold); text-anchor: middle; }
.bp-dot { fill: var(--gold-line); }
.bp-check circle { fill: var(--cream); }
.bp-check path { fill: none; stroke: #FFFFFF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bp-g { opacity: .12; transition: opacity .6s ease; }
.bp-g.is-on { opacity: 1; }
.bp-g .bp-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(.65, 0, .35, 1); }
.bp-g.is-on .bp-draw { stroke-dashoffset: 0; }
/* Dashed guides fade in instead of drawing: dashes and pathLength don't mix. */
.bp-g .bp-guide.bp-draw { stroke-dasharray: .012 .016; stroke-dashoffset: 0; opacity: 0; transition: opacity .9s ease .3s; }
.bp-g.is-on .bp-guide.bp-draw { opacity: 1; }
.bp-g .bp-dot,
.bp-g .bp-label,
.bp-g .bp-lens,
.bp-g .bp-check,
.bp-g .bp-paper { opacity: 0; transition: opacity .5s ease; }
.bp-g.is-on .bp-dot { opacity: 1; transition-delay: calc(.6s + var(--i) * .05s); }
.bp-g.is-on .bp-label,
.bp-g.is-on .bp-lens,
.bp-g.is-on .bp-paper { opacity: 1; transition-delay: .5s; }
.bp-g.is-on .bp-check { opacity: 1; transition-delay: .2s; }
/* In the hero everything draws in sequence. */
.an-sheet--hero .bp-g:nth-child(2) .bp-draw { transition-delay: .3s; }
.an-sheet--hero .bp-g:nth-child(3) .bp-draw { transition-delay: 1.1s; }
.an-sheet--hero .bp-g:nth-child(4) .bp-draw { transition-delay: 1.9s; }
.an-sheet--hero .bp-g:nth-child(5) .bp-check { transition-delay: 2.8s; }
.an-sheet--hero .bp-g { opacity: 1; }

.an-sheet {
  position: relative;
  padding: 34px 40px 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 0 0 1px var(--hair), 0 40px 80px -50px rgba(23, 25, 26, .45);
}

.an-hero { padding: 72px 0 120px; }
.an-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; align-items: center; }
.an-hero h1 { margin: 0 0 28px; font-size: clamp(48px, 5.4vw, 86px) !important; line-height: 1.02 !important; }
.an-hero .an-hero__lead { margin: 0; max-width: 580px; font-size: 20px !important; line-height: 1.6 !important; color: var(--mist); }
.an-sheet--hero { max-width: 460px; justify-self: center; width: 100%; transform: rotate(1.5deg); }

/* Steps: the drawing stays still and lights the part each step talks about. */
.an-steps { padding: 120px 0; border-top: 1px solid var(--hair); }
.an-steps__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 80px; }
.an-steps__aside { position: sticky; top: 110px; align-self: start; }
.an-steps__aside .an-sheet { max-width: 420px; }
.an-steps__list { list-style: none; margin: 0; padding: 0; }
.an-step { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 20px; padding: 0 0 14vh; }
.an-step:last-child { padding-bottom: 20vh; }
.an-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1.5px solid var(--hair-strong);
  background: #FFFFFF;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--mist);
  transition: background-color .4s ease, color .4s ease, border-color .4s ease;
}
.an-step.is-now .an-step__n,
.an-step.is-past .an-step__n { background: var(--cream); border-color: var(--cream); color: #FFFFFF; }
.an-step h3 { margin: 8px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--cream); }
.an-step p { margin: 0; color: var(--mist); }
.an-step > div { opacity: .4; transition: opacity .5s ease; }
.an-step.is-now > div,
.an-step.is-past > div { opacity: 1; }

/* A report sheet with a paper clip. */
.an-report-section { padding: 120px 0; border-top: 1px solid var(--hair); }
.an-report__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: center; }
.an-report-section .an-report__text { margin: 0 0 16px; max-width: 600px; color: var(--mist); }
.an-report {
  position: relative;
  padding: 40px 38px 30px;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--hair), 0 50px 90px -50px rgba(23, 25, 26, .5);
  transform: rotate(-1.5deg);
}
.an-report__clip {
  position: absolute;
  top: -18px;
  left: 44px;
  width: 22px;
  height: 64px;
  border: 3px solid #9A9EA2;
  border-radius: 12px;
}
.an-report__head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 18px; border-bottom: 2px solid var(--cream); }
.an-report__title { font-family: var(--serif); font-size: 40px; line-height: 1; }
.an-report__sub { font-size: 14px; color: var(--mist); }
.an-report__label { margin: 22px 0 6px; font-size: 14px; font-weight: 600; }
.an-report__list { list-style: none; margin: 0; padding: 0; }
.an-report__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--hair-strong); }
.an-report__list b { display: block; margin-bottom: 4px; font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.15; }
.an-report__list span { font-size: 15px; line-height: 1.55; color: var(--mist); }
.an-report__list span b { color: var(--cream); }
.an-report__foot { margin-top: 18px; font-size: 13px; font-style: italic; color: var(--mist); }

/* The plan on a ruler. */
.an-ruler-section { padding: 120px 0; border-top: 1px solid var(--hair); }
.an-ruler-section .an-ruler__text { margin: 0 0 40px; max-width: 640px; color: var(--mist); }
.an-ruler { margin-bottom: 30px; }
.an-ruler__bar {
  position: relative;
  height: 76px;
  border-radius: 6px;
  background-color: #F1E9DB;
  background-image:
    repeating-linear-gradient(90deg, rgba(23, 25, 26, .55) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(23, 25, 26, .35) 0 1px, transparent 1px 12px);
  background-size: 100% 30px, 100% 16px;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(23, 25, 26, .15);
}
.an-ruler__band {
  position: absolute;
  right: 0;
  bottom: 10px;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--cream);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(.65, 0, .35, 1) .2s;
}
.an-ruler.is-in .an-ruler__band { transform: scaleX(1); }
.an-ruler__marks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.an-ruler__marks li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 0 0 14px; border-left: 1px solid var(--hair-strong); }
.an-ruler__name { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--mist); }
.an-ruler__marks li.is-on .an-ruler__name { color: var(--cream); }
.an-ruler__value { font-size: 14px; color: var(--mist); }

@media (max-width: 900px) {
  .an-hero__grid,
  .an-report__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  /* Block, not grid: a grid item can only stick inside its own cell. */
  .an-steps__grid { display: block; }
  .an-hero h1 { font-size: clamp(38px, 8.6vw, 58px) !important; }
  .an-hero .an-hero__lead { font-size: 17px !important; }
  .an-sheet { padding: 22px 24px 16px; }
  .an-steps__aside { top: 70px; z-index: 2; padding: 8px 0 22px; background: linear-gradient(#FFFFFF 82%, rgba(255, 255, 255, 0)); }
  .an-steps__aside .an-sheet { max-width: 200px; margin: 0 auto; }
  .an-step { padding-bottom: 60px; }
  .an-step:last-child { padding-bottom: 30px; }
  .an-ruler__name { font-size: 20px; }
  .an-ruler__marks li { padding-left: 8px; }
  .an-ruler__value { font-size: 12px; }
}

@media (max-width: 640px) {
  .an-step h3 { font-size: 25px; }
  .an-report { padding: 34px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-g .bp-draw { transition: none; stroke-dashoffset: 0; }
  .an-ruler__band { transform: none; transition: none; }
}
