/* ==========================================================================
   COMPONENTS — buttons, ornaments, cards, timeline, figures, lists, bands
   ========================================================================== */

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: 1rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color var(--d-base) var(--e-out),
    border-color var(--d-base) var(--e-out),
    color var(--d-base) var(--e-out),
    transform var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn__arrow {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform var(--d-base) var(--e-out);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Primary — oxblood */
.btn--primary {
  background: var(--c-oxblood);
  color: #fff;
  box-shadow: 0 2px 10px rgba(110, 20, 35, 0.2);
}

.btn--primary:hover {
  background: var(--c-oxblood-deep);
  color: #fff;
  box-shadow: 0 6px 20px rgba(110, 20, 35, 0.28);
}

/* Secondary — outlined */
.btn--ghost {
  border-color: var(--c-rule);
  color: var(--c-ink);
}

.btn--ghost:hover {
  border-color: var(--c-gold);
  background: var(--c-gold-wash);
  color: var(--c-ink);
}

/* Gold — used sparingly, on dark grounds */
.btn--gold {
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold));
  color: var(--c-night);
  box-shadow: var(--shadow-gold);
}

.btn--gold:hover {
  color: var(--c-night);
  box-shadow: 0 14px 48px rgba(176, 141, 63, 0.34);
}

/* On a dark ground */
.btn--on-dark {
  border-color: rgba(236, 227, 210, 0.28);
  color: var(--c-parchment);
}

.btn--on-dark:hover {
  border-color: var(--c-gold);
  color: var(--c-gold-bright);
  background: rgba(176, 141, 63, 0.08);
}

/* A quiet text link with a travelling rule beneath it. */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-caption);
  font-weight: 600;
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--c-oxblood);
}

.link-more::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: width var(--d-base) var(--e-out);
}

.link-more:hover::after {
  width: 34px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-7);
}

/* ==========================================================================
   ORNAMENTS
   ========================================================================== */

/* A centred gold rule with a small cross at its middle. */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  margin-block: var(--s-7);
  color: var(--c-gold);
}

.ornament::before,
.ornament::after {
  content: "";
  width: clamp(48px, 12vw, 120px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-pale), transparent);
}

.ornament svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* A gold hairline used to open a block of text. */
.rule-gold {
  width: 56px;
  height: 2px;
  background: var(--c-gold);
  margin-bottom: var(--s-5);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
  background: var(--c-paper);
  border: 1px solid var(--c-rule-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out),
    border-color var(--d-base) var(--e-out);
}

/* The gilded top edge that appears on hover. */
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-bright));
  border-radius: var(--r-md) var(--r-md) 0 0;
  opacity: 0;
  transition: opacity var(--d-base) var(--e-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-gold-pale);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 34px;
  height: 34px;
  margin-bottom: var(--s-5);
  color: var(--c-gold);
}

.card__meta {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--s-3);
}

.card__body {
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink-soft);
}

.card__footer {
  margin-top: auto;
  padding-top: var(--s-5);
}

/* A numbered card, for ordered sequences. */
.card--numbered .card__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--c-gold-pale);
  margin-bottom: var(--s-4);
}

/* ==========================================================================
   STAT STRIP
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--c-rule-soft);
  border-bottom: 1px solid var(--c-rule-soft);
}

.stat {
  padding: var(--s-6) var(--s-5);
  border-right: 1px solid var(--c-rule-soft);
  text-align: center;
}

.stat:last-child {
  border-right: 0;
}

.stat__figure {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.6rem + 2.4vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--c-oxblood);
}

.stat__label {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-ink-mute);
}

@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--c-rule-soft);
  }
}

/* ==========================================================================
   TIMELINE — used for formation and studies
   ========================================================================== */

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 clamp(2rem, 1rem + 3vw, 3.5rem);
}

/* The vertical gold thread. */
.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--c-gold-pale) 8%,
    var(--c-gold-pale) 92%,
    transparent
  );
}

