/* The final chapter resolves the practice map in the site's light editorial palette. */
.contact {
  padding: 0;
  align-items: stretch;
  background: #f4f3ee;
  color: var(--ink);
}

.closing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "intro practice" "footer practice";
  column-gap: clamp(36px, 5.5vw, 110px);
  row-gap: 24px;
  align-content: center;
  align-items: center;
  width: min(100%, 1660px);
  min-height: calc(100dvh - 158px);
  margin: auto;
  padding: clamp(42px, 5vh, 74px) 8% clamp(58px, 7vh, 94px);
  background: repeating-linear-gradient(90deg, transparent 0 119px, #18212706 120px);
}

.closing-intro { grid-area: intro; align-self: end; min-width: 0; }
.closing-intro .eyebrow { color: var(--accent); }
.closing-intro .display-title {
  margin: 22px 0 26px;
  color: var(--ink);
  font: 500 clamp(43px, 4.2vw, 82px)/1.04 'Manrope', sans-serif;
  letter-spacing: -.052em;
  white-space: pre-line;
}
.closing-intro .display-title span { display: block; }
.closing-intro .display-title span + span { color: var(--accent); }
.closing-lead {
  max-width: 540px;
  margin: 0;
  color: #3d494a;
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.7;
}

.closing-practice {
  grid-area: practice;
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 10 / 9;
  justify-self: end;
  overflow: hidden;
  border: 1px solid #bfc5bf;
  background: #f4f3ee url('./assets/security-practice.svg') center / contain no-repeat;
  box-shadow: 0 24px 56px #1821271c;
}
.closing-practice hyperframes-player {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.closing-footer { grid-area: footer; align-self: start; min-width: 0; }
.closing-role {
  max-width: 540px;
  margin: 0 0 26px;
  padding-left: 15px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.closing-actions { display: flex; align-items: stretch; gap: 18px; max-width: 640px; }
.contact #contact-action { flex: 1; min-width: 0; max-width: none; margin: 0; }
.contact #contact-action .contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f5f3ec;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.contact #contact-action .contact-link:hover {
  border-color: #394c50;
  background: #394c50;
  color: #f5f3ec;
  transform: translateY(-2px);
}
.contact #contact-action .contact-link span,
.contact #contact-action .contact-link strong { color: #f5f3ec; }
.contact #contact-action .contact-link small { color: #eab3a7; }
.contact #contact-action .contact-link strong { font-size: clamp(15px, 1.25vw, 20px); }
.contact #contact-action .contact-link .ui-chevron { flex: 0 0 20px; }
.closing-resume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 125px;
  padding: 0 17px;
  border: 1px solid #7c8987;
  color: var(--ink);
  font-size: 12px;
  transition: background .25s ease, border-color .25s ease;
}
.closing-resume:hover { border-color: var(--accent); background: #b33b2b0c; }
.closing-resume .ui-chevron { width: 15px; height: 15px; }
.contact .social-links { margin-top: 22px; }
.contact .social-links a { color: var(--muted); }

body[data-chapter="contact"] { background: #f4f3ee; }
body[data-chapter="contact"] #motion-surface { opacity: 0; visibility: hidden; }
body[data-chapter="contact"] .masthead,
body[data-chapter="contact"] .navigation-bar { background: #f4f3ee; border-color: var(--line); }
body[data-chapter="contact"] .journey-caption { display: none; }

@media (max-width: 1100px) and (min-width: 761px) {
  .closing-layout { gap: 18px 32px; padding-left: 6%; padding-right: 6%; }
  .closing-intro .display-title { font-size: clamp(42px, 4.1vw, 56px); }
  .closing-lead { font-size: 14px; }
  .closing-actions { flex-direction: column; gap: 10px; }
  .closing-resume { justify-content: space-between; min-height: 48px; padding: 0 16px; }
}

@media (max-width: 760px) {
  .contact, .chapter.contact:last-child { padding: 0; }
  .closing-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: calc(100dvh - 134px);
    padding: 42px 7% 76px;
    background-size: 80px 100%;
  }
  .closing-intro .display-title { font-size: clamp(38px, 9.3vw, 58px); margin: 17px 0 20px; }
  .closing-lead { font-size: 15px; line-height: 1.7; }
  .closing-practice { max-width: 520px; margin: 30px auto 32px; box-shadow: 0 18px 38px #18212718; }
  .closing-footer { align-self: stretch; }
  .closing-role { margin-bottom: 20px; font-size: 11px; }
  .closing-actions { flex-direction: column; gap: 12px; }
  .contact #contact-action .contact-link { min-height: 84px; }
  .contact #contact-action .contact-link strong { font-size: 16px; }
  .closing-resume { justify-content: space-between; min-height: 54px; padding: 0 18px; }
}

@media (max-height: 740px) and (min-width: 761px) {
  .closing-layout { padding-top: 32px; padding-bottom: 58px; }
  .closing-intro .display-title { margin: 14px 0 16px; }
  .closing-role { margin-bottom: 17px; }
  .contact #contact-action .contact-link { min-height: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact #contact-action .contact-link,
  .closing-resume { transition: none; }
}
