/* About Fresh Dental — PDF cream layout + gold accents */

.fd-about {
  --fd-about-gold: var(--brand-primary, #b28b42);
  --fd-about-cream: #faf5e8;
  --fd-about-cream-deep: #f3eee0;
  --fd-about-fg: #141414;
  --fd-about-muted: #3a3a3a;
  --fd-about-rule: #1a1a1a;
  --fd-about-ease: cubic-bezier(0.22, 0.72, 0.2, 1);
  --fd-about-duration: 0.65s;
  --fd-about-header-offset: 4.5rem;
  position: relative;
  background: var(--fd-about-cream);
  color: var(--fd-about-fg);
  font-family: "Montserrat", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-margin-top: var(--fd-about-header-offset);
  overflow-x: clip;
}

.fd-about__pin {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.fd-about__frame {
  position: relative;
  display: grid;
  /* Copy | media — dots are absolutely centred on this seam */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: var(--fd-about-cream);
}

.fd-about__copy {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 4.5vw, 3.75rem) clamp(1.5rem, 4.5vw, 4rem);
  background: var(--fd-about-cream);
  z-index: 2;
  min-width: 0;
}

.fd-about__copy-stack {
  display: grid;
  width: min(34rem, 100%);
}

.fd-about__panel {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 22px, 0);
  pointer-events: none;
  transition:
    opacity var(--fd-about-duration) var(--fd-about-ease),
    transform var(--fd-about-duration) var(--fd-about-ease),
    visibility 0s linear var(--fd-about-duration);
  will-change: opacity, transform;
}

.fd-about__panel.is-active {
  /* Force visible — never leave an empty cream frame after slide 3. */
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  z-index: 1;
  transition:
    opacity var(--fd-about-duration) var(--fd-about-ease),
    transform var(--fd-about-duration) var(--fd-about-ease),
    visibility 0s linear 0s;
}

.fd-about__heading {
  margin: 0;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--fd-about-fg);
}

.fd-about__subheading {
  margin: 0.4rem 0 0;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #222;
}

.fd-about__rule {
  display: block;
  margin: 1.1rem 0 1.15rem;
  max-width: 16rem;
  width: 100%;
  height: 12px;
  position: relative;
}

.fd-about__rule-svg {
  display: block;
  width: 100%;
  height: 12px;
  overflow: visible;
}

.fd-about__rule-line {
  stroke: var(--fd-about-rule);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.fd-about__rule-dot {
  fill: var(--fd-about-fg);
  transition: cx 0.45s var(--fd-about-ease);
}

.fd-about__body {
  display: grid;
  gap: 0.85rem;
}

.fd-about__body--mobile {
  display: none;
}

.fd-about__body p {
  margin: 0;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.65;
  color: var(--fd-about-muted);
  font-weight: 400;
}

.fd-about__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.35rem;
  padding: 0.85rem 1.35rem 0.85rem 1.55rem;
  border-radius: 999px;
  background: #111;
  color: #faf5e8;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid #111;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.fd-about__cta:hover,
.fd-about__cta:focus-visible {
  border-color: var(--fd-about-gold);
  background: #000;
  outline: none;
}

.fd-about__cta-arrow {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--fd-about-gold);
  flex-shrink: 0;
}

.fd-about__dots {
  /* Span full frame so absolute left% is relative to the whole section, not one column */
  grid-column: 1 / -1;
  grid-row: 1;
  position: absolute;
  z-index: 5;
  /* Seam = boundary between 1fr copy and 1.08fr media */
  left: calc(100% * 1 / 2.08);
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  width: max-content;
  pointer-events: auto;
}

.fd-about__dot {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #111;
  color: var(--fd-about-gold);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fd-about-gold) 55%, transparent);
  transition: background 0.3s var(--fd-about-ease), color 0.3s ease, transform 0.2s ease;
  touch-action: manipulation;
}

.fd-about__dot.is-active,
.fd-about__dot[aria-current="true"] {
  background: var(--fd-about-gold);
  color: #111;
  box-shadow: none;
}

.fd-about__dot:hover,
.fd-about__dot:focus-visible {
  transform: scale(1.06);
  outline: none;
}

.fd-about__media {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 100%;
  overflow: hidden;
  background: var(--fd-about-cream-deep);
}

.fd-about__shot {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition:
    opacity calc(var(--fd-about-duration) + 0.08s) var(--fd-about-ease),
    transform calc(var(--fd-about-duration) + 0.12s) var(--fd-about-ease),
    visibility 0s linear var(--fd-about-duration);
  will-change: opacity, transform;
  pointer-events: none;
}

.fd-about__shot.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1);
  z-index: 1;
  pointer-events: auto;
  transition:
    opacity calc(var(--fd-about-duration) + 0.08s) var(--fd-about-ease),
    transform calc(var(--fd-about-duration) + 0.12s) var(--fd-about-ease),
    visibility 0s linear 0s;
}

.fd-about__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--fd-about-object-position, center center);
}