.timeline__item {
  position: relative;
  padding-bottom: var(--s-8);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* The node — a small gilded lozenge. */
.timeline__item::before {
  content: "";
  position: absolute;
  top: 9px;
  left: calc(-1 * clamp(2rem, 1rem + 3vw, 3.5rem) + 2px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c-ivory);
  border: 2px solid var(--c-gold);
  box-shadow: 0 0 0 4px var(--c-ivory);
}

.section--parchment .timeline__item::before {
  background: var(--c-parchment);
  box-shadow: 0 0 0 4px var(--c-parchment);
}

.timeline__years {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--s-3);
}

.timeline__place {
  font-size: var(--t-small);
  color: var(--c-ink-mute);
  margin-bottom: var(--s-4);
}

.timeline__body {
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink-soft);
  max-width: 62ch;
}

/* A quoted dissertation or thesis title. */
.thesis {
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--c-gold-wash);
  border-left: 2px solid var(--c-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.thesis__label {
  display: block;
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-ink-mute);
  margin-bottom: var(--s-3);
}

.thesis__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--c-ink);
}

/* ==========================================================================
   FIGURES
   ========================================================================== */

.figure {
  position: relative;
  margin: 0;
}

.figure img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}

.figure__caption {
  margin-top: var(--s-4);
  font-size: var(--t-caption);
  line-height: 1.6;
  color: var(--c-ink-mute);
  padding-left: var(--s-4);
  border-left: 1px solid var(--c-gold-pale);
}

/* A portrait in a gilded frame, offset by a gold rule behind it. */
.portrait {
  position: relative;
  isolation: isolate;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--c-gold-pale);
  border-radius: var(--r-md);
  z-index: -1;
}

.portrait img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 860px) {
  .portrait::before {
    inset: 12px -12px -12px 12px;
  }
}

/* A sacred image given a soft radiant halo. */
.sacred-image {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sacred-image img {
  width: 100%;
  height: auto;
  transition: transform var(--d-vast) var(--e-sacred);
}

.sacred-image:hover img {
  transform: scale(1.03);
}

.sacred-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    75% 60% at 50% 42%,
    rgba(255, 238, 198, 0.22),
    transparent 70%
  );
  pointer-events: none;
}

/* ==========================================================================
   QUOTE / SCRIPTURE BAND
   ========================================================================== */

.verse-band {
  position: relative;
  padding-block: clamp(4rem, 2rem + 6vw, 7.5rem);
  background: var(--c-night);
  color: var(--c-parchment);
  overflow: hidden;
  text-align: center;
}

.verse-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    60% 90% at 50% 0%,
    rgba(176, 141, 63, 0.22),
    transparent 70%
  );
}

.verse-band__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin-inline: auto;
}

.verse-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.1rem + 2.1vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.32;
  color: var(--c-paper);
  text-wrap: balance;
}

.verse-band cite {
  display: block;
  margin-top: var(--s-6);
  font-family: var(--font-text);
  font-size: var(--t-eyebrow);
  font-style: normal;
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-gold);
}

/* A pull-quote within prose. */
.pullquote {
  margin: var(--s-7) 0;
  padding-left: var(--s-6);
  border-left: 2px solid var(--c-gold);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--c-ink);
}

/* ==========================================================================
   DEFINITION LIST — used for facts at a glance
   ========================================================================== */

.facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.facts__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--s-5);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--c-rule-soft);
}

.facts__row:first-child {
  border-top: 1px solid var(--c-rule-soft);
}

.facts dt {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-ink-mute);
  padding-top: 4px;
}

.facts dd {
  margin: 0;
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink);
}

@media (max-width: 620px) {
  .facts__row {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
}

/* ==========================================================================
   SUBJECT CHIPS — the courses he has taught
   ========================================================================== */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  padding: 0.65rem 1.1rem;
  background: var(--c-paper);
  border: 1px solid var(--c-gold-pale);
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  color: var(--c-ink-soft);
  transition:
    background-color var(--d-base) var(--e-out),
    color var(--d-base) var(--e-out),
    border-color var(--d-base) var(--e-out);
}

