/* Purpose: Thank-you screen — full-bleed photo pane beside the confirmation copy. On desktop the
   whole page fits one viewport; below 901px the pane stacks on top and the page scrolls. */

/* The screen is the whole page: no dock clearance and a solid ground without the gold-dust wash. */
body:has(.thankyou) {
  padding-bottom: 0;
  background: var(--color-bg);
}

body:has(.thankyou)::before {
  display: none;
}

.thankyou {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-size: var(--fs-15);
  line-height: var(--leading-ty);
  color: var(--color-ink);
}

/* ── photo pane ── */
.thankyou__photo {
  position: relative;
  height: var(--ty-photo-h);
  max-height: var(--ty-photo-max);
  overflow: hidden;
}

.thankyou__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 22% 22%; /* he stands left of centre in the photo */
}

/* Thin gold edge where the photo meets the copy — along the bottom when stacked. */
.thankyou__photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--ty-edge);
  background: var(--gradient-ty-edge-h);
}

/* ── copy column ── */
.thankyou__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-32) var(--space-20);
}

.thankyou__heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-ty-h1);
  line-height: var(--leading-ty-h1);
  letter-spacing: var(--tracking-pull);
}

.thankyou__heading b,
.thankyou__hl {
  color: var(--color-gold-300);
  font-weight: inherit;
}

/* The visitor's name keeps their own casing apart from a capitalised first letter. */
.thankyou__name {
  display: inline-block;
}

.thankyou__name::first-letter {
  text-transform: uppercase;
}

.thankyou__lede,
.thankyou__note {
  margin: var(--space-ty-lede) 0 0;
  max-width: 60ch;
  color: var(--color-ink-2);
  font-size: var(--fs-15);
}

.thankyou__lede b,
.thankyou__note b {
  color: var(--color-gold-200);
  font-weight: var(--weight-bold);
}

/* ── session cards ── */
.thankyou__details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-ty-info);
}

.thankyou__card {
  border-radius: var(--radius-sm);
  padding: var(--space-10);
  background: var(--color-glass);
  border: 1px solid var(--color-line);
}

.thankyou__label {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-ty-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tag);
  text-transform: uppercase;
  color: var(--color-gold-300);
}

.thankyou__label .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.thankyou__value {
  display: block;
  font-weight: var(--weight-bold);
  font-size: var(--fs-13-5);
  line-height: var(--leading-h4);
  color: var(--color-ink);
}

.thankyou__sub {
  display: block;
  color: var(--color-ink-3);
  font-size: var(--fs-12-5);
}

/* ── next steps ── */
.thankyou__actions-title {
  position: relative;
  margin: var(--space-ty-h2) 0 0;
  padding-bottom: var(--space-10);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-ty-h2);
  line-height: var(--leading-ty-h2);
}

.thankyou__actions-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--ty-rule-w);
  height: 2px;
  background: var(--foil-soft);
}

.thankyou__actions {
  display: grid;
  gap: var(--space-ty-gap);
  margin-top: var(--space-ty-steps);
}

.action {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  align-items: start;
  border-radius: var(--radius-sm);
  padding: var(--space-18);
  background: var(--color-glass);
  border: 1px solid var(--color-line);
  transition: border-color var(--duration-med) ease;
}

.action:hover {
  border-color: var(--color-line-3);
}

.action--priority {
  border-color: var(--color-line-3);
  background: var(--color-ty-priority);
}

.action__icon {
  width: var(--ty-icon-tile);
  height: var(--ty-icon-tile);
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--color-gold-tint-12);
  border: 1px solid var(--color-line-2);
  color: var(--color-gold-200);
}

.action__icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.action__eyebrow {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-ty-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  color: var(--color-gold-300);
}

.action__title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--fs-15-5);
  line-height: var(--leading-snug);
  color: var(--color-ink);
}

.action__note {
  margin: var(--space-6) 0 0;
  color: var(--color-gold-200);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-14);
}

.action__button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-9);
  width: 100%;
  margin-top: var(--space-ty-btn);
  padding: var(--space-10) var(--space-20);
  border-radius: var(--radius-full);
  background: var(--foil);
  color: var(--color-dark-ink);
  text-decoration: none;
  font-weight: var(--weight-extra);
  font-size: var(--fs-12-5);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  box-shadow: var(--shadow-ty-btn);
  transition: transform var(--duration-fast) var(--ease-smooth), box-shadow var(--duration-base) ease;
}

