/* Armend & Blerina — photoreal lace envelope → printed cotton letter */

:root {
  --ivory: #f5f0e7;
  --paper: #f3ebe0;
  --ink: #1a1612;
  --ink-soft: rgba(26, 22, 18, 0.78);
  --muted: #5c564f;
  --rule: #c9c0b4;
  --wax: #141210;
  --font-display: "Cormorant Garamond", "Cormorant Infant", "Times New Roman", Georgia, serif;
  --font-script: "Cormorant Infant", "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --open-dur: 2.35s;
  --seal-left: 40.625%;
  --seal-top: 50.781%;
  --seal-w: 19.792%;
  --seal-h: 14.844%;
  --card-tilt: 0.5deg;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
  overflow-x: hidden; /* fallback */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden; /* fallback */
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--wax);
  color: var(--ivory);
  padding: 0.5rem 1rem;
  z-index: 100;
  font-family: var(--font-display);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

/* ——— Envelope opening ——— */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--ivory);
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
  transition: opacity 0.5s var(--ease), visibility 0.5s;
  overscroll-behavior: contain;
}

.envelope-screen.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-stage {
  position: relative;
  display: block;
  width: min(92vw, 360px);
  max-width: 100%;
  line-height: 0;
  transform-origin: 50% 55%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.envelope-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  /* Photo already includes soft shadow + matching ivory — no extra box */
}

.seal-layer {
  position: absolute;
  left: var(--seal-left);
  top: var(--seal-top);
  width: var(--seal-w);
  height: var(--seal-h);
  pointer-events: none;
}

.seal-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform-origin: center center;
  will-change: transform, opacity;
}

.seal-btn {
  position: absolute;
  left: var(--seal-left);
  top: var(--seal-top);
  width: var(--seal-w);
  height: var(--seal-h);
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}
.seal-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.seal-shimmer {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), transparent 55%);
  opacity: 0.55;
}
@media (prefers-reduced-motion: no-preference) {
  .seal-btn {
    animation: seal-pulse 2.8s ease-in-out infinite;
  }
  .seal-shimmer {
    animation: seal-shimmer 2.8s ease-in-out infinite;
  }
}
@keyframes seal-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 10px rgba(255,255,255,0.35)); }
}
@keyframes seal-shimmer {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}
.envelope-screen.is-opening .seal-btn,
.envelope-screen.is-mid .seal-btn {
  animation: none;
  opacity: 0;
  pointer-events: none;
}

.env-open { display: none; }
.seal-layer { opacity: 0; }

.envelope-screen.is-opening .env-full,
.envelope-screen.is-mid .env-full { display: none; }
.envelope-screen.is-opening .env-open,
.envelope-screen.is-mid .env-open { display: block; }
.envelope-screen.is-opening .seal-layer,
.envelope-screen.is-mid .seal-layer { opacity: 1; }


.env-title {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  color: var(--ink);
  letter-spacing: 0.02em;
  text-align: center;
}
.env-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  opacity: 0.75;
}

/* Opening choreography */
@media (prefers-reduced-motion: no-preference) {
  .envelope-screen.is-opening .seal-left {
    animation: seal-crack-l 0.85s var(--ease) forwards;
  }
  .envelope-screen.is-opening .seal-right {
    animation: seal-crack-r 0.85s var(--ease) forwards;
  }
  .envelope-screen.is-opening .envelope-stage {
    animation: env-depart 1.55s 0.35s var(--ease) forwards;
  }
}

/* Sibling selectors won't reach hint/btn from .is-opening on parent — handle via parent */
.envelope-screen.is-opening .env-hint,
.envelope-screen.is-opening .env-title {
  animation: fade-out 0.45s 0.15s var(--ease) forwards;
}