.chip:hover {
  background: var(--c-gold-wash);
  border-color: var(--c-gold);
  color: var(--c-ink);
}

/* ==========================================================================
   PUBLICATIONS
   ========================================================================== */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--c-rule-soft);
}

.pub {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-6);
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--c-rule-soft);
  transition: background-color var(--d-base) var(--e-out);
}

.pub:hover {
  background: rgba(176, 141, 63, 0.045);
}

.pub__year {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  color: var(--c-gold);
  padding-top: 4px;
}

.pub__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--s-3);
}

.pub__cite {
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink-mute);
  font-style: italic;
}

.pub__note {
  margin-top: var(--s-4);
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink-soft);
  max-width: 64ch;
}

@media (max-width: 620px) {
  .pub {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */

.social {
  display: flex;
  gap: var(--s-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.social__link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(236, 227, 210, 0.2);
  border-radius: 50%;
  color: rgba(236, 227, 210, 0.7);
  transition:
    border-color var(--d-base) var(--e-out),
    color var(--d-base) var(--e-out),
    background-color var(--d-base) var(--e-out),
    transform var(--d-base) var(--e-out);
}

.social__link:hover {
  border-color: var(--c-gold);
  color: var(--c-gold-bright);
  background: rgba(176, 141, 63, 0.1);
  transform: translateY(-2px);
}

.social__link svg {
  width: 17px;
  height: 17px;
}

/* A placeholder handle that is not yet live. */
.social__link[data-placeholder="true"] {
  opacity: 0.55;
  cursor: default;
}

.social__link[data-placeholder="true"]:hover {
  transform: none;
}

/* Light-ground variant for the contact page. */
.social--light .social__link {
  border-color: var(--c-rule);
  color: var(--c-ink-soft);
}

.social--light .social__link:hover {
  border-color: var(--c-gold);
  color: var(--c-oxblood);
  background: var(--c-gold-wash);
}

/* ==========================================================================
   CALL TO ACTION BAND
   ========================================================================== */

.cta-band {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem);
  background:
    linear-gradient(180deg, var(--c-ivory), var(--c-gold-wash));
  border-top: 1px solid var(--c-gold-pale);
  text-align: center;
}

.cta-band h2 {
  max-width: 20ch;
  margin-inline: auto;
}

.cta-band p {
  max-width: 56ch;
  margin: var(--s-5) auto 0;
  color: var(--c-ink-soft);
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
}

.cta-band .btn-row {
  justify-content: center;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact-item {
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--c-rule-soft);
}

.contact-item:first-child {
  border-top: 1px solid var(--c-rule-soft);
}

.contact-item__label {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}

.contact-item__value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--c-ink);
}

.contact-item__value a {
  color: var(--c-ink);
  background-image: linear-gradient(var(--c-gold-pale), var(--c-gold-pale));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size var(--d-base) var(--e-out), color var(--d-fast) var(--e-out);
}

.contact-item__value a:hover {
  color: var(--c-oxblood);
  background-size: 100% 2px;
}

/* ==========================================================================
   NOTICE — a quiet framed aside
   ========================================================================== */

.notice {
  padding: var(--s-6);
  background: var(--c-oxblood-wash);
  border-left: 2px solid var(--c-oxblood);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--t-small);
  line-height: var(--lh-body);
  color: var(--c-ink-soft);
}

.notice strong {
  color: var(--c-ink);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.field__label {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-ink-mute);
}

.field__input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--c-ivory);
  border: 1px solid var(--c-rule);
  border-radius: var(--r-sm);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--c-ink);
  transition:
    border-color var(--d-base) var(--e-out),
    background-color var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out);
}

.field__input:hover {
  border-color: var(--c-gold-pale);
}

.field__input:focus {
  outline: none;
  background: var(--c-paper);
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 63, 0.16);
}