.action__button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-ty-btn-h);
}

.action__button:focus-visible {
  outline: 2px solid var(--color-gold-200);
  outline-offset: 4px;
}

.action__button .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

/* ── footer ── */
.thankyou__foot {
  margin-top: var(--space-ty-foot);
  padding-top: var(--space-ty-foot-pad);
  border-top: 1px solid var(--color-line);
}

.thankyou__foot p {
  margin: var(--space-2) 0;
  color: var(--color-ink-3);
  font-size: var(--fs-13-5);
}

.thankyou__foot .thankyou__closer {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-ty-see);
  color: var(--color-ink);
}

.thankyou__tel {
  color: var(--color-gold-300);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

.thankyou__tel:hover {
  color: var(--color-gold-200);
}

/* ── entrance: CSS only, the screen is above the fold so it plays on load ── */
.ty-rise {
  opacity: 0;
  transform: translateY(14px);
  animation: ty-rise var(--duration-reveal) var(--ease-smooth) forwards;
}

.ty-rise:nth-child(2) { animation-delay: 0.06s; }
.ty-rise:nth-child(3) { animation-delay: 0.12s; }
.ty-rise:nth-child(4) { animation-delay: 0.18s; }
.ty-rise:nth-child(5) { animation-delay: 0.24s; }
.ty-rise:nth-child(6) { animation-delay: 0.30s; }

@keyframes ty-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 561px) {
  .thankyou__details {
    gap: var(--space-12);
  }

  .thankyou__card {
    padding: var(--space-ty-card-y) var(--space-16);
  }

  .thankyou__value {
    font-size: var(--fs-15);
  }

  .thankyou__sub {
    font-size: var(--fs-13-5);
  }

  .action {
    grid-template-columns: var(--ty-icon-tile) minmax(0, 1fr);
    gap: var(--space-18);
    padding: var(--space-ty-step-y) var(--space-22);
  }

  .action__button {
    display: inline-flex;
    width: auto;
  }
}

/* Split screen: the photo fills the whole left side, the copy sits on the right. */
@media (min-width: 901px) {
  .thankyou {
    min-height: 100vh;
    grid-template-columns: minmax(0, var(--ty-photo-col)) minmax(0, 1fr);
    align-items: stretch;
  }

  .thankyou__photo {
    height: auto;
    max-height: none;
    min-height: 100vh;
  }

  .thankyou__photo::after {
    top: 0;
    left: auto;
    width: var(--ty-edge);
    height: auto;
    background: var(--gradient-ty-edge-v);
  }

  .thankyou__copy {
    max-width: var(--ty-copy-max);
    padding: var(--ty-pad-y) var(--ty-pad-x);
  }
}

/* Shorter laptop screens: buttons move beside the step text and spacing tightens, so the whole
   page still fits in one view. */
@media (min-width: 901px) and (max-height: 940px) {
  .action {
    align-items: center;
  }

  .action__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--space-18);
    align-items: center;
  }

  .action__body > * {
    grid-column: 1;
  }

  .action__body > .action__button {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
    white-space: nowrap;
  }

  .thankyou__actions-title {
    margin-top: var(--space-ty-h2-short);
  }

  .thankyou__foot {
    margin-top: var(--space-12);
    padding-top: var(--space-10);
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .thankyou__copy {
    padding-top: var(--ty-pad-y-short);
    padding-bottom: var(--ty-pad-y-short);
  }

  .thankyou__heading {
    font-size: var(--fs-ty-h1-short);
  }

  .thankyou__lede {
    font-size: var(--fs-14);
  }

  .action__title {
    font-size: var(--fs-14-5);
  }

  .thankyou__foot .thankyou__closer {
    font-size: var(--fs-ty-see-short);
  }

  .thankyou__card {
    padding: var(--space-6) var(--space-14);
  }

  .thankyou__actions {
    gap: var(--space-8);
  }
}

/* The admin bar eats 32px off the viewport for logged-in users only. */
@media (min-width: 901px) {
  .admin-bar .thankyou,
  .admin-bar .thankyou__photo {
    min-height: calc(100vh - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ty-rise {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
