@font-face {
  font-family: Aref;
  src: url("assets/aref.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Alexandria;
  src: url("assets/alexandria.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Amiri;
  src: url("assets/amiri.ttf") format("truetype");
  font-display: swap;
}

:root {
  --wine: #691b32;
  --deep: #431021;
  --paper: #f5e8d7;
  --pale: #e9d4bc;
  --gold: #b58963;
  --line: #691b3238;
  --body: Alexandria, Tahoma, sans-serif;
  --hand: Aref, Amiri, serif;
  --serif: Amiri, Georgia, serif;
  --pad: clamp(20px, 5vw, 90px);
  --section: clamp(64px, 8vw, 112px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--wine);
  font: 16px/1.9 var(--body);
}

body.locked {
  overflow: hidden;
}

h1,
h2,
p,
figure {
  margin: 0;
}

h1,
h2 {
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  flex-shrink: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

.skip {
  position: fixed;
  top: -100px;
  right: 20px;
  z-index: 100;
  background: var(--paper);
  padding: 10px;
}

.skip:focus {
  top: 10px;
}

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  z-index: 50;
  transform: scaleX(0);
  transform-origin: left;
}

.micro {
  font:
    12px/1.8 Georgia,
    serif;
  letter-spacing: 2px;
  display: block;
  direction: ltr;
}

/* Cover: the date has its own space, outside the name ornament. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  isolation: isolate;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--paper);
  padding: 28px 22px;
}

.intro-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50.1%;
  z-index: -1;
  background-color: var(--wine);
  background-image: repeating-linear-gradient(
    90deg,
    #21000c22 0%,
    transparent 9%,
    #efb6bd0a 16%,
    #21000c1a 24%
  );
  will-change: transform;
}

.panel-right {
  right: 0;
  border-left: 1px solid #f5e8d721;
}

.panel-left {
  left: 0;
}

.intro-content {
  width: min(100%, 660px);
  margin: auto;
  text-align: center;
  padding: 20px 0;
}

.intro-pre {
  font-size: 15px;
  line-height: 2;
  margin: 18px 0 14px;
}

.intro-name-lockup {
  display: inline-block;
  position: relative;
  padding: 6px 30px 12px;
}

.intro h2 {
  font: clamp(43px, 6.3vw, 78px)/1.6 var(--hand);
  white-space: nowrap;
}

.intro h2 i {
  font: italic 0.6em Georgia;
  padding-inline: 8px;
  color: #e3bf9d;
}

.intro-name-frame {
  position: absolute;
  inset: 0;
  border: 1px solid #e6bd9880;
  transform: rotate(-2deg);
  pointer-events: none;
}

.intro-name-frame:before,
.intro-name-frame:after {
  content: "✦";
  position: absolute;
  background: var(--wine);
  color: #e6bd98;
  font: 12px/1 Georgia;
  padding: 3px 6px;
}

.intro-name-frame:before {
  right: 18px;
  top: -8px;
}

.intro-name-frame:after {
  left: 18px;
  bottom: -8px;
}

.intro-date {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 10px 18px;
  border-block: 1px solid #e6bd9877;
  background: #43102135;
  color: #fff3e6;
  letter-spacing: 1.5px;
}

.intro-date strong {
  font: 32px/1.1 Georgia;
}

.intro-date span {
  font: 14px/1.6 Georgia;
}

.intro-date small {
  font: 14px/1.6 Georgia;
  border-left: 1px solid #e6bd9866;
  padding-left: 12px;
}

.intro-quote {
  max-width: 580px;
  margin: 24px auto 0;
  color: #f8e6d5;
  font: clamp(20px, 1.8vw, 24px)/1.85 var(--serif);
  text-wrap: balance;
}

.quote-lead {
  display: block;
  font-size: 0.9em;
  color: #ead0bb;
  margin-bottom: 12px;
}

.quote-thought {
  display: block;
  margin-top: 10px;
}

.quote-name {
  font: 1.35em/1.5 var(--hand);
  color: #f0cba1;
  font-style: normal;
  padding-inline: 3px;
}

.quote-ending {
  display: inline-block;
  font-weight: 400;
  color: #ffe0b7;
  border-bottom: 1px solid #e6bd9866;
  padding-bottom: 2px;
}

.open-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  border: 1px solid #e6bd98;
  border-radius: 50%;
  background: var(--paper);
  color: var(--wine);
  margin: 34px auto 26px;
  outline: 1px solid #e6bd9880;
  outline-offset: 7px;
  transition: background 0.25s;
}

.open-button > span:first-child {
  font: 27px/1.6 var(--hand);
}

.open-sub {
  font: 12px/1.5 Georgia;
  letter-spacing: 2px;
}

.open-button:after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid #e6bd9866;
  border-radius: 50%;
  pointer-events: none;
  animation: inviteRing 2.8s ease-out infinite;
}

.intro-note {
  font-size: 13px;
}

@keyframes inviteRing {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }

  85%,
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}

.petal-layer {
  position: fixed;
  inset: 0;
  z-index: 66;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -35px;
  background: url("assets/rose-petal.webp") center/contain no-repeat;
  will-change: transform, opacity;
}

/* Hero cards keep reserved space so scroll transforms cannot overlap details. */
.hero {
  padding: 60px var(--pad) 30px;
  position: relative;
  overflow: clip;
}

.hero-top {
  text-align: center;
}

.save-date {
  font:
    italic clamp(54px, 7vw, 108px)/1.25 Georgia,
    serif;
  direction: ltr;
  margin-top: 14px;
  letter-spacing: -3px;
}

.save-date em {
  font-size: 0.48em;
  letter-spacing: -1px;
  display: inline-block;
  vertical-align: middle;
  padding: 0 5px;
}

.hero-stage {
  max-width: 1320px;
  margin: 28px auto 0;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  direction: ltr;
  position: relative;
  padding: 36px 20px 64px;
}

.photo {
  background: #fff6ea;
  padding: 10px 10px 8px;
  box-shadow: 0 18px 35px #43102120;
  width: 100%;
  max-width: 310px;
  will-change: transform;
}

.photo-inner {
  overflow: hidden;
  aspect-ratio: 3/4;
}

.photo img {
  width: 100%;
  height: 100%;
}

.photo figcaption {
  font: italic clamp(12px, 1.3vw, 18px)/1.6 Georgia;
  text-align: center;
  padding: 12px 0 4px;
  color: var(--wine);
}

.hero-flower {
  transform: rotate(-7deg);
  justify-self: start;
  align-self: start;
  margin-top: 20px;
}

.hero-rings {
  transform: rotate(7deg);
  justify-self: end;
  align-self: end;
  margin-bottom: 16px;
}

.names-wrap {
  direction: rtl;
  text-align: center;
  z-index: 2;
  min-width: 0;
}

.hero-invite {
  font-size: 16px;
  margin-bottom: 20px;
}

.names {
  font: clamp(65px, 6.8vw, 104px)/1.45 var(--hand);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.names:focus {
  outline: none;
}

.name {
  display: block;
  white-space: nowrap;
}

.amp {
  font: italic 40px/1 Georgia;
  color: #ae7c61;
  margin: 4px 0;
}

.hero-english {
  font: 12px/1.6 Georgia;
  letter-spacing: 4px;
  direction: ltr;
  display: block;
  margin-top: 22px;
}

.hero-side {
  display: none;
}

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 14px;
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 28px;
}

.scroll-line {
  height: 28px;
  width: 1px;
  background: var(--wine);
  position: relative;
  overflow: hidden;
}

.scroll-line:after {
  content: "";
  width: 3px;
  height: 12px;
  background: var(--paper);
  position: absolute;
  top: -12px;
  left: -1px;
  animation: driftDown 2s infinite;
}

@keyframes driftDown {
  to {
    transform: translateY(44px);
  }
}

/* Explicit LTR origin and two identical groups create a seamless RTL-safe loop. */
.ribbon {
  background: var(--wine);
  color: var(--paper);
  overflow: hidden;
  padding: 18px 0;
}

.ribbon-viewport {
  width: 100%;
  overflow: hidden;
  direction: ltr;
}

.ribbon-track {
  display: flex;
  width: max-content;
  direction: ltr;
  animation: ribbonMarquee 32s linear infinite;
  will-change: transform;
}

.ribbon-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  min-width: 100vw;
  justify-content: space-around;
  white-space: nowrap;
}

.ribbon-group span {
  font: 18px/1.8 Georgia;
  letter-spacing: 1.5px;
}

.ribbon-group span[lang="ar"] {
  font: 28px/1.8 var(--hand);
  letter-spacing: 0;
}

.ribbon-group i {
  font: 24px Georgia;
  color: #e1ba97;
  font-style: normal;
}

@keyframes ribbonMarquee {
  to {
    transform: translateX(-50%);
  }
}

.celebration {
  overflow: clip;
}

.chapter-intro {
  padding: var(--section) 22px;
  text-align: center;
  max-width: 800px;
  margin: auto;
}

.chapter-intro h2 {
  font: clamp(40px, 5.2vw, 68px)/1.55 var(--hand);
  margin: 24px 0;
}

.chapter-intro h2 em {
  font-style: normal;
  color: #965365;
  display: inline-block;
  position: relative;
  --line-progress: 0;
}

.chapter-intro h2 em:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: #a1626588;
  transform: scaleX(var(--line-progress));
  transform-origin: right;
}