/* Mobile / tablet: pinned viewport card — generous image, filled frame, page scroll advances */
@media (max-width: 899px) {
  .fd-about {
    --fd-about-duration: 0.35s;
    --fd-about-header-offset: 3.75rem;
  }

  /* CSS sticky replaces GSAP pin on mobile — avoids pin refresh jumps */
  .fd-about__pin {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
  }

  .fd-about__frame {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    /* No cream spacer under the fixed header — media expands into that band. */
    padding-top: 0;
    overflow: hidden;
  }

  /* Primary visual — grows by header-offset so cover image sits under the header */
  .fd-about__media {
    --fd-about-media-h: clamp(11.5rem, 33dvh, 16rem);
    order: 1;
    grid-column: auto;
    grid-row: auto;
    position: relative;
    width: 100%;
    min-height: 0;
    flex: 0 0 calc(var(--fd-about-media-h) + var(--fd-about-header-offset));
    height: calc(var(--fd-about-media-h) + var(--fd-about-header-offset));
    aspect-ratio: auto;
  }

  .fd-about__dots {
    order: 2;
    grid-column: auto;
    grid-row: auto;
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    /* Straddle the horizontal seam between image (above) and cream (below) */
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    margin: -1.175rem 0;
    padding: 0 1.15rem;
    align-self: stretch;
    flex: 0 0 auto;
    text-align: center;
    transform: none;
    z-index: 5;
  }

  .fd-about__dot {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.85rem;
  }

  .fd-about__copy {
    order: 3;
    grid-column: auto;
    grid-row: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Clear the straddling 1–2–3 dots, then flow title → body → CTA */
    justify-content: flex-start;
    padding: 1.65rem 1.25rem 1.25rem;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    text-align: center;
  }

  /* Grid-stack panels (same cell) so height comes from content — not absolute collapse */
  .fd-about__copy-stack {
    position: relative;
    display: grid;
    width: 100%;
    flex: 0 1 auto;
    min-height: 0;
    text-align: center;
  }

  .fd-about__panel {
    grid-area: 1 / 1;
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    box-sizing: border-box;
    transform: translate3d(10px, 0, 0);
    text-align: center;
  }

  .fd-about__panel.is-active {
    position: relative;
    transform: translate3d(0, 0, 0);
  }

  .fd-about__heading {
    font-size: clamp(1.55rem, 6.8vw, 2rem);
    padding-top: 0;
    line-height: 1.08;
    font-weight: 700;
    text-align: center;
  }

  .fd-about__subheading {
    font-size: clamp(0.98rem, 3.4vw, 1.12rem);
    margin-top: 0.3rem;
    text-align: center;
  }

  .fd-about__rule {
    margin: 0.55rem auto;
    max-width: 11rem;
    width: 100%;
    flex-shrink: 0;
  }

  .fd-about__rule,
  .fd-about__heading,
  .fd-about__subheading,
  .fd-about__body,
  .fd-about__cta {
    margin-left: auto;
    margin-right: auto;
  }

  .fd-about__body--desktop {
    display: none;
  }

  .fd-about__body--mobile {
    display: grid;
    gap: 0.65rem;
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    text-align: center;
  }

  .fd-about__body--mobile p {
    font-size: clamp(0.94rem, 3.3vw, 1.02rem);
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
  }

  .fd-about__cta {
    position: relative;
    display: inline-flex;
    margin-top: 0.95rem;
    align-self: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0.8rem 1.3rem 0.8rem 1.4rem;
    font-size: 0.94rem;
  }
}

/* Tall phones: larger image + airier type so the frame feels filled */
@media (max-width: 899px) and (min-height: 780px) {
  .fd-about__media {
    --fd-about-media-h: clamp(14rem, 38dvh, 18rem);
  }

  .fd-about__heading {
    font-size: clamp(1.75rem, 7.2vw, 2.2rem);
  }

  .fd-about__subheading {
    font-size: clamp(1.05rem, 3.6vw, 1.18rem);
  }

  .fd-about__body--mobile {
    gap: 0.85rem;
  }

  .fd-about__body--mobile p {
    font-size: clamp(1rem, 3.5vw, 1.08rem);
    line-height: 1.58;
  }

  .fd-about__rule {
    margin: 0.65rem auto;
  }
}

/* Short phones: keep CTA in view */
@media (max-width: 899px) and (max-height: 720px) {
  .fd-about__media {
    --fd-about-media-h: clamp(10.5rem, 28dvh, 13rem);
  }

  .fd-about__body--mobile {
    gap: 0.5rem;
  }

  .fd-about__body--mobile p {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .fd-about__cta {
    min-height: 2.55rem;
    padding: 0.7rem 1.2rem 0.7rem 1.3rem;
  }
}

@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .fd-about__panel {
    transition:
      opacity 0.35s var(--fd-about-ease),
      transform 0.35s var(--fd-about-ease),
      visibility 0s linear 0.35s;
  }

  .fd-about__panel.is-active {
    transition:
      opacity 0.35s var(--fd-about-ease),
      transform 0.35s var(--fd-about-ease),
      visibility 0s linear 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fd-about {
    --fd-about-duration: 0.01ms;
  }

  .fd-about__panel,
  .fd-about__shot,
  .fd-about__cta,
  .fd-about__dot {
    transition: none !important;
    transform: none !important;
  }
}