@keyframes seal-crack-l {
  0% { transform: translate(0,0) rotate(0); opacity: 1; }
  35% { transform: translate(-6%, -4%) rotate(-4deg); opacity: 1; }
  100% { transform: translate(-55%, -28%) rotate(-18deg); opacity: 0; }
}
@keyframes seal-crack-r {
  0% { transform: translate(0,0) rotate(0); opacity: 1; }
  35% { transform: translate(6%, -3%) rotate(5deg); opacity: 1; }
  100% { transform: translate(58%, -24%) rotate(16deg); opacity: 0; }
}
@keyframes env-depart {
  0% { transform: scale(1) translateY(0); opacity: 1; }
  100% { transform: scale(1.06) translateY(18%); opacity: 0; }
}
@keyframes fade-out {
  to { opacity: 0; }
}

/* Mid freeze for screenshots */
.envelope-screen.is-mid .seal-left {
  transform: translate(-28%, -14%) rotate(-10deg);
  opacity: 0.92;
}
.envelope-screen.is-mid .seal-right {
  transform: translate(30%, -12%) rotate(11deg);
  opacity: 0.92;
}
.envelope-screen.is-mid .envelope-stage {
  transform: scale(1.02) translateY(4%);
}
.envelope-screen.is-mid .env-title,
.envelope-screen.is-mid .env-hint {
  opacity: 0;
}


/* ——— Language (outside the card) ——— */
.lang-link {
  position: fixed;
  top: max(0.55rem, env(safe-area-inset-top));
  left: max(0.7rem, env(safe-area-inset-left));
  right: auto;
  z-index: 50;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.4rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  opacity: 0.65;
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 0.5px;
}
.lang-link:hover { opacity: 1; color: var(--ink); }
.lang-link[hidden] { display: none; }
/* Keep clear of the letter card */
.invite.is-revealed .lang-link,
.invite.is-rising .lang-link,
.invite.is-rise-mid .lang-link {
  /* stays top-left of the ivory page, outside the tilted card */
}

/* ——— Invitation / printed letter ——— */
.invite {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.4rem 0.75rem 2.5rem;
  background: var(--ivory);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}
.invite[hidden] { display: none !important; }

.letter-card {
  position: relative;
  width: min(26.5rem, 100%);
  max-width: 100%;
  margin: 0 auto;
  transform: rotate(var(--card-tilt));
  filter: drop-shadow(0 14px 28px rgba(40, 30, 20, 0.18)) drop-shadow(0 2px 6px rgba(40, 30, 20, 0.1));
  isolation: isolate;
  /* contain tilt AABB / any child intrinsic overflow inside the card */
  overflow-x: clip;
}

.card-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  border-radius: 1px;
  overflow: hidden;
}
.card-frame picture {
  display: block;
  width: 100%;
  line-height: 0;
}
.card-cap {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}
.card-mid {
  flex: 1 1 auto;
  min-height: 4rem;
  width: 100%;
  background-image: image-set(url("card-mid.avif") type("image/avif"), url("card-mid.webp") type("image/webp"), url("card-mid.jpg") type("image/jpeg"));
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
}

.card-body {
  position: relative;
  z-index: 1;
  text-align: center;
  /* Clear lace + emboss: ratios from card-meta / visual fit */
  padding: clamp(4.6rem, 28vw, 7.2rem) clamp(1.55rem, 9.5vw, 2.6rem) clamp(5.2rem, 32vw, 8rem);
  color: var(--ink);
}

/* Letterpress / engraved ink feel */
.ink-press {
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.35), 0 -0.4px 0.4px rgba(0, 0, 0, 0.22);
}

