/* =========================================================
   SPEAKING PAGE
   Builds on home.css (shared hero, buttons, testimonials,
   marquee, gallery and CTA). Loaded on pages/speaking.html only.
   ========================================================= */

/* ---------- Hero ---------- */
.sp-hero__title {
  font-size: clamp(2.5rem, 4.8vw, 4.5rem);
  line-height: 1.08;
  max-width: 13ch;
}
.sp-hero__arch img { object-position: center 20%; }
@media (max-width: 860px) {
  .sp-hero__title { font-size: clamp(2.125rem, 9vw, 2.75rem); max-width: none; }
}

/* ---------- Trusted By ---------- */
.sp-trusted { border-bottom: 1px solid var(--hair); }

/* ---------- About ---------- */
.sp-about {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.sp-about__media {
  position: relative;
  margin: 0;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -30px rgba(61, 26, 43, 0.45);
}
.sp-about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% center; }
.sp-about__text p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: var(--space-lg);
}
.sp-about__text .sp-about__close {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--plum);
  margin: var(--space-xl) 0;
}
.sp-about__text .h-textlink { margin-top: 0; }

/* ---------- Signature Talks ---------- */
.sp-talks__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
}
.sp-talk {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) clamp(1.25rem, 3vw, 2.5rem);
  transition: background 0.5s var(--h-ease);
}
.sp-talk + .sp-talk { border-left: 1px solid var(--hair); }
.sp-talk::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 0; height: 2px;
  background: var(--plum);
  transition: width 0.6s var(--h-ease);
}
.sp-talk:hover { background: #fff; }
.sp-talk:hover::before { width: 100%; }
.sp-talk__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: var(--space-lg);
}
.sp-talk__title {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--space-md);
}
.sp-talk__desc { color: var(--ink-soft); line-height: 1.75; margin-bottom: var(--space-xl); }
.sp-talk__for {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px dashed var(--hair);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.sp-talk__for strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 0.25rem;
}
.sp-center { text-align: center; margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Watch Me Speak (click-to-play YouTube) ---------- */
.sp-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.sp-video { margin: 0; }
.sp-video__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--plum-ink);
  cursor: pointer;
  box-shadow: 0 20px 40px -24px rgba(61, 26, 43, 0.55);
}
.sp-video__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--h-ease), filter 0.6s var(--h-ease);
}
.sp-video__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(42, 18, 32, 0.18);
  transition: opacity 0.5s var(--h-ease);
}
.sp-video__play {
  position: absolute;
  z-index: 1;
  left: 50%; top: 50%;
  width: 68px; height: 68px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--plum);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.25);
  transition: transform 0.45s var(--h-ease), background 0.45s var(--h-ease);
}
.sp-video__play::after {
  content: "";
  position: absolute;
  left: 54%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.sp-video__frame:hover img { transform: scale(1.05); }
.sp-video__frame:hover .sp-video__play { transform: translate(-50%, -50%) scale(1.1); background: var(--plum-deep); }
.sp-video__frame:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sp-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-video__frame.is-playing::after,
.sp-video__frame.is-playing .sp-video__play { display: none; }
.sp-video figcaption { padding-top: var(--space-md); }
.sp-video__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.sp-video__meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
}

/* ---------- Photo Gallery (8 photos, gap-free) ---------- */
.sp-gallery {
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  grid-template-rows: repeat(3, clamp(170px, 18vw, 260px));
  grid-template-areas:
    "a b b c"
    "a d e c"
    "g g h f";
}
.sp-gallery__item--g { grid-area: g; }
.sp-gallery__item--h { grid-area: h; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sp-videos { grid-template-columns: repeat(2, 1fr); }
  .sp-videos .sp-video:last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .sp-about { grid-template-columns: 1fr; }
  .sp-about__media { max-width: 420px; margin: 0 auto; aspect-ratio: 4 / 4.4; }
  .sp-talks__grid { grid-template-columns: 1fr; }
  .sp-talk + .sp-talk { border-left: 0; border-top: 1px solid var(--hair); }
  .sp-talk { padding-left: 0; padding-right: 0; }
  .sp-talk:hover { background: transparent; }
  .sp-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: clamp(140px, 40vw, 230px);
    grid-template-areas:
      "a b"
      "a c"
      "d e"
      "g g"
      "h f";
  }
}
@media (max-width: 600px) {
  .sp-videos { grid-template-columns: 1fr; }
  .sp-videos .sp-video:last-child { grid-column: auto; }
}