textarea.field__input {
  resize: vertical;
  min-height: 140px;
}

select.field__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238a7868' stroke-width='1.4'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 11px;
  padding-right: 2.5rem;
}

/* The field is flagged when it fails validation on submit. */
.field__input[aria-invalid="true"] {
  border-color: var(--c-oxblood);
  background: var(--c-oxblood-wash);
}

.field__error {
  font-size: var(--t-caption);
  color: var(--c-oxblood);
}

.form__note {
  margin-top: var(--s-2);
  font-size: var(--t-caption);
  line-height: 1.6;
  color: var(--c-ink-mute);
}

.form__note[data-state="error"] {
  color: var(--c-oxblood);
  font-weight: 500;
}

.form__note[data-state="success"] {
  color: #2f6b3a;
  font-weight: 500;
}

/* ==========================================================================
   GALLERY
   --------------------------------------------------------------------------
   A masonry-feeling grid built with plain CSS grid and explicit row spans,
   so it degrades predictably and needs no JavaScript. Each plate carries its
   caption in a gradient that only appears on hover or focus, so the
   photographs are never covered while being looked at.
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-4);
}

.plate {
  position: relative;
  grid-column: span 4;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-vellum);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out);
}

.plate:hover,
.plate:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, center);
  transition: transform var(--d-vast) var(--e-sacred);
}

.plate:hover img,
.plate:focus-within img {
  transform: scale(1.04);
}

/* The gilded hairline that appears on hover, matching the cards. */
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: border-color var(--d-base) var(--e-out);
  pointer-events: none;
}

.plate:hover::after,
.plate:focus-within::after {
  border-color: var(--c-gold);
}

.plate__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--s-6) var(--s-5) var(--s-4);
  background: linear-gradient(180deg, transparent, rgba(26, 16, 9, 0.88));
  color: var(--c-paper);
  font-size: var(--t-caption);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--d-base) var(--e-out),
    transform var(--d-base) var(--e-out);
}

.plate:hover .plate__caption,
.plate:focus-within .plate__caption {
  opacity: 1;
  transform: none;
}

.plate__caption b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-gold-bright);
  margin-bottom: 3px;
}

/* ---- Plate shapes --------------------------------------------------------
   A grid item whose height comes from aspect-ratio does not stretch to its
   row, so the aspect ratios are chosen to make each permitted pairing come
   out the same height. A span-8 plate is almost exactly twice the width of a
   span-4 one, so a 16:9 beside an 8:9 land level. Rows are therefore built
   as [half + half], [wide + tall], or three standards.
   -------------------------------------------------------------------------- */

.plate--wide {
  grid-column: span 8;
  aspect-ratio: 16 / 9;
}

/* Pairs with .plate--wide. */
.plate--tall {
  grid-column: span 4;
  aspect-ratio: 8 / 9;
}

/* Pairs with another .plate--half. */
.plate--half {
  grid-column: span 6;
  aspect-ratio: 3 / 2;
}

/* Used three to a row. */
.plate--standard {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

.plate--square {
  grid-column: span 4;
  aspect-ratio: 1;
}

/* ---- A touch device cannot hover, so the captions simply stay ----------- */

@media (hover: none) {
  .plate__caption {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  /* Full width, so a wide plate keeps its cinematic proportion. */
  .plate--wide,
  .plate--half {
    grid-column: span 6;
    aspect-ratio: 16 / 9;
  }

  /* Half width, two to a row, all on the same ratio so they land level. */
  .plate--tall,
  .plate--square,
  .plate--standard {
    grid-column: span 3;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .plate,
  .plate--wide,
  .plate--half,
  .plate--tall,
  .plate--square,
  .plate--standard {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   GALLERY STRIP — the four-image preview on the home page
   ========================================================================== */

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

.strip .plate {
  grid-column: auto;
  aspect-ratio: 3 / 4;
}

@media (max-width: 860px) {
  .strip {
    grid-template-columns: repeat(2, 1fr);
  }
}