/* Printed photo panel on the cotton card */
.photo-panel {
  position: relative;
  margin: 0 auto 1.05rem;
  width: 100%;
  line-height: 0;
  /* Ivory fallback while the print loads — never flash solid black */
  background: #efe6d8;
  padding: 0.28rem;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 231, 0.55);
}
.hero-photo {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  filter: none;
  /* Helpful for LCP / avoid blank paint */
  background: #1a1612;
}
.photo-grain {
  position: absolute;
  inset: 0.28rem;
  pointer-events: none;
  background-image: url("paper-grain.png");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
  opacity: 0.1;
  z-index: 1;
}
.photo-scrim {
  position: absolute;
  inset: 0.28rem;
  pointer-events: none;
  z-index: 2;
  /* Light top-only veil for ivory type legibility — do not crush the print */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.34) 0%,
    rgba(0, 0, 0, 0.12) 22%,
    transparent 42%
  );
}
.photo-type {
  position: absolute;
  inset: 0.28rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.15rem 0.85rem 1.2rem;
  text-align: center;
  pointer-events: none;
  /* Keep names in the upper dark band; leave hands/rings clear */
  max-height: 42%;
}
.names.on-photo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 7.6vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f7f2e9;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5), 0 0 1px rgba(0,0,0,0.55);
}
.names.on-photo .name { display: block; }
.names.on-photo .amp {
  display: block;
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  font-size: 0.48em;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(245, 240, 231, 0.82);
  margin: 0.18rem 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.photo-date {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.92rem, 3.4vw, 1.08rem);
  letter-spacing: 0.16em;
  color: #f5f0e7;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.invite.is-revealed .photo-type {
  animation: photo-type-in 1.1s var(--ease) 0.45s both;
}
@keyframes photo-type-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .invite.is-revealed .photo-type { animation: none; opacity: 1; }
}

.lead-group {
  margin: 0.1rem 0 0;
  text-align: center;
}
.greeting {
  margin: 0;
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 4.2vw, 1.35rem);
  color: var(--ink);
  text-shadow: 0 0.5px 0 rgba(255,255,255,0.3), 0 -0.35px 0.35px rgba(0,0,0,0.18);
}
.invite-line {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.95rem, 3.4vw, 1.08rem);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.95rem auto 0.85rem;
  color: var(--muted);
  opacity: 0.75;
}
.ornament.small { margin: 0.7rem auto 0.85rem; opacity: 0.55; }
.orn-rule {
  display: block;
  width: 2.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}
.ornament.small .orn-rule { width: 1.8rem; }
.orn-mark {
  font-size: 0.7rem;
  line-height: 1;
  transform: translateY(-1px);
}


.parents {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
}

.heart-date {
  position: relative;
  width: 10.5rem;
  height: 9.5rem;
  margin: 1.1rem auto 0.35rem;
  color: var(--ink);
}
.heart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}
.heart-path {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
}
.invite.is-revealed .heart-path {
  animation: draw-heart 1.35s var(--ease) 0.7s forwards;
}
@keyframes draw-heart { to { stroke-dashoffset: 0; } }
.heart-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding-top: 0.15rem;
  pointer-events: none;
}
.hd-day {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
}
.hd-time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-shadow: 0 0.4px 0 rgba(255,255,255,0.3), 0 -0.3px 0.3px rgba(0,0,0,0.18);
}

