/* Monogramme — a cotton letterpress card, an emerald wax seal with K & L in gold foil, then an editorial page:
   Bodoni italic, fine rules, numbered parts. Ivory, ink, emerald and gold. Phone first, a column on a computer. */
@font-face {
  font-family: 'Bodoni';
  src: url('../assets/fonts/bodoni-moda-latin-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Bodoni';
  src: url('../assets/fonts/bodoni-moda-latin-italic.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-latin-normal.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: 'Alexandria';
  src: url('../assets/fonts/alexandria-arabic-wght.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Amiri';
  src: url('../assets/fonts/amiri-arabic-normal-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ivory: #f7f2e9;
  --ivory-2: #efe7da;
  --card: #fbf8f2;
  --ink: #22211f;
  --ink-2: #5a564f;
  --emerald: #1f4d41;
  --gold: #b38f4e;
  --line: rgba(34, 33, 31, 0.16);
  --col: min(100vw, 480px);
  --bg: var(--ivory);
  --btn-bg: var(--ink);
  --btn-ink: #f2e6cc;
  --font-text: 'Jost', 'Alexandria', system-ui, sans-serif;
  --font-text-ar: 'Alexandria', 'Jost', sans-serif;
  --display: 'Bodoni', 'Times New Roman', serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .32 0 0 0 0 .28 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[dir='rtl'] {
  --display: 'Alexandria', 'Amiri', serif;
}
body {
  background: var(--grain), radial-gradient(120% 90% at 50% 0%, #faf6ef, #ece3d4 80%);
  background-attachment: fixed;
  font-weight: 300;
}
/* Gold foil: a warm metal with a slow passing light. */
.foil {
  background: linear-gradient(105deg, #8e6c33 0%, #c9a35c 22%, #f6e3b0 34%, #c29a52 46%, #8b6930 62%, #d7b673 80%, #9d7a3c 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: foil 6s ease-in-out infinite;
}
@keyframes foil {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0 0;
  }
}

/* ——— 1. The card and its seal ——— */
.intro {
  --fade: 1.2s;
  position: fixed;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--col);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--grain), radial-gradient(90% 70% at 50% 42%, #fbf8f2, #ece3d4);
  cursor: pointer;
  outline: none;
  perspective: 1400px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 1.2s ease;
}
.intro-card {
  position: relative;
  width: min(74vw, 320px);
  aspect-ratio: 0.7;
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.55, 0, 0.25, 1) 0.55s;
}
.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--grain), var(--card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 30px 50px -28px rgba(80, 60, 30, 0.45),
    0 2px 6px rgba(80, 60, 30, 0.12);
  backface-visibility: hidden;
}
.face-rule {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(179, 143, 78, 0.45);
  border-radius: 3px;
}
.face-back {
  transform: rotateY(180deg);
  align-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.seal {
  position: relative;
  width: 58%;
  transition:
    transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.7s ease 0.15s;
}
.seal img {
  width: 100%;
  filter: drop-shadow(0 8px 10px rgba(20, 50, 40, 0.35));
}
/* The monogram stays K & L, left to right, in both languages. */
.seal-mono,
.hero-mono {
  direction: ltr;
}
.seal-mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'Bodoni', serif;
  font-style: italic;
  font-size: 34px;
  font-weight: 500;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.seal-mono i {
  font-size: 0.62em;
  margin-top: 0.15em;
}
.back-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.back-names {
  margin: 0;
  font-family: 'Bodoni', serif;
  font-style: italic;
  font-size: 36px;
  line-height: 1.15;
}
.back-date {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-2);
}
.intro-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + min(37vw, 160px) / 0.7 + 34px);
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
  animation: breathe 2.6s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
html[dir='rtl'] .intro-hint {
  letter-spacing: 0;
  font-size: 15px;
}
@keyframes breathe {
  50% {
    opacity: 0.4;
  }
}
.intro.is-open .intro-hint {
  opacity: 0;
  animation: none;
}
.intro.is-open .seal {
  transform: translate(30%, -60%) rotate(18deg) scale(1.1);
  opacity: 0;
}
.intro.is-open .intro-card {
  transform: rotateY(180deg);
}
.intro.is-in {
  opacity: 0;
  transition-duration: 0.7s;
}
.intro.is-in .intro-card {
  transform: rotateY(180deg) scale(1.7);
  transition: transform 0.9s cubic-bezier(0.5, 0, 0.7, 0.4);
}
.intro.is-gone {
  display: none;
}

/* ——— 2. The names ——— */
.page {
  position: relative;
  width: var(--col);
  margin: 0 auto;
  background: var(--grain), var(--ivory);
  box-shadow: 0 0 60px rgba(100, 80, 50, 0.14);
  overflow: hidden;
}
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.hero-mono {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  display: flex;
  font-family: 'Bodoni', serif;
  font-style: italic;
  font-size: 300px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(179, 143, 78, 0.22);
  letter-spacing: -0.12em;
  pointer-events: none;
}
.hero-kicker {
  position: relative;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[dir='rtl'] .hero-kicker {
  letter-spacing: 0;
  font-size: 17px;
}
.hero-names {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(64px, 18vw, 92px);
  line-height: 0.98;
}
html[dir='rtl'] .hero-names {
  font-style: normal;
  font-weight: 500;
  font-size: clamp(54px, 15vw, 76px);
  line-height: 1.35;
}
.amp {
  font-family: 'Bodoni', serif;
  font-style: italic;
  font-size: 0.55em;
  line-height: 1.1;
}
.hero-date {
  position: relative;
  margin: 26px 0 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.42em;
  color: var(--ink);
}
.hero-place {
  position: relative;
  margin: 8px 0 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[dir='rtl'] .hero-place {
  letter-spacing: 0;
  font-size: 15px;
}
.hero-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 64px;
  background: linear-gradient(transparent, var(--gold));
}
.hero > *:not(.hero-line, .hero-mono) {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 1.4s ease,
    transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html[data-opened] .hero > *:not(.hero-line, .hero-mono) {
  opacity: 1;
  transform: none;
}
.hero-mono {
  opacity: 0;
  transition: opacity 2.4s ease 2.4s;
}
html[data-opened] .hero-mono {
  opacity: 1;
}
html[data-opened] .hero-kicker {
  transition-delay: 2.1s;
}
html[data-opened] .hero-names {
  transition-delay: 2.3s;
}
html[data-opened] .hero-date,
html[data-opened] .hero-place {
  transition-delay: 2.6s;
}

/* ——— 3. The parts ——— */
.part {
  position: relative;
  margin: 0 28px;
  padding: 56px 0 50px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.part-num {
  margin: 0 0 18px;
  font-family: 'Bodoni', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
}
.part-num::before,
.part-num::after {
  content: '—';
  margin: 0 8px;
  font-style: normal;
  color: var(--line);
}
.part h2 {
  margin: 0 0 26px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
  color: var(--ink);
}
html[dir='rtl'] .part h2 {
  font-style: normal;
  font-weight: 500;
  font-size: 27px;
  line-height: 1.5;
}
.part-intro {
  margin: 0 auto;
  max-width: 340px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}
html[dir='rtl'] .part-intro {
  font-family: 'Amiri', serif;
  font-size: 20px;
  line-height: 1.95;
}
.part-date {
  margin: 26px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 23px;
  color: var(--emerald);
}
html[dir='rtl'] .part-date {
  font-style: normal;
  font-size: 19px;
  line-height: 1.6;
}
.part-hour {
  margin: 6px 0 0;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[dir='rtl'] .part-hour {
  letter-spacing: 0;
  font-size: 16px;
}
.cd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cd-cell {
  display: grid;
  gap: 6px;
  padding: 6px 0;
}
.cd-cell + .cd-cell {
  border-inline-start: 1px solid var(--line);
}
.cd-num {
  font-family: 'Bodoni', serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.cd-unit {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[dir='rtl'] .cd-unit {
  letter-spacing: 0;
  font-size: 13px;
}
.prog {
  margin: 0 auto;
  padding: 0;
  max-width: 360px;
  list-style: none;
}
.prog-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
  text-align: start;
}
.prog-time {
  font-family: 'Bodoni', serif;
  font-size: 19px;
  color: var(--emerald);
  font-variant-numeric: lining-nums;
}
.prog-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(34, 33, 31, 0.35);
  transform: translateY(-4px);
}
.prog-label {
  max-width: 62%;
  font-size: 16px;
  text-align: end;
}
html[dir='rtl'] .prog-label {
  font-size: 17px;
}
.prog-item[data-reveal] {
  transition-delay: calc(var(--i) * 0.12s);
}
.still {
  margin: 0 0 6px;
  height: 330px;
  overflow: hidden;
}
.still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  transform: scale(var(--k, 1.12));
  transition: transform 0.2s linear;
}
.venue-name {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  color: var(--ink);
}
html[dir='rtl'] .venue-name {
  font-style: normal;
  font-size: 25px;
}
.venue-city {
  margin: 6px 0 24px;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-2);
}
html[dir='rtl'] .venue-city {
  letter-spacing: 0;
  font-size: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #f2e6cc;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
html[dir='rtl'] .btn {
  letter-spacing: 0;
  font-size: 16px;
}
html[dir='rtl'] .btn svg {
  transform: scaleX(-1);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.dress {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}
html[dir='rtl'] .dress {
  font-style: normal;
  font-size: 19px;
}
.closing {
  margin: 0 28px;
  padding: 50px 0 80px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.seal-small {
  width: 120px;
  margin: 0 auto 22px;
}
.seal-small .seal-mono {
  font-size: 23px;
}
.closing-text {
  margin: 0 auto;
  max-width: 330px;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  text-wrap: balance;
  color: var(--ink);
}
html[dir='rtl'] .closing-text {
  font-style: normal;
  font-size: 20px;
  line-height: 1.8;
}

@media (min-width: 520px) {
  .inv-controls {
    inset-inline-end: calc(50% - 240px + 16px);
  }
}
