/* Come funziona (October 2026): opening, couple steps along a numbered line,
   a break photograph, guest steps with a phone, questions and closing. */
.cf-page {
  --cf-gutter: max(16px, 4vw);
}
.cf-page h2 {
  font-size: clamp(38px, 4.4vw, 60px);
}
.atmosphere-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--wash);
}
.atmosphere-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Opening */
.cf-opening {
  max-width: 1280px;
  margin: auto;
  padding: 48px var(--cf-gutter) 32px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.cf-opening h1 {
  font-size: clamp(48px, 5.6vw, 86px);
  max-width: 12ch;
}
.cf-opening-copy p:last-child {
  max-width: 44ch;
  font-size: 18px;
  line-height: 1.7;
  color: #443d39;
  margin-bottom: 0;
}

.cf-section {
  max-width: 1200px;
  margin: auto;
  padding: clamp(56px, 8vw, 104px) var(--cf-gutter);
}
.cf-section > h2 {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* Couple steps: copy and screenshot alternate around a numbered line. The
   line is full without motion; motion.js fills it with the scroll. */
.cf-steps {
  position: relative;
}
.cf-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cf-line {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}
.cf-line-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: top;
}
.cf-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center;
  padding-block: clamp(28px, 4vw, 48px);
}
.cf-step-number {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--paper);
  color: var(--accent);
  font: 400 22px/1 var(--display);
}
.cf-step > .cf-step-number {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
}
.cf-step-copy h3 {
  font: 400 clamp(28px, 2.6vw, 36px)/1.15 var(--display);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.cf-step-copy p {
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.7;
  color: #443d39;
}
.cf-step:nth-child(odd) .cf-step-copy {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  padding-right: 8px;
}
.cf-step:nth-child(odd) .cf-shot {
  grid-column: 3;
  grid-row: 1;
}
.cf-step:nth-child(even) .cf-step-copy {
  grid-column: 3;
  grid-row: 1;
  padding-left: 8px;
}
.cf-step:nth-child(even) .cf-shot {
  grid-column: 1;
  grid-row: 1;
}
.cf-shot {
  margin: 0;
}

/* Break photograph */
.cf-break {
  max-width: 1200px;
  margin: 0 auto;
  width: calc(100% - 2 * var(--cf-gutter));
}

/* Guest steps. With JavaScript on desktop a sticky phone shows the screen of
   the step in view; otherwise each step shows its own screen. */
.cf-guest-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}
.cf-guest-step .cf-step-copy {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
}
.cf-guest-step .cf-step-number {
  grid-row: span 2;
}
.cf-guest-shot {
  margin: 24px 0 0 64px;
  max-width: 300px;
}

.cf-phone {
  display: none;
}
@media (min-width: 1024px) and (min-height: 760px) {
  .cf-guests-layout[data-cf-ready] {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(48px, 8vw, 120px);
    align-items: start;
  }
  .cf-guests-layout[data-cf-ready] .cf-phone {
    display: block;
    position: sticky;
    top: var(--cf-sticky-top, 24px);
  }
  .cf-guests-layout[data-cf-ready] .cf-phone-screen {
    position: relative;
    display: grid;
    border: 10px solid #2b2624;
    border-radius: 40px;
    overflow: visible;
    background: var(--surface);
    box-shadow: 0 24px 50px #49352920;
  }
  .cf-guests-layout[data-cf-ready] .cf-phone-panel {
    grid-area: 1 / 1;
    align-self: start;
    visibility: hidden;
    opacity: 0;
    transition: opacity 400ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  }
  .cf-guests-layout[data-cf-ready] .cf-phone-panel.is-active {
    visibility: visible;
    opacity: 1;
  }
  .cf-guests-layout[data-cf-ready] .cf-guest-step {
    min-height: 62vh;
    display: flex;
    align-items: center;
  }
  .cf-guests-layout[data-cf-ready] .cf-guest-shot {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cf-guests-layout[data-cf-ready] .cf-phone-panel {
    transition: none;
  }
}

/* Questions */
.cf-faq {
  max-width: 900px;
}
.cf-faq .help-questions details:last-child {
  border-bottom: 1px solid var(--line);
}

/* Closing */
.cf-closing {
  max-width: 1200px;
  margin: auto;
  padding: 0 var(--cf-gutter) clamp(64px, 9vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.cf-closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1023px) {
  .cf-opening,
  .cf-closing {
    grid-template-columns: minmax(0, 1fr);
  }
  .cf-opening {
    padding-top: 32px;
  }
}
@media (max-width: 767px) {
  .cf-line {
    left: 22px;
  }
  .cf-step {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
  }
  .cf-step > .cf-step-number {
    grid-column: 1;
  }
  .cf-step:nth-child(n) .cf-step-copy {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    padding: 0;
  }
  .cf-step:nth-child(n) .cf-shot {
    grid-column: 2;
    grid-row: 2;
    margin-top: 24px;
    max-width: 300px;
  }

  .cf-section > h2 {
    text-align: left;
  }
  .cf-guest-shot {
    margin-left: 64px;
    max-width: min(300px, calc(100% - 64px));
  }
  .cf-closing-actions .button {
    width: 100%;
  }
}

/* Native examples remain full-size text at every breakpoint. */
.cf-example-note {
  text-align: center;
  color: #5c514c;
  margin: -12px auto 32px;
  max-width: 48ch;
  padding-inline: 8px;
}
.cf-guest-shot {
  max-width: 390px;
}
.cf-guests-layout .cf-phone {
  display: block;
  position: fixed;
  left: -10000px;
  width: 300px;
  visibility: hidden;
  pointer-events: none;
}
.cf-phone-screen {
  display: grid;
  /* Keep measurement geometry identical before/after the enhancement. */
  border: 10px solid transparent;
}
.cf-phone-panel {
  grid-area: 1 / 1;
  align-self: start;
  visibility: hidden;
}
.cf-phone-panel .cf-example {
  box-shadow: none;
  border-radius: 26px;
}
@media (min-width: 1024px) and (min-height: 760px) {
  .cf-guests-layout[data-cf-ready] .cf-phone {
    position: sticky;
    left: auto;
    visibility: visible;
    pointer-events: auto;
  }
}
@media (max-width: 479px) {
  .cf-step:nth-child(n) .cf-shot {
    grid-column: 1 / -1;
    max-width: none;
    width: 100%;
  }
  .cf-guest-shot {
    margin-left: 0;
    max-width: none;
    width: 100%;
  }
  .cf-step-copy h3 {
    overflow-wrap: anywhere;
  }
}

/* Gutters for the revised examples, without altering application breakpoints. */
@media (min-width: 360px) and (max-width: 479px) { .cf-page { --cf-gutter: 20px; } }
@media (min-width: 480px) and (max-width: 767px) { .cf-page { --cf-gutter: 24px; } }
@media (min-width: 768px) and (max-width: 1023px) { .cf-page { --cf-gutter: 32px; } }
@media (min-width: 1440px) { .cf-opening { max-width: 1200px; } }