.venue {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.prog-block { margin: 0.15rem 0 0; }
.prog-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.programme {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  max-width: 17.5rem;
  margin-inline: auto;
}
.programme li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.28rem 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.programme .t {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  font-weight: 600;
  min-width: 2.6rem;
}
.programme .dots {
  border-bottom: 1px dotted var(--rule);
  height: 0.7em;
  min-width: 1rem;
  opacity: 0.85;
}
.programme .d {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: right;
}

.swan-accent {
  margin: 1.05rem auto 0.55rem;
  max-width: 9.25rem;
  width: 100%;
  line-height: 0;
  opacity: 0.95;
}
.swan-accent picture {
  display: block;
  width: 100%;
}
.sketch,
.swan-accent img,
.sketch-swans {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
.sketch-swans { opacity: 0.9; }

.countdown-line {
  margin: 0.35rem 0 0.9rem;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.countdown-line .cd-val {
  font-style: normal;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.print-links {
  margin: 0.4rem 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.print-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.1rem;
  min-height: 44px;
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 0.45px;
  cursor: pointer;
}
.print-link:hover { color: var(--ink); }
a.print-link { display: inline-flex; align-items: center; }
.print-sep { color: var(--rule); letter-spacing: 0; }

.closing {
  margin: 0.2rem 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}
.sign {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0.4px 0 rgba(255,255,255,0.28), 0 -0.3px 0.3px rgba(0,0,0,0.18);
}

.credit {
  margin: 1.35rem 0 0;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.55;
  text-align: center;
}
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

/* Rise choreography: card emerges from behind envelope */
.invite.is-rising .letter-card,
.invite.is-revealed .letter-card {
  animation: letter-rise 1.65s var(--ease) both;
}
.invite.is-rise-mid {
  background: transparent;
}
.invite.is-rise-mid .credit { opacity: 0; }
.invite.is-rise-mid .letter-card {
  animation: none;
  transform: rotate(var(--card-tilt)) translateY(38%) scale(0.92);
  opacity: 0.95;
  filter: drop-shadow(0 18px 30px rgba(40, 30, 20, 0.22));
}
@keyframes letter-rise {
  0% {
    opacity: 0.85;
    transform: rotate(0deg) translateY(62%) scale(0.88);
    filter: drop-shadow(0 8px 16px rgba(40, 30, 20, 0.12));
  }
  55% {
    opacity: 1;
    transform: rotate(0.35deg) translateY(6%) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: rotate(var(--card-tilt)) translateY(0) scale(1);
    filter: drop-shadow(0 14px 28px rgba(40, 30, 20, 0.18)) drop-shadow(0 2px 6px rgba(40, 30, 20, 0.1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .invite.is-rising .letter-card,
  .invite.is-revealed .letter-card {
    animation: letter-fade 0.4s ease both;
  }
  .invite.is-revealed .photo-type { animation: none; opacity: 1; }
  .invite.is-revealed .heart-path {
    animation: none;
    stroke-dashoffset: 0;
  }
  .envelope-screen.is-opening .seal-left,
  .envelope-screen.is-opening .seal-right,
  .envelope-screen.is-opening .envelope-stage,
  .envelope-screen.is-opening .env-title,
  .envelope-screen.is-opening .env-hint,
  .envelope-screen.is-opening .seal-btn { animation: none !important; }
  html { scroll-behavior: auto; }
}
@keyframes letter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ——— Printed photo gallery (crossfade + Ken Burns) ——— */
.gallery-block {
  margin: 0.95rem 0 0.35rem;
}
.gallery {
  margin: 0.35rem auto 0;
  max-width: 18.5rem;
  --gallery-fade: 1.2s;
  --gallery-ken: 4.5s;
}
.gallery-viewport {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  padding: 0.28rem;
  background: rgba(255,255,255,0.35);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 231, 0.7);
}
.gallery-track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  /* no horizontal track — stacked fades, no overflow */
}
.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  line-height: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity var(--gallery-fade) ease;
}
.gallery-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1) contrast(1.02);
  transform: scale(1);
  transform-origin: center center;
  will-change: transform, opacity;
}
.gallery-slide.is-landscape img {
  object-position: 62% 68%;
}
.gallery-slide.is-rings img {
  object-position: center 48%;
}
/* Subtle Ken Burns while a slide is active */
.gallery-slide.is-active img {
  animation: gallery-kenburns var(--gallery-ken) ease-out forwards;
}
@keyframes gallery-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}
.gallery-chrome {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.55rem;
}
.gallery-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.35rem 0.45rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  opacity: 0.55;
}
.gallery-nav:hover { opacity: 0.9; }
.gallery-count {
  margin: 0;
  min-width: 3.2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.gallery-dot {
  appearance: none;
  border: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  background-clip: content-box;
  padding: 18px;
}
.gallery-dot[aria-selected="true"] {
  background-color: var(--ink);
  background-clip: content-box;
}
@media (prefers-reduced-motion: reduce) {
  .gallery-slide {
    transition: none;
  }
  .gallery-slide.is-active img {
    animation: none;
  }
}

@media (min-width: 900px) {
  .letter-card { width: min(28rem, 42vw); max-width: 100%; }
  .card-body {
    padding: 6.4rem 2.5rem 7.2rem;
  }
}
