/* ---------------------------------------------------------------------------
   SHD — shd.princeton.edu
   Palette and structure are taken from Sherrerd Hall itself: a black granite
   base, a tinted glass curtain wall on a mullion grid, one projecting panel of
   white fritted glass, and cherry wood at the door.
   --------------------------------------------------------------------------- */

:root {
  --granite:    #12171a;
  --granite-2:  #1b2429;
  --slate:      #37474d;
  --glass:      #5f8087;
  --glass-pale: #a9c0c3;
  --frost:      #e9edec;
  --paper:      #f7f8f7;
  --paper-2:    #eceeed;
  --wood:       #a94f1c;
  --wood-lit:   #d4772f;
  --rule:       rgba(18, 23, 26, .14);

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Iowan Old Style, Palatino, "Palatino Linotype", Georgia, serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--granite);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--granite); text-underline-offset: .18em; text-decoration-thickness: from-font; }
a:hover { color: var(--wood); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--wood-lit);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--granite); color: var(--frost);
  padding: .75rem 1.25rem; font-size: .875rem;
}
.skip:focus { left: 0; }

/* ---- Typographic primitives ---------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 1.75rem; height: 1px; margin-right: .75rem;
  vertical-align: .3em; background: var(--glass);
}

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin: 0; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.125rem); }
h3 { font-size: 1.0625rem; letter-spacing: -.005em; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2.1vw, 1.375rem);
  line-height: 1.5;
  color: var(--granite-2);
}

.prose p { max-width: var(--measure); }
.section-lede { max-width: var(--measure); margin: 1rem 0 0; }
.prose p + p { margin-top: 1.1em; }

/* ---- Masthead ------------------------------------------------------------- */

.masthead {
  background: var(--granite);
  color: var(--frost);
  border-bottom: 1px solid rgba(233, 237, 236, .12);
}
.masthead .shell {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 5.5rem;
  flex-wrap: wrap;
}

/* The University signature. Shield and dividing rule are the standard marks;
   the unit name is set in the site's own type. */
.lockup {
  display: inline-flex; align-items: center; gap: 1rem;
  text-decoration: none; color: inherit;
}
.lockup__shield { width: auto; height: 2.625rem; flex: none; }
.lockup__rule {
  flex: none; width: 1px; align-self: stretch;
  min-height: 2.625rem;
  background: rgba(233, 237, 236, .32);
}
.lockup__type { display: flex; flex-direction: column; gap: .3rem; }
.lockup__code {
  font-family: var(--mono); font-weight: 600;
  font-size: 1.4375rem; letter-spacing: .1em; line-height: 1;
  color: var(--frost);
}
.lockup__place {
  font-size: .6875rem; letter-spacing: .17em; line-height: 1;
  text-transform: uppercase;
  color: rgba(233, 237, 236, .64);
  transition: color .15s ease;
}
.lockup:hover .lockup__place { color: var(--wood-lit); }

.masthead nav { margin-left: auto; display: flex; gap: 1.5rem; }
.masthead nav a {
  font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233, 237, 236, .72); text-decoration: none;
}
.masthead nav a:hover { color: var(--wood-lit); }
@media (max-width: 32rem) {
  .masthead nav { display: none; }
  .masthead .shell { min-height: 4.75rem; }
  .lockup__shield { height: 2.25rem; }
  .lockup__rule { min-height: 2.25rem; }
  .lockup__code { font-size: 1.25rem; }
}

/* ---- Hero: a fritted panel projecting from the curtain wall --------------- */

.hero { position: relative; background: var(--granite); overflow: hidden; }
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  opacity: .74;
}
.hero__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(18,23,26,.80) 0%, rgba(18,23,26,.38) 48%, rgba(18,23,26,.08) 100%),
    linear-gradient(to top, rgba(18,23,26,.62), transparent 58%);
}
/* the mullion grid, drawn over the glass */
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(233,237,236,.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233,237,236,.10) 1px, transparent 1px);
  background-size: 7.5rem 7.5rem;
}
.hero .shell { position: relative; padding-block: clamp(4.5rem, 13vw, 9rem); }