.chapter-intro p {
  color: #79505b;
  font-size: 16px;
  line-height: 2.1;
}

.scene {
  height: 100svh;
  min-height: 600px;
  max-height: 1050px;
  position: relative;
  isolation: isolate;
  background: var(--paper);
}

.scene-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  clip-path: inset(0);
}

.scene-image img {
  width: 100%;
  height: 100%;
  object-position: center;
}

.scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #230510ac, #230510c2 60%, #230510d6);
}

.scene-copy {
  text-shadow: 0 2px 20px #0006;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff0df;
  text-align: center;
  padding: 48px 22px;
}

.scene-copy .micro {
  margin-bottom: 24px;
  color: #f3ddc7;
}

.scene-line {
  font: clamp(52px, 8vw, 110px)/1.55 var(--hand);
}

.scene-line.accent {
  color: #eed0b3;
}

.countdown-section {
  background: var(--wine);
  color: var(--paper);
  padding: var(--section) var(--pad);
  text-align: center;
  overflow: clip;
}

.countdown-heading h2 {
  font: clamp(42px, 5.6vw, 72px)/1.55 var(--hand);
  margin: 22px 0 18px;
}

.english-note {
  display: block;
  font: italic 28px/1.5 Georgia;
  color: #e4bea1;
  direction: ltr;
}

