/* Shared visual contract for repeated blocks across every direction.
   Match the block structure as well as its newer class names: older CMS
   sections often do not carry the editorial classes used by recent pages. */

:root {
  --shared-cream: #f6f0eb;
  --shared-card: #ede1db;
  --shared-wine: #551025;
  --shared-ink: #251b1b;
  --shared-muted: #6d5f5d;
  --shared-accent: #8a5360;
}

/* Шаг за шагом: one layout for the homepage, weddings, business, birthdays,
   and graduation pages, including legacy sections without a process class. */
html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) {
  text-align: center;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .eyebrow {
  margin: 0 0 16px !important;
  color: var(--shared-accent) !important;
  font: 500 10px/1.5 'Manrope', sans-serif !important;
  letter-spacing: .18em !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) > h2,
html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .w-heading > h2,
html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .wrap > h2 {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: auto !important;
  max-width: 24ch !important;
  margin: 0 auto 28px !important;
  padding: 0 !important;
  color: var(--shared-wine) !important;
  font: 400 clamp(36px, 5vw, 62px)/1 'Cormorant Garamond', Georgia, serif !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  transform: none !important;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .w-heading {
  display: block !important;
  margin: 0 auto 28px !important;
  text-align: center !important;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) :is(.w-heading > p, .section-subtitle) {
  max-width: 54ch !important;
  margin: 12px auto 0 !important;
  color: var(--shared-muted) !important;
  font: 400 14px/1.7 'Manrope', sans-serif !important;
  text-align: center !important;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .steps.carousel-track {
  display: flex !important;
  gap: 28px !important;
  overflow-x: auto !important;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: none;
}

html body main :is(
  #approach,
  #w-process,
  #b-process,
  #graduation-process,
  .unified-process,
  .event-process,
  .w-process,
  section:has(.steps.carousel-track)
) .steps.carousel-track::-webkit-scrollbar { display: none; }

@media (min-width: 761px) {
  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step {
    position: relative !important;
    display: grid !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 420px !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr) !important;
    align-content: stretch !important;
    column-gap: clamp(28px, 4vw, 56px) !important;
    row-gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--shared-card) !important;
    color: var(--shared-ink) !important;
    text-align: left !important;
    scroll-snap-align: start !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > :is(img, picture) {
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 / 6 !important;
    align-self: stretch !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > picture > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > .number {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: end !important;
    margin: 0 30px 8px 0 !important;
    color: var(--shared-accent) !important;
    font: 400 62px/1 'Cormorant Garamond', Georgia, serif !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > h3 {
    grid-column: 2 !important;
    grid-row: 3 !important;
    align-self: end !important;
    margin: 0 30px 8px 0 !important;
    padding: 0 !important;
    color: var(--shared-ink) !important;
    font: 400 clamp(30px, 3.1vw, 42px)/1.04 'Cormorant Garamond', Georgia, serif !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    text-transform: uppercase !important;
    transform: none !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > p {
    grid-column: 2 !important;
    grid-row: 4 !important;
    align-self: start !important;
    max-width: 390px !important;
    margin: 0 30px 0 0 !important;
    padding: 0 !important;
    color: var(--shared-muted) !important;
    font: 400 16px/1.6 'Manrope', sans-serif !important;
    text-align: left !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) > h2,
  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .w-heading > h2,
  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .wrap > h2 {
    max-width: 20ch !important;
    margin-bottom: 22px !important;
    font-size: clamp(34px, 9vw, 46px) !important;
    line-height: 1.02 !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track { gap: 14px !important; }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step {
    display: flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 0 28px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--shared-card) !important;
    color: var(--shared-ink) !important;
    text-align: left !important;
    scroll-snap-align: start !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > :is(img, picture) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > picture > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > .number {
    position: static !important;
    align-self: flex-start !important;
    grid-column: auto !important;
    grid-row: auto !important;
    float: none !important;
    transform: none !important;
    margin: 24px 24px 8px !important;
    color: var(--shared-accent) !important;
    font: 400 48px/1 'Cormorant Garamond', Georgia, serif !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > h3 {
    margin: 0 24px 12px !important;
    padding: 0 !important;
    color: var(--shared-ink) !important;
    font: 400 34px/1.04 'Cormorant Garamond', Georgia, serif !important;
    text-align: left !important;
    text-transform: uppercase !important;
  }

  html body main :is(
    #approach,
    #w-process,
    #b-process,
    #graduation-process,
    .unified-process,
    .event-process,
    .w-process,
    section:has(.steps.carousel-track)
  ) .steps.carousel-track > .step > p {
    max-width: none !important;
    margin: 0 24px !important;
    padding: 0 !important;
    color: var(--shared-muted) !important;
    font: 400 14px/1.65 'Manrope', sans-serif !important;
    text-align: left !important;
  }
}

/* Event format cards use the same image treatment, overlay, type hierarchy,
   and card height regardless of which direction page they appear on. */
html body main section:has(.formats .format) .formats .format {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(360px, 36vw, 460px);
  overflow: hidden;
  border-radius: 12px;
  background: #25151a;
  color: #fff;
  isolation: isolate;
}

html body main section:has(.formats .format) .formats .format > img,
html body main section:has(.formats .format) .formats .format > picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

html body main section:has(.formats .format) .formats .format > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html body main section:has(.formats .format) .formats .format::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #1c1010e8, #1c101000);
}

html body main section:has(.formats .format) .formats .format:hover > img,
html body main section:has(.formats .format) .formats .format:hover > picture {
  transform: scale(1.035);
}

html body main section:has(.formats .format) .formats .format h3 {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  width: 100%;
  margin: 0;
  padding: 25px;
  color: #fff;
  font: 400 clamp(24px, 2.3vw, 34px)/1.08 'Cormorant Garamond', Georgia, serif;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  html body main section:has(.formats .format) .formats .format { min-height: 390px; }
  html body main section:has(.formats .format) .formats .format h3 { padding: 22px; font-size: 29px; }
}

/* The same gallery image ratio and spacing on all editorial directions;
   the rail remains swipeable where its existing markup provides a slider. */
html body main :is(.w-gallery, [data-premium-gallery]) :is(figure, [data-gallery-slide]) {
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

html body main :is(.w-gallery, [data-premium-gallery]) :is(figure, [data-gallery-slide]) > img,
html body main :is(.w-gallery, [data-premium-gallery]) :is(figure, [data-gallery-slide]) > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

html body main :is(.w-gallery, [data-premium-gallery]) figcaption { display: none !important; }

/* A restrained shared feature-card rhythm across legacy and editorial pages. */
html body main > .features > div,
html body main .w-benefits > article,
html body main .theme-benefits-grid > * {
  box-sizing: border-box;
}

html body main > .features :is(h3, p),
html body main .w-benefits :is(h3, p),
html body main .theme-benefits-grid :is(h3, p) {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  html body main section:has(.formats .format) .formats .format > :is(img, picture) { transition: none; }
}
/* Keep hero copy anchored to the same left edge on every direction and format page. */
main > :is(.hero, .w-hero, .event-hero) :is(.hero-content, .w-hero-copy, .wrap),
main > :is(.hero, .w-hero, .event-hero) h1 {
  text-align: left !important;
}

main > :is(.hero, .w-hero, .event-hero) :is(.hero-content, .w-hero-copy, .wrap) {
  align-items: flex-start !important;
  justify-items: start !important;
  margin-inline: 0 auto !important;
}

main > :is(.hero, .w-hero, .event-hero) h1 {
  align-self: flex-start !important;
  justify-self: start !important;
  margin-inline: 0 auto !important;
}

/* Shared mobile typography and gutters for every direction and event format. */
@media(max-width:760px){
 html body[class] main{--mobile-gutter:24px}
 html body[class] main :is(.hero,.w-hero,.event-hero) h1{font-size:clamp(30px,8.7vw,36px)!important;line-height:1.08!important;letter-spacing:-.025em;max-width:100%!important;text-align:left!important}
 html body[class] main h2{font-size:clamp(25px,7.2vw,30px)!important;line-height:1.12!important}
 html body[class] main :is(.formats .format,.step) h3{font-size:24px!important;line-height:1.15}
 html body[class] main .w-container{box-sizing:border-box;width:calc(100% - 48px)!important;margin-inline:auto!important}
 html:not([data-page="home"]) body main>.hero>.wrap{box-sizing:border-box;width:100%;padding-inline:24px!important;margin-inline:0!important}
 html:not([data-page="home"]) body main>.hero .hero-content{box-sizing:border-box;width:100%;max-width:100%;padding-inline:0!important;margin-inline:0!important}
 html body[class] main>.w-hero .w-hero-copy{box-sizing:border-box;width:100%;max-width:100%;padding-inline:0;margin-inline:0!important}
 html body[class] main :is(.banner,.graduation-last-bell-copy){box-sizing:border-box;padding-inline:24px!important}
 html body[class] main :is(.banner,.graduation-last-bell-copy) h2{max-width:100%!important;text-align:left}
}