/* Crop fixes */
.sp-about__media img { object-position: 52% center; }
.sp-gallery .h-gallery__item--a img { object-position: 82% center; }

/* Large screens: "Signature Talks ↓" stays on the same row, right after "Watch me speak"
   (the row may use a little of the empty gap beside the photo; nothing is resized) */
@media (min-width: 1200px) {
  .sp-hero .h-hero__cta { flex-wrap: nowrap; column-gap: 1.5rem; }
  .sp-hero .h-hero__cta .h-textlink { white-space: nowrap; }
}
@media (min-width: 1200px) {
  .sp-hero .h-hero__actions { flex: 0 0 auto; flex-wrap: nowrap; }
}

/* Trusted By now sits between the gallery and the closing CTA */
.sp-trusted { border-bottom: 0; border-top: 1px solid var(--hair); }


/* ---------- Hero photo slideshow (cross-fade + slow zoom) ---------- */
.sp-hero__arch { position: relative; }
.sp-hero__arch .sp-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease-in-out, transform 6.5s ease-out;
}
.sp-hero__arch .sp-slide.is-active { opacity: 1; transform: scale(1); }
/* first photo mirrored so she faces left */
.sp-hero__arch .sp-slide--mirror { transform: scaleX(-1) scale(1.06); object-position: center 20%; }
.sp-hero__arch .sp-slide--mirror.is-active { transform: scaleX(-1) scale(1); }
/* keep her centred in each crop */
.sp-hero__arch .sp-slide--audience  { object-position: 55% 40%; }
.sp-hero__arch .sp-slide--room      { object-position: 22% 40%; }
.sp-hero__arch .sp-slide--reception { object-position: 48% 30%; }
@media (prefers-reduced-motion: reduce) {
  .sp-hero__arch .sp-slide { transition: none; }
}

/* Logo seal moves to the right edge of the arch, away from the
   "Signature Talks" link and the hero buttons */
.sp-hero .h-hero__seal { left: auto; right: -48px; bottom: 96px; }
@media (max-width: 1100px) { .sp-hero .h-hero__seal { left: auto; right: -24px; } }
@media (max-width: 860px)  { .sp-hero .h-hero__seal { left: auto; right: 8px; bottom: 24px; } }

/* =========================================================
   HERO FRAME: landscape 3:2 (the photos' own shape) with the
   arch curve on the upper-left corner only, so each audience
   photo shows whole and the frame stays clear of the CTA row.
   ========================================================= */
.sp-hero .h-hero__media {
  align-self: center;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
}
.sp-hero .sp-hero__arch {
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: clamp(90px, 14vw, 200px) 6px 6px 6px;
  background: #1C1118;                       /* dark stage tone behind the tall stage photo */
  box-shadow: 0 30px 60px -30px rgba(61, 26, 43, 0.55);
}
.sp-hero .h-hero__media::before {            /* outline follows the same shape */
  inset: -16px -16px 16px 16px;
  border: 1px solid rgba(94, 42, 65, 0.28);
  border-radius: clamp(100px, 15vw, 214px) 8px 8px 8px;
}
.sp-hero__arch .sp-slide,
.sp-hero__arch .sp-slide.is-active {
  object-fit: cover;                         /* 3:2 photos in a 3:2 frame: nothing lost */
  object-position: center;
  transform: none;                           /* no zoom, so the edges stay in view */
  transition: opacity 1.2s ease-in-out;
}
.sp-hero__arch .sp-slide--mirror,
.sp-hero__arch .sp-slide--mirror.is-active {
  object-fit: contain;                       /* tall stage photo shown head to toe */
  transform: scaleX(-1);
}
@media (min-width: 861px) {
  .sp-hero .h-hero__inner { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 4rem); }
  .sp-hero .h-hero__media { max-width: 760px; justify-self: end; }
}
@media (max-width: 860px) {
  .sp-hero .h-hero__media { max-width: none; }
  .sp-hero .h-hero__media::before { inset: -10px -8px 10px 8px; }
}
/* seal sits on the top-right corner, off the people in the photos */
.sp-hero .h-hero__seal { left: auto; right: -40px; top: -40px; bottom: auto; width: 96px; height: 96px; padding: 15px 12px; }
@media (max-width: 860px) { .sp-hero .h-hero__seal { right: -6px; top: -30px; width: 72px; height: 72px; padding: 11px 8px; } }