.countdown-heading p {
  font-size: 16px;
  color: #edcebc;
}

.countdown {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 970px;
  margin: 40px auto;
  border-block: 1px solid #f5e8d750;
}

.time-unit {
  padding: 22px 5px 28px;
  border-right: 1px solid #f5e8d750;
  min-width: 0;
}

.time-unit:last-child {
  border-right: 0;
}

.time-unit strong {
  font: 400 clamp(45px, 8.7vw, 120px)/1.15 Georgia;
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: -3px;
}

.time-unit span {
  font: 12px Georgia;
  letter-spacing: 2px;
  display: block;
  margin-top: 15px;
  color: #efd3bd;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--wine);
  color: var(--paper);
  border: 1px solid var(--wine);
  padding: 16px 25px;
  min-height: 78px;
  max-width: 100%;
  text-align: center;
  transition:
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}

.button:hover {
  background: var(--deep);
  box-shadow: 0 6px 18px #43102120;
}

.button.light {
  background: #f5e8d709;
  border-color: #e9cbb2;
}

.button.light:hover {
  background: var(--paper);
  color: var(--wine);
}

.motion-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 270px;
  border-radius: 4px;
  touch-action: manipulation;
  transform-origin: center;
  box-shadow: 0 8px 22px #43102119;
}