.panel {
  max-width: 32rem;
  background: rgba(233, 237, 236, .93);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  padding: clamp(1.75rem, 4vw, 3rem);
  border-top: 3px solid var(--wood);
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.35);
}
.panel .eyebrow { color: var(--slate); }

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  letter-spacing: -.035em;
  margin: 0;
}
.hero h1 .code {
  font-family: var(--mono);
  letter-spacing: .02em;
  font-weight: 600;
}
.hero h1 .of {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1rem, 2.4vw, 1.3125rem);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--slate);
  margin-top: .5rem;
}
.hero p {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  color: var(--granite-2);
}

/* ---- Sections ------------------------------------------------------------- */

section { padding-block: clamp(3.5rem, 8vw, 6rem); }
section + section { border-top: 1px solid var(--rule); }

.split {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
  .split { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); }
  .split > .eyebrow { margin-top: .45rem; }
}

/* ---- Destination cards ---------------------------------------------------- */

.doors {
  display: grid; gap: 1px;
  grid-template-columns: minmax(0, 1fr);
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 2.5rem;
}
@media (min-width: 44rem) { .doors { grid-template-columns: 1fr 1fr; } }

.door {
  display: block; text-decoration: none;
  background: #fff;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  position: relative;
  transition: background-color .18s ease;
}
.door::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--wood);
  transform: scaleY(0); transform-origin: top;
  transition: transform .22s ease;
}
.door:hover { background: var(--paper-2); }
.door:hover::after { transform: scaleY(1); }
.door__kicker {
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--glass); margin: 0 0 .875rem;
}
.door h3 { margin: 0 0 .5rem; }
.door p { margin: 0; font-size: .9375rem; color: var(--slate); max-width: 24rem; }
.door__url {
  display: inline-block; margin-top: 1rem;
  font-family: var(--mono); font-size: .75rem; color: var(--slate);
  word-break: break-word;
}
.door:hover .door__url { color: var(--wood); }

/* ---- Highlights ----------------------------------------------------------- */

.highlights {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.highlights li { border-bottom: 1px solid var(--rule); }
.highlights a {
  display: grid; gap: .25rem 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  padding: 1rem 0;
  text-decoration: none;
  transition: color .15s ease;
}
@media (min-width: 40rem) {
  .highlights a { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; }
}
.highlights code {
  font-family: var(--mono); font-size: .875rem; color: var(--granite);
}
.highlights span { font-size: .9375rem; color: var(--slate); max-width: 38rem; }
.highlights a:hover code, .highlights a:hover span { color: var(--wood); }

.more { margin: 1.75rem 0 0; font-size: .9375rem; }
.more a { text-underline-offset: .25em; }
.more a::after { content: " \2192"; }

/* ---- Building facts ------------------------------------------------------- */

.building { background: var(--granite); color: var(--frost); }
.building a { color: var(--frost); }
.building a:hover { color: var(--wood-lit); }
.building .eyebrow { color: var(--glass-pale); }
.building .eyebrow::before { background: var(--glass); }
.building h2 { color: var(--frost); }
.building .prose p { color: rgba(233,237,236,.78); }
.building .lede { color: var(--frost); }

.facts {
  display: grid; gap: 1px; margin-top: 2.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: rgba(233,237,236,.14);
  border: 1px solid rgba(233,237,236,.14);
}
@media (min-width: 52rem) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts div { background: var(--granite); padding: 1.25rem; }
.facts dt {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--glass-pale); margin: 0 0 .5rem;
}
.facts dd { margin: 0; font-size: .9375rem; line-height: 1.4; color: var(--frost); }

/* ---- Mosaic --------------------------------------------------------------- */

