/* The profile pairs the school's identity with a printed bookplate. */
.madina-profile {
  background: #f4e4df;
  border-block: 1px solid #dec3bf;
}
.profile-leaves {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  align-items: center;
  gap: clamp(40px, 8vw, 138px);
  padding-block: clamp(50px, 5.8vw, 94px);
}
.profile-narrative {max-width: 540px}
.profile-narrative .kicker, .visit-title .kicker {color: #71364b}
.profile-narrative h2, .visit-title h2 {
  margin: 17px 0 20px;
  color: #452b36;
  font: 450 clamp(47px, 5vw, 84px)/.99 var(--serif);
  letter-spacing: -.055em;
}
.profile-narrative h2 em, .visit-title h2 em {color: #853654}
.profile-summary {max-width: 43ch; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65}
.school-record {
  display: inline-flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #c598a5;
  color: #654653;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.school-record abbr {text-decoration: none; font-size: 10px; font-weight: 750; letter-spacing: .08em}
.motto-leaf {
  position: relative;
  isolation: isolate;
  min-height: clamp(270px, 23vw, 360px);
  margin: 0 4px 5px 0;
  padding: clamp(27px, 3.2vw, 52px) clamp(32px, 3.8vw, 64px);
  background: #69364a;
  border: 1px solid #603245;
  color: #fff6e4;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 2px 3px 0 #faf0d9, 3px 4px 0 #bd9a8f, 5px 6px 0 #ead9ba;
}
.motto-leaf::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 9px;
  width: 4px;
  border-inline: 1px solid #c4938b;
  opacity: .65;
}
.motto-leaf::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: repeating-radial-gradient(ellipse 80% 110% at 110% 117%,transparent 0 19px,#d99aab3b 20px 21px,transparent 22px 38px);
  mask-image: linear-gradient(100deg,transparent 22%,#000 100%);
}
.leaf-content {position: relative; z-index: 1}
.motto-leaf figcaption {font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #efced1}
.motto-leaf blockquote {
  margin: clamp(23px, 2vw, 36px) 0 0;
  font: 450 clamp(49px, 4.2vw, 72px)/.91 var(--serif);
  letter-spacing: -.055em;
}
.motto-leaf blockquote em {color: #f0c474}
.leaf-seal {
  position: absolute;
  inset: auto clamp(18px, 2.4vw, 40px) clamp(18px, 2.4vw, 40px) auto;
  display: grid;
  place-items: center;
  width: clamp(62px, 7vw, 100px);
  aspect-ratio: 1;
  border: 1px solid #f0dcab;
  outline: 1px dashed #d5bda5;
  outline-offset: 4px;
  border-radius: 50%;
  background: #fbf3e1;
}
.leaf-seal img {width: 71%; height: auto; mix-blend-mode: multiply}
.madina-visit {background: #fbf7ec; padding-block: clamp(40px, 5.5vw, 92px)}
.visit-invitation {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  padding-block: clamp(28px, 3.6vw, 56px);
  background: #f1d295;
  color: #463023;
}
.visit-title {align-self: center; padding: 0 clamp(24px, 4.4vw, 72px)}
.visit-title h2 {margin-bottom: 0; font-size: clamp(43px, 4.8vw, 78px)}
.visit-answer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: 3px clamp(25px, 4.2vw, 68px);
  border-left: 1px dashed #a27f50;
}
.visit-answer p {font-size: clamp(14px, 1.12vw, 18px); line-height: 1.65; max-width: 39ch}
/* One visit action throughout both editions of the school website. */
.book-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: fit-content;
  max-width: 100%;
  min-height: 46px;
  padding: .8rem 1.2rem;
  border: 1px solid var(--wine);
  border-radius: 8px;
  color: var(--paper);
  background: var(--wine);
  box-shadow: 0 2px 0 #482234;
  font: 700 .9rem/1.25 var(--sans);
  text-decoration: none;
  transition: background .16s, transform .16s;
}
.book-action .nav-icon {flex: none; width: 18px; height: 18px}
.book-action:hover {background: var(--berry)}
.book-action:active {transform: translateY(1px); box-shadow: none}
@media (prefers-reduced-motion: reduce) {
  .book-action {transition: none}
}

.madina-colophon {background: #4b2a39; color: #fff5e9}
.colophon-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .95fr) minmax(0, .7fr);
  gap: clamp(30px, 5vw, 80px);
  padding-block: clamp(37px, 4.45vw, 70px) clamp(26px, 3.7vw, 60px);
}
.colophon-name h2 {margin: 0 0 16px; font: 450 clamp(32px, 3.45vw, 58px)/1.01 var(--serif); letter-spacing: -.045em}
.colophon-name h2 em {color: #f5c9c5}
.colophon-main h3 {margin: 1px 0 8px; color: #f6dba8; font: 750 10px/1.45 var(--sans); text-transform: uppercase; letter-spacing: .13em}
.colophon-main p, .colophon-main address {color: #f4dfdc; font: 400 13px/1.65 var(--sans)}
.colophon-main address {max-width: 37ch}
.colophon-main a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  font-weight: 650;
  color: #fff6e9;
  text-decoration: underline;
  text-decoration-color: #ae788a;
  text-underline-offset: 5px;
}
.colophon-main a:hover {color: #f8ddad; text-decoration-color: currentColor}
.colophon-main a:focus-visible {outline-color: #f5ce89; outline-offset: 2px}
.colophon-main a span {text-decoration: none}
.colophon-links {display: flex; flex-direction: column; align-items: flex-start}
.colophon-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  color: #e6c9d0;
  border-top: 1px solid #795365;
  padding-block: 17px 21px;
  font-size: 11px;
}
.colophon-end img {display: block; width: 78px; height: auto}

@media (max-width: 780px) {
  .profile-leaves {gap: 30px}
  .motto-leaf {min-height: 262px; padding: 26px 31px}
  .motto-leaf blockquote {font-size: clamp(40px, 6.3vw, 54px)}
  .leaf-seal {width: 54px; right: 15px; bottom: 16px}
  .colophon-main {grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 25px}
  .colophon-name {grid-column: 1/-1}
}
@media (max-width: 620px) {
  .profile-leaves {grid-template-columns: 1fr; gap: 24px; padding-block: 38px}
  .profile-narrative h2 {margin: 12px 0 14px; font-size: 47px}
  .school-record {margin-top: 13px; padding-top: 8px}
  .motto-leaf {min-height: 0; padding: 23px 30px 25px; margin-right: 5px}
  .motto-leaf blockquote {font-size: 46px; margin-top: 18px}
  .leaf-seal {width: clamp(57px, 16vw, 83px); right: 23px; bottom: 22px}
  .visit-invitation {grid-template-columns: 1fr; padding: 24px 22px; gap: 20px}
  .visit-title {padding: 0}
  .visit-title h2 {margin-top: 10px; font-size: 46px}
  .visit-answer {border: 0; border-top: 1px dashed #ae894d; gap: 15px; padding: 16px 0 0}
  .visit-answer p {max-width: 42ch}
}
@media (max-width: 420px) {
  .colophon-main {grid-template-columns: 1fr; gap: 23px}
  .colophon-name {grid-column: auto}
  .colophon-name h2 {margin-bottom: 9px}
  .colophon-links a {min-height: 43px}
  .colophon-end {justify-content: flex-start}
}