/* Curve on the lower-left corner, opening space beside "Signature Talks" */
.sp-hero .sp-hero__arch { border-radius: 6px 6px 6px clamp(90px, 14vw, 200px); }
.sp-hero .h-hero__media::before { inset: -16px -16px 16px 16px; border-bottom: 1px solid rgba(94, 42, 65, 0.28); border-radius: 8px 8px 8px clamp(100px, 15vw, 214px); }
@media (max-width: 860px) { .sp-hero .h-hero__media::before { inset: -10px -8px 10px 8px; } }

/* Hero text column and elements back to the shared hero layout
   (same columns, widths and sizes as before); only the photo frame differs */
@media (min-width: 861px) {
  .sp-hero .h-hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); }
  .sp-hero .h-hero__media { max-width: none; justify-self: stretch; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .sp-hero .h-hero__inner { grid-template-columns: 1fr 0.9fr; }
}
@media (max-width: 860px) {
  .sp-hero .h-hero__media { max-width: 360px; justify-self: center; }
}

/* Larger photo: it grows to the left into the open space beside the
   heading; the text column itself is unchanged */
@media (min-width: 1100px) {
  .sp-hero .h-hero__media { justify-self: end; width: calc(100% + 150px); margin-left: -150px; }
}
@media (min-width: 861px) and (max-width: 1099px) {
  .sp-hero .h-hero__media { justify-self: end; width: calc(100% + 60px); margin-left: -60px; }
}
@media (max-width: 860px) {
  .sp-hero .h-hero__media { max-width: 560px; }
}
@media (min-width: 861px) and (max-width: 1099px) { .sp-hero .h-hero__seal { right: -10px; } }

/* About me as a speaker: the speaking paragraph leads */
.sp-about__text .sp-about__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: var(--space-xl);
}

/* "About me as a speaker": amber line centred under the words, as in the other section headings */
.sp-about__head { display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 100%; }
.sp-about__head .h-rule { margin-left: auto; margin-right: auto; }

/* Signature Talks and Watch Me Speak share the same ivory background, so their
   paddings stacked into one large empty band; tighten the join */
.sp-talks { padding-bottom: clamp(2.5rem, 4vw, 3.5rem); }
#watch { padding-top: clamp(2.5rem, 4vw, 3.5rem); }

/* Direct YouTube link under each video (always works, even offline-opened pages) */
.sp-video__yt {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--plum);
  border-bottom: 1px solid var(--amber-deep, #D97706);
  padding-bottom: 1px;
  transition: color 0.3s ease;
}
.sp-video__yt:hover { color: var(--amber-text, #B45309); }
.sp-video figcaption { display: flex; flex-direction: column; align-items: flex-start; }

/* Four videos: a balanced 2 x 2 grid */
.sp-videos { grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); max-width: 1040px; margin-inline: auto; }
.sp-videos .sp-video:last-child { grid-column: auto; }
@media (max-width: 600px) { .sp-videos { grid-template-columns: 1fr; } }
/* square graduation clip sits whole inside the 16:9 frame */
.sp-video__frame--square { background: #1C1118; }
.sp-video__frame--square img { object-fit: contain; }
.sp-video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1C1118; }