.motion-cta:before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -65%;
  width: 40%;
  background: linear-gradient(100deg, transparent, #ffefda33, transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: -1;
}

.motion-cta.shimmer:before {
  animation: ctaShine 1.15s ease-in-out;
}

.motion-cta > svg {
  width: 26px;
  height: 26px;
}

.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: 4px;
  min-width: 0;
}

.cta-copy strong {
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

.cta-copy small {
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.88;
}

@keyframes ctaShine {
  to {
    left: 135%;
  }
}

.details {
  padding: var(--section) var(--pad);
  max-width: 1450px;
  margin: auto;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 60px;
}

.section-top > span:last-child {
  font-size: 30px;
  font-family: Aref !important;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10%;
  align-items: center;
  direction: ltr;
  max-width: 1100px;
  margin: auto;
}

.date-art {
  text-align: center;
  border: 1px solid var(--wine);
  padding: 28px 35px 24px;
  position: relative;
  max-width: 450px;
  width: 100%;
  transform: rotate(-3deg);
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--pale);
}

.date-word {
  font: italic clamp(32px, 4vw, 55px)/1.5 Georgia;
  display: block;
}

.date-art > strong {
  font: normal clamp(140px, 20vw, 255px)/1 Georgia;
  letter-spacing: -15px;
  display: block;
  margin-right: 15px;
}

.date-base {
  display: flex;
  justify-content: space-between;
  border-block: 1px solid var(--line);
  padding: 12px 0;
  font-size: 14px;
  margin-top: 22px;
}

.date-art > p {
  font-size: 17px;
  padding-top: 18px;
  direction: rtl;
}

.date-art b {
  font-weight: 400;
  font-size: 26px;
}

.venue-copy {
  direction: rtl;
}

.venue-copy h2 {
  font: clamp(43px, 5vw, 66px)/1.55 var(--hand);
  margin: 24px 0 18px;
}

.venue-copy h2 em {
  font-style: normal;
}

.location-address {
  font-size: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.venue-note {
  font-size: 16px;
  line-height: 2.1;
  color: #79505b;
  margin-bottom: 28px;
}

.closing {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  place-items: center;
  padding: var(--section) var(--pad);
  background:
    radial-gradient(circle at 12% 16%, #fff5e8, transparent 40%), var(--pale);
}

.closing-feature {
  position: relative;
  width: min(100%, 500px);
  padding: 10px;
  background: var(--paper);
  border: 1px solid #fff8ed;
  box-shadow: 18px 24px 45px #4310212e;
  will-change: transform;
}

.closing-feature img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: contain;
}

.closing-copy {
  max-width: 620px;
  text-align: center;
}

.closing h2 {
  font: clamp(44px, 5.7vw, 76px)/1.55 var(--hand);
  margin: 24px 0;
}

.closing h2 em {
  font-style: normal;
}

.closing p {
  font-size: 16px;
  color: #79505b;
  line-height: 2.1;
}

.signature {
  font: 42px/1.7 var(--hand);
  margin-top: 32px;
}

.signature span {
  font: italic 30px Georgia;
  margin-inline: 10px;
  color: #965365;
}

.end-date {
  font: 12px/1.8 Georgia;
  letter-spacing: 3px;
  display: block;
  margin-top: 16px;
}

@media (hover: hover) and (pointer: fine) {
  .motion-cta:hover:before {
    animation: ctaShine 1.15s ease-in-out;
  }

  .motion-cta > svg {
    transition: transform 0.35s;
  }

  .motion-cta:hover > svg {
    transform: rotate(-8deg) scale(1.08);
  }

  .open-button:hover {
    background: #eed5b4;
  }

  .scroll-hint:hover {
    background: #691b320a;
  }
}

@media (max-width: 1000px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 1.3fr) minmax(0, 1fr);
    gap: 20px;
    padding-inline: 10px;
    min-height: 440px;
  }

  .names {
    font-size: 68px;
  }

  .photo {
    padding: 7px;
  }

  .photo figcaption {
    font-size: 12px;
  }

  .hero-invite {
    font-size: 14px;
  }

  .details-grid {
    gap: 8%;
  }

  .date-art {
    padding: 25px;
  }
}