.mosaic {
  display: grid; gap: 1px; margin-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  background: rgba(233,237,236,.14);
}
@media (min-width: 40rem) { .mosaic { grid-template-columns: 1fr 1fr; } }
.mosaic figure { margin: 0; position: relative; background: var(--granite-2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

/* At full width the mosaic resolves into the facade's own proportions: one
   large panel, one tall panel beside it, a band of three beneath. */
@media (min-width: 62rem) {
  .mosaic { grid-template-columns: repeat(3, 1fr); }
  .mosaic figure:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  .mosaic figure:nth-child(2) { grid-column: 3; grid-row: 1 / 3; }
  .mosaic figure:nth-child(2) img { aspect-ratio: 3 / 4; }
  .mosaic figure:nth-child(n+3) { grid-row: 3; }
}
.mosaic figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 2.25rem .875rem .75rem;
  font-size: .8125rem; line-height: 1.4; color: var(--frost);
  text-shadow: 0 1px 3px rgba(18, 23, 26, .55);
  background: linear-gradient(to top,
    rgba(18,23,26,.94) 0%, rgba(18,23,26,.78) 42%, rgba(18,23,26,.32) 74%, transparent 100%);
}
.mosaic figcaption b { font-weight: 600; }
.mosaic figcaption span { color: rgba(233,237,236,.82); }

/* ---- Footer --------------------------------------------------------------- */

.foot { background: var(--granite-2); color: rgba(233,237,236,.72); font-size: .875rem; }
.foot .shell { padding-block: 3rem; }
.foot a { color: var(--frost); }
.foot a:hover { color: var(--wood-lit); }
.foot__cols {
  display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr);
  padding-bottom: 2rem; border-bottom: 1px solid rgba(233,237,236,.14);
}
@media (min-width: 44rem) { .foot__cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h3 {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--glass-pale);
  margin: 0 0 .75rem; font-weight: 500;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li + li { margin-top: .4rem; }
.foot address { font-style: normal; line-height: 1.55; }
.foot__base {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  padding-top: 1.5rem; font-size: .8125rem; color: rgba(233,237,236,.55);
}
.foot__base p { margin: 0; }

/* ---- University subfooter -------------------------------------------------
   Policy links Princeton requires on its sites, plus the reversed shield
   lockup. Kept visually quieter than the site's own footer columns. */

.subfoot {
  display: grid; gap: 1.25rem 2rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(233, 237, 236, .14);
}
@media (min-width: 52rem) {
  .subfoot { grid-template-columns: minmax(0, 1fr) auto; }
  .subfoot__shield { grid-row: 1 / 3; grid-column: 2; }
}

.subfoot__links {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .375rem 1.25rem;
  font-size: .8125rem;
}
.subfoot__links li + li { margin-top: 0; }
.subfoot__links a { color: rgba(233, 237, 236, .82); }
.subfoot__links a:hover { color: var(--wood-lit); }

.subfoot__copy { margin: 0; font-size: .8125rem; color: rgba(233, 237, 236, .55); }

.subfoot__shield { display: block; justify-self: start; }
@media (min-width: 52rem) { .subfoot__shield { justify-self: end; } }
.subfoot__shield img { width: 11rem; height: auto; }
.subfoot__shield:hover img { opacity: .85; }

/* ---- Holding page ---------------------------------------------------------
   The placeholder served at / until the full page is swapped in. Reuses the
   palette, the signature and the University subfooter; nothing else. */

body.holding {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--granite);
  color: var(--frost);
}

.holding__stage {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 18vh, 10rem);
}

/* The signature at display size, with the message hung beneath the wordmark. */
.lockup--display {
  font-weight: inherit;
  letter-spacing: normal;
}
.lockup--display .lockup__shield { height: clamp(3.25rem, 9vw, 4.75rem); }
.lockup--display .lockup__rule { min-height: clamp(3.25rem, 9vw, 4.75rem); }
.lockup--display .lockup__code {
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: .08em;
}

.holding__note {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  font-family: var(--mono);
  font-size: clamp(.8125rem, 1.6vw, .9375rem);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(233, 237, 236, .58);
}
.holding__note::before {
  content: "";
  display: block;
  width: 3.5rem; height: 2px;
  margin-bottom: 1.5rem;
  background: var(--wood-lit);
}

/* The subfooter is the whole footer here, so it carries no top rule. */
body.holding .foot { flex: none; background: var(--granite); }
body.holding .subfoot { margin-top: 0; }