@media (max-width: 700px) {
  :root {
    --pad: 22px;
    --section: 68px;
  }

  html {
    scroll-padding-top: 24px;
  }

  .intro {
    padding: 22px 20px;
  }

  .intro-content {
    padding: 12px 0;
  }

  .intro .micro {
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .intro-pre {
    font-size: 14px;
    margin: 16px 0;
  }

  .intro-name-lockup {
    padding: 6px 22px 12px;
  }

  .intro h2 {
    font-size: clamp(39px, 10.7vw, 65px);
  }

  .intro h2 i {
    padding-inline: 5px;
  }

  .intro-date {
    margin-top: 26px;
    gap: 9px;
    padding: 10px 12px;
  }

  .intro-date strong {
    font-size: 28px;
  }

  .intro-date span,
  .intro-date small {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .intro-date small {
    padding-left: 9px;
  }

  .intro-quote {
    max-width: 370px;
    font-size: 20px;
    line-height: 1.85;
    margin-top: 22px;
  }

  .quote-lead {
    margin-bottom: 10px;
  }

  .quote-thought {
    margin-top: 9px;
  }

  .open-button {
    width: 110px;
    height: 110px;
    margin: 30px auto 24px;
  }

  .open-button > span:first-child {
    font-size: 25px;
  }

  .intro-note {
    font-size: 12px;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 26px;
  }

  .hero-top > .micro {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .save-date {
    font-size: clamp(47px, 11.5vw, 76px);
    letter-spacing: -2px;
    margin-top: 12px;
  }

  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 22px;
    min-height: 0;
    padding: 0 10px 55px;
    margin-top: 24px;
  }

  .names-wrap {
    grid-area: 1/1/2/3;
    margin: 0 0 36px;
  }

  .hero-invite {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 2;
  }

  .names {
    font-size: clamp(55px, 13vw, 86px);
    line-height: 1.38;
  }

  .amp {
    font-size: 29px;
    margin: 7px 0;
  }

  .hero-english {
    font-size: 12px;
    letter-spacing: 3px;
    margin-top: 20px;
  }

  .hero-flower {
    grid-area: 2/1;
    margin: 0;
    align-self: start;
    max-width: 250px;
    justify-self: end;
    transform: rotate(-6deg);
  }

  .hero-rings {
    grid-area: 2/2;
    margin: 24px 0 0;
    align-self: start;
    max-width: 250px;
    justify-self: start;
    transform: rotate(6deg);
  }

  .photo-inner {
    aspect-ratio: 4/5;
  }

  .photo figcaption {
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 1px 5px;
  }

  .hero-bottom {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    font-size: 14px;
    gap: 12px;
    padding-top: 24px;
  }

  .hero-bottom > span:last-child {
    grid-row: 2;
  }

  .scroll-hint {
    grid-row: 3;
    justify-self: center;
    margin-top: 4px;
  }

  .ribbon {
    padding: 14px 0;
  }

  .ribbon-group {
    gap: 24px;
    padding-right: 24px;
  }

  .ribbon-group span {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .ribbon-group span[lang="ar"] {
    font-size: 25px;
  }

  .ribbon-group i {
    font-size: 20px;
  }

  .chapter-intro h2 {
    font-size: clamp(37px, 9.5vw, 52px);
    margin: 22px 0;
  }

  .chapter-intro p {
    font-size: 16px;
  }

  .scene {
    height: 76svh;
    min-height: 510px;
    max-height: 740px;
  }

  .scene-image img {
    object-position: 53% center;
  }

  .scene-line {
    font-size: clamp(41px, 10.5vw, 72px);
  }

  .scene-copy .micro {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .countdown-heading h2 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .english-note {
    font-size: 25px;
  }

  .countdown-heading p {
    font-size: 16px;
  }

  .countdown {
    margin: 32px auto;
  }

  .time-unit {
    padding: 20px 2px 22px;
  }

  .time-unit strong {
    font-size: clamp(34px, 10vw, 67px);
    letter-spacing: -1px;
  }

  .time-unit span {
    font-size: 12px;
    letter-spacing: 0.3px;
  }

  .motion-cta {
    min-width: 0;
    width: 100%;
    max-width: 370px;
    padding: 15px 20px;
    gap: 14px;
  }

  .cta-copy strong {
    font-size: 16px;
  }

  .cta-copy small {
    font-size: 12px;
  }

  .section-top {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
  }

  .section-top .micro {
    letter-spacing: 1px;
  }

  .section-top > span:last-child {
    font-size: 25px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-inline: 8px;
  }

  .date-art {
    max-width: 340px;
    justify-self: center;
    padding: 24px;
  }

  .date-art > strong {
    font-size: 170px;
    letter-spacing: -10px;
    margin-right: 10px;
  }

  .date-word {
    font-size: 42px;
  }

  .date-base {
    margin-top: 18px;
  }

  .venue-copy {
    text-align: center;
  }

  .venue-copy h2 {
    font-size: clamp(39px, 10vw, 54px);
    margin-top: 18px;
  }

  .location-address {
    font-size: 16px;
  }

  .closing {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-inline: 24px;
  }

  .closing-feature {
    width: min(100%, 400px);
    padding: 7px;
  }

  .closing-copy {
    max-width: 100%;
  }

  .closing h2 {
    font-size: clamp(40px, 10vw, 54px);
  }

  .closing .micro {
    letter-spacing: 1.2px;
  }

  .signature {
    font-size: 36px;
    margin-top: 26px;
  }
}

@media (max-width: 360px) {
  :root {
    --pad: 16px;
  }

  .intro {
    padding-inline: 16px;
  }

  .intro-name-lockup {
    padding-inline: 14px;
  }

  .intro h2 {
    font-size: 38px;
  }

  .intro-quote {
    font-size: 19px;
  }

  .hero-stage {
    gap: 0 16px;
    padding-inline: 8px;
  }

  .hero-top > .micro {
    font-size: 11px;
  }

  .photo figcaption {
    font-size: 12px;
  }

  .time-unit span {
    font-size: 11px;
  }

  .scene-line {
    font-size: 39px;
  }

  .cta-copy strong {
    font-size: 15px;
  }
}

@media (max-height: 600px) {
  .intro-content {
    margin-block: 0;
  }

  .intro {
    padding-block: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }

  .photo,
  .closing-feature,
  .petal {
    will-change: auto;
  }

  .petal-layer,
  .open-button:after,
  .motion-cta:before {
    display: none;
  }

  .intro-name-frame {
    transform: none;
  }

  .chapter-intro h2 em:after {
    display: none;
  }
}

/* Arabic outlines use the same shaped Aref font as the invitation. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.signature-ink {
  display: block;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linejoin: round;
  overflow: visible;
}

.intro h2 .signature-ink {
  width: clamp(225px, 28vw, 395px);
  height: auto;
  max-width: 100%;
  margin: 10px auto;
}

.name .signature-ink {
  width: auto;
  height: 1.18em;
  max-width: 100%;
}

.chapter-intro h2,
.countdown-heading h2 {
  margin-top: 0;
}

.section-top {
  justify-content: center;
}

.closing-portrait {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.closing-portrait > img:first-child {
  display: block;
  width: 100%;
  height: auto;
}

.number-scrim {
  position: absolute;
  inset: 0;
  background: #431021;
  opacity: 0;
  pointer-events: none;
}

.closing-portrait > .number-lift {
  position: absolute;
  left: 44%;
  top: 51%;
  width: 24%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.number-caption {
  position: absolute;
  inset: 64% 0 auto;
  text-align: center;
  color: #fff0df;
  opacity: 0;
  pointer-events: none;
}

.number-caption > span {
  display: block;
  font: clamp(32px, 4vw, 52px)/1.5 var(--hand);
}

.number-caption > small {
  display: block;
  font: bold 12px/1.8 Georgia;
  letter-spacing: 2.5px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .intro h2 .signature-ink {
    width: clamp(220px, 61vw, 340px);
    margin-block: 8px;
  }

  .number-caption > span {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .number-lift,
  .number-scrim,
  .number-caption {
    display: none !important;
  }

  .signature-ink path {
    fill-opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Fit canvases keep layout scaling separate from the animated content. */
.intro {
  height: 100dvh;
  justify-content: center;
  padding-block: 16px;
}

.intro-fit,
.hero-fit {
  width: 100%;
  flex: none;
  position: relative;
}

.fit-canvas {
  width: 100%;
  transform-origin: top center;
  display: flow-root;
}

.intro-content {
  margin: 0 auto;
  padding: 8px 0;
}

.intro.is-fitted {
  overflow: hidden;
}

.intro:not(.is-fitted) {
  justify-content: flex-start;
}

.intro-pre {
  margin: 10px 0;
}

.intro-date {
  margin-top: 18px;
}

.intro-quote {
  margin-top: 16px;
  line-height: 1.7;
}

.quote-lead {
  margin-bottom: 6px;
}

.quote-thought {
  margin-top: 6px;
}

.seal-button,
.seal-button:hover {
  width: 132px;
  height: auto;
  min-height: 130px;
  gap: 6px;
  margin: 16px auto 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: var(--paper);
}

.seal-button:after {
  display: none;
}

.seal-button:focus-visible {
  outline: 2px solid #f0cba1;
  outline-offset: 5px;
  border-radius: 8px;
}

.seal-face {
  position: relative;
  display: block;
  width: 108px;
  height: 108px;
  filter: drop-shadow(0 5px 7px #25040c70);
}

.seal-piece {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.seal-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.seal-left {
  clip-path: polygon(
    0 0,
    52% 0,
    47% 23%,
    54% 42%,
    47% 62%,
    53% 83%,
    49% 100%,
    0 100%
  );
}

.seal-right {
  clip-path: polygon(
    52% 0,
    100% 0,
    100% 100%,
    49% 100%,
    53% 83%,
    47% 62%,
    54% 42%,
    47% 23%
  );
}

.seal-monogram {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: 30px/1 var(--hand);
  color: #f1cda2;
  text-shadow: 0 1px 1px #19000c;
}

.seal-monogram i {
  font: italic 19px Georgia;
}

.seal-action {
  font: 25px/1.5 var(--hand);
}

.ring-story {
  overflow: hidden;
  background: radial-gradient(ellipse at center, #fff6e9 0, transparent 70%);
  padding: 0 var(--pad) 32px;
}

.ring-stage {
  position: relative;
  height: clamp(300px, 48vw, 520px);
  max-width: 1100px;
  margin: auto;
  isolation: isolate;
}

.story-ring {
  position: absolute;
  left: 50%;
  top: 43%;
  width: clamp(170px, 30vw, 300px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 13px #43102120);
  transform: translate(-50%, -50%);
}

.ring-left {
  margin-left: -12%;
  z-index: 1;
}

.ring-right {
  margin-left: 12%;
  z-index: 2;
}

.ring-names {
  position: absolute;
  inset: auto 0 2%;
  text-align: center;
  font: clamp(38px, 5.8vw, 70px)/1.6 var(--hand);
  z-index: 3;
  color: var(--wine);
}

.ring-names span {
  font: italic 0.7em Georgia;
  color: #ad7d52;
  margin-inline: 10px;
}

.petal-journey {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 22;
  pointer-events: none;
}

.journey-petal {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px #43102125);
  will-change: transform;
}

.journey-petal:nth-child(2n) {
  width: 23px;
}

.journey-petal:nth-child(3n) {
  width: 36px;
}

.journey-petal:nth-child(5) {
  filter: blur(0.5px);
}

.end-date {
  width: fit-content;
  margin-inline: auto;
}

@media (max-width: 700px) {
  .intro {
    padding: 10px 18px;
  }

  .intro-content {
    padding: 5px 0;
  }

  .intro .micro {
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .intro-pre {
    font-size: 12px;
    margin: 7px 0 9px;
  }

  .intro-name-lockup {
    padding: 4px 20px 7px;
  }

  .intro h2 .signature-ink {
    width: clamp(205px, 57vw, 270px);
    margin: 5px auto;
  }

  .intro-date {
    margin-top: 16px;
    padding: 7px 12px;
    gap: 8px;
  }

  .intro-date strong {
    font-size: 25px;
  }

  .intro-quote {
    font-size: 19px;
    line-height: 1.65;
    margin-top: 13px;
    max-width: 380px;
  }

  .quote-lead {
    margin-bottom: 5px;
  }

  .quote-thought {
    margin-top: 4px;
  }

  .seal-button {
    width: 116px;
    min-height: 112px;
    margin: 12px auto 9px;
    gap: 3px;
  }

  .seal-face {
    width: 88px;
    height: 88px;
  }

  .seal-action {
    font-size: 23px;
  }

  .seal-monogram {
    font-size: 26px;
  }

  .intro-note {
    font-size: 11px;
  }

  .hero {
    height: 86svh;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 16px var(--pad);
    overflow: clip;
  }

  .hero.fit-scroll {
    height: auto;
    min-height: 100svh;
  }

  .hero-top > .micro {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .save-date {
    font-size: clamp(40px, 10vw, 60px);
    margin-top: 8px;
    letter-spacing: -2px;
  }

  .hero-stage {
    min-height: 0;
    margin-top: 16px;
    padding: 0 5px 30px;
    gap: 0 18px;
  }

  .names-wrap {
    margin-bottom: 20px;
  }

  .hero-invite {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .names {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    font-size: clamp(40px, 11vw, 60px);
    line-height: 1.4;
  }

  .amp {
    font-size: 26px;
    margin: 0;
  }

  .hero-english {
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero-stage .photo {
    width: min(33vw, 20svh);
    max-width: 175px;
    padding: 6px;
  }

  .photo-inner {
    aspect-ratio: 4/5;
  }

  .hero-rings {
    margin-top: 12px;
  }

  .photo figcaption {
    font-size: 11px;
    line-height: 1.35;
    padding: 7px 0 3px;
  }

  .hero-bottom {
    display: flex;
    align-items: center;
    justify-content:center  !important;
    gap: 0px !important;
  
}

  .hero-bottom > span:last-child {
    grid-row: 1;
    grid-column: 2;
  }

  .hero-bottom .scroll-hint {
    grid-row: 2;
    grid-column: 1/-1;
    min-height: 40px;
    margin: 0;
    padding: 4px 12px;
    font-size: 12px;
  }

  .ring-stage {
    height: 72svh;
    min-height: 360px;
    max-height: 500px;
  }

  .story-ring {
    width: clamp(200px, 60vw, 275px);
    top: 42%;
  }

  .ring-names {
    bottom: 10%;
    font-size: clamp(40px, 11vw, 52px);
  }

  .journey-petal {
    width: 20px;
  }

  .journey-petal:nth-child(2n) {
    width: 16px;
  }

  .journey-petal:nth-child(3n) {
    width: 24px;
  }

  .petal-desktop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petal-journey {
    display: none;
  }

  .story-ring {
    will-change: auto;
  }
}
