/* ==========================================================================
   Hannah & Louay — Oct 2nd, 2027
   Palette + type lifted straight from the PDF.
   ========================================================================== */

@font-face {
  font-family: "Lovelace";
  src: url("../fonts/Lovelace/LovelaceRegular.otf") format("truetype");
}

:root {
  --blue: #c3dbff;
  --olive: #8a8635;
  --orange: #f65c33;
  --salmon: #ff8362;
  --pink: #fce4de;
  --cream: #fcf5eb;
  --brown: #594a47;

  --font-display: "Lovelace", "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-arabic: "Markazi Text", "Noto Naskh Arabic", serif;

  --max: 1100px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 10vw, 7rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--brown);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
figure {
  margin: 0;
}
a {
  color: inherit;
}
p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
.display-sm {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}
.center {
  text-align: center;
}
[x-cloak] {
  display: none !important;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1em;
  margin: 0 0 0.25rem;
}

/* ---------- Layout ---------- */

.section {
  padding: var(--section-y) var(--pad);
  position: relative;
}
.split {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.split__text {
  max-width: 30rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.2s;
}
.btn:hover {
  background: var(--cream);
  color: var(--olive);
  transform: translateY(-2px);
}
.btn--dark {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}
.btn--dark:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--cream);
}

.link-pill {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}
.link-pill:hover {
  background: var(--cream);
  color: var(--orange);
}

/* ---------- Photo frames ---------- */

/* The arch: rounded top, square bottom, with a thin offset outline. */
.arch {
  position: relative;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
}
.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px 999px 0 0;
  padding: 0.5rem;
}
.arch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--brown);
  pointer-events: none;
}
.arch--hero {
  width: 100%;
  aspect-ratio: 339 / 420;
  justify-self: end;
}
.arch--card {
  width: 100%;
  aspect-ratio: 182 / 230;
  margin-bottom: 1.25rem;
}

/* The square frame with a thin border and inner gap. */
.frame {
  position: relative;
  aspect-ratio: 1;
  padding: 6px;
  border: 1px solid;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--olive {
  border-color: var(--olive);
}
.frame--cream {
  border-color: var(--cream);
}

/* ---------- Star ---------- */
.star {
  display: inline-block;
}

.star img {
  height: 1em;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem var(--pad);
  /* mix-blend-mode: multiply; */
  /* font-size: 1rem;
  letter-spacing: 0.15em; */
  /* text-transform: uppercase; */
}
.nav a {
  pointer-events: auto;
  text-decoration: none;
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: none;
}
.nav__brand span {
  font-style: italic;
  font-weight: 400;
}
.nav__links {
  position: relative;
  display: flex;
  gap: 1.5rem;
}
.nav__links a {
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav__links a:hover,
.nav__links a.is-active {
  opacity: 1;
}
/* one underline that slides between links (positioned by navSpy in main.js) */
.nav__underline {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  pointer-events: none;
}
.nav__links.is-ready .nav__underline {
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1),
    width 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* ---------- 1. Hero ---------- */

.hero {
  background: var(--blue);
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__text {
  text-align: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  margin: 0 0 2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.35em;
}
.hero__word {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.hero__word small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  margin-top: 0.4rem;
  opacity: 0.8;
}
.hero__word--ar {
  font-family: var(--font-arabic);
  font-weight: 700;
  direction: rtl;
}
.hero__dot {
  align-self: flex-start;
  margin-top: 0.05em;
}
.hero__meta {
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
}
.hero__names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0;
}

/* ---------- 2. Quote ---------- */

.quote {
  background: var(--olive);
  color: var(--cream);
}
.quote__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.quote__text {
  text-align: center;
  max-width: 28em;
  margin: 0 auto;
}
.quote__text p {
  font-size: 0.95em;
}

/* ---------- 3. Details ---------- */

.details {
  background: var(--orange);
  color: var(--cream);
  text-align: center;
}
.cards {
  max-width: 900px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}
.card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
.card p {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}
.card .arch::after {
  border-color: var(--cream);
}

/* ---------- 4. Expect / 7. Clash ---------- */

.expect,
.clash {
  background: var(--salmon);
  color: var(--cream);
}
.expect .split__text {
  text-align: center;
  margin: 0 auto;
}

/* ---------- 5. CTA ---------- */

.cta {
  background: var(--olive);
  color: var(--cream);
  text-align: center;
}
.cta .display {
  margin-bottom: 2rem;
}
.cta__note {
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

/* ---------- 6. FAQ ---------- */

.faq {
  background: var(--orange);
  color: var(--cream);
}
.accordion {
  max-width: 820px;
  margin: 2rem auto 0;
}
.accordion details {
  border-bottom: 1px solid var(--cream);
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 2.5rem 0.85rem 0;
  font-size: 0.95rem;
  position: relative;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.25s;
  height: 1rem;
  width: 1rem;
  background-image: url("../img/star.svg");
  background-size: cover;
  background-repeat: no-repeat;
}
.accordion details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.accordion__body {
  padding: 0 0 1.25rem;
  font-size: 0.9rem;
  max-width: 60ch;
}
.accordion__body a {
  text-decoration: underline;
}

/* ---------- 7. Clash columns ---------- */

.clash__columns {
  max-width: var(--max);
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  font-size: 0.92rem;
}
.clash__columns em {
  font-style: italic;
  font-weight: 500;
}

/* ---------- 8. Schedule ---------- */

.schedule {
  background: var(--blue);
}
.timeline {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 3rem clamp(1rem, 5vw, 3rem) 3.5rem;
  border: 1px solid var(--brown);
  border-radius: 999px 999px 0 0;
  text-align: center;
  position: relative;
}
.timeline .star img {
  height: 3em;
}
.timeline .star--top {
  margin-bottom: 2rem;
}
.timeline .star--bottom {
  margin-top: 2.5rem;
}
.timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  text-align: left;
}
/* each step is centred, then nudged left/right of the middle by --x for the zig-zag */
.timeline__list li {
  display: flex;
  align-items: flex-end;
  gap: 3rem;
  align-self: center;
  position: relative;
}
.timeline__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 0.95;
  text-transform: uppercase;
  position: relative;
}
.timeline__label i {
  font-style: normal;
  display: block;
  padding-left: 0.9em;
}
.timeline__label small {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.3em;
  text-transform: none;
  padding-left: 3.4em;
  margin-top: 0.15rem;
}
.timeline__time {
  font-family: var(--font-display);
  font-weight: 600;
}
.timeline__time--left {
  padding-right: 0.5rem;
}

/* ---------- 9. Fun-Bun ---------- */

.funbun {
  background: var(--olive);
  overflow: hidden;
  min-height: 80vh;
  color: var(--cream);
}
.funbun__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
.funbun__text {
  position: relative;
}
.funbun__hint {
  font-size: 0.95rem;
  max-width: 24rem;
}
.funbun__arrow {
  display: block;
  font-size: 3rem;
  color: var(--orange);
  transform: rotate(-20deg);
  margin: 1rem 0 0 4rem;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge {
  0%,
  100% {
    transform: rotate(-20deg) translate(0, 0);
  }
  50% {
    transform: rotate(-20deg) translate(-6px, 8px);
  }
}
.funbun__stage {
  position: relative;
  aspect-ratio: 1;
  max-height: 70vh;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.funbun__stage.is-grabbing {
  cursor: grabbing;
}
.funbun__stage canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.naam-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.naam {
  position: absolute;
  font-family: var(--font-arabic);
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  direction: rtl;
  will-change: transform, opacity;
  animation: naam-pop 2.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  transform-origin: center;
}
@keyframes naam-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(0.3);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      rotate(var(--r)) scale(1);
  }
}
.funbun__sketch {
  position: absolute;
  z-index: 1;
  mix-blend-mode: multiply;
  opacity: 0.85;
  pointer-events: none;
}
.funbun__sketch--1 {
  left: 3%;
  top: 8%;
  width: 70px;
  transform: rotate(-4deg);
}
.funbun__sketch--2 {
  left: 12%;
  top: 6%;
  width: 120px;
  transform: rotate(6deg);
}
.funbun__hand {
  position: absolute;
  right: -2%;
  bottom: -4%;
  width: clamp(180px, 26vw, 320px);
  z-index: 1;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ---------- 10. RSVP ---------- */

.rsvp {
  background: var(--cream);
}
.rsvp__lead {
  margin-bottom: 2.5rem;
}
.form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form .btn {
  align-self: center;
  margin-top: 0.5rem;
}
.form__status {
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.4em;
  margin: 0;
}
.rsvp__decline {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}
.rsvp__decline a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- ☭ Easter egg ---------- */

/* "our wedding" in the Details heading – looks like the rest of the heading */
.egg {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.egg:hover {
  color: #ffd200;
}
.egg:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.comrades {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  pointer-events: none; /* the page stays usable underneath */
  background: rgba(200, 16, 46, 0.55);
}
.comrades__title {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.35em;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.3em 0.55em;
  transform: translate(-50%, -50%) rotate(-4deg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  line-height: 1;
  text-align: center;
  color: #ffd200;
  background: #c8102e;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: title-fade 0.9s ease-out both;
}
/* hammer & sickle: its space is there from the start, it just shows up after 2s */
.comrades__sickle {
  font-family:
    "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", sans-serif;
  font-weight: 400;
  font-size: 1.5em;
  line-height: 1;
  animation: sickle-in 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) 2s both;
}
.comrades__title em {
  font-style: normal;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.1em;
}
.comrades__title--out {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.comrades__title--gone {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-4deg) scale(1.3);
}
@keyframes title-fade {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-4deg) scale(0.94);
  }
}
@keyframes sickle-in {
  from {
    opacity: 0;
    transform: rotate(-90deg) scale(0.2);
  }
}
.poster {
  --pw: clamp(140px, 22vw, 250px);
  position: absolute;
  left: calc(var(--x) * (100% - var(--pw)));
  top: calc(var(--y) * (100% - var(--pw) * 4 / 3));
  width: var(--pw);
  aspect-ratio: 3 / 4;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--r));
  animation: poster-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.poster--red {
  background: #c8102e;
}
.poster--cream {
  background: #f3e3c3;
}
/* black & white photo multiplied onto the paper = instant duotone */
.poster img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.35);
  mix-blend-mode: multiply;
}
.poster__star {
  position: absolute;
  top: -0.35em;
  left: -0.2em;
  font-size: calc(var(--pw) * 0.28);
  line-height: 1;
  color: #ffd200;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.poster figcaption {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(var(--pw) * 0.062);
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.45em 0.5em;
  background: #1a1a1a;
  color: #f3e3c3;
}
.poster--cream figcaption {
  background: #c8102e;
}
@keyframes poster-pop {
  from {
    opacity: 0;
    transform: rotate(var(--r)) scale(0.3);
  }
}
.comrades__stop {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  pointer-events: auto;
  font: 700 0.85rem/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: #c8102e;
  color: #ffd200;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.comrades__stop:hover {
  background: #1a1a1a;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 3rem var(--pad);
  font-size: 0.85rem;
}
.footer .star {
  margin-bottom: 1rem;
}
.footer__small {
  opacity: 0.6;
  font-size: 0.75rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .funbun__arrow {
    animation: none;
  }
  .nav__links.is-ready .nav__underline {
    transition: none;
  }
  .poster,
  .comrades__title {
    animation: none;
  }
  .comrades__sickle {
    animation: sickle-in 0.01s 2s both;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 3rem;
  }
  .arch--hero {
    justify-self: center;
    width: min(80%, 320px);
  }
  .split,
  .quote__inner,
  .clash__columns,
  .funbun__inner {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  .frame {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
  .quote__inner figure {
    order: 2;
  }
  .quote__inner .quote__text {
    order: 1;
  }
  .funbun__hand {
    width: 160px;
    right: -6%;
    bottom: -2%;
  }
  .funbun__sketch {
    display: none;
  }
  .funbun__stage {
    max-height: 60vh;
  }
  .timeline__list li {
    left: calc(var(--x, 0) * 0.5);
  }
}

@media (max-width: 520px) {
  .nav__links {
    gap: 1rem;
  }
  .nav__links a:not(.nav__cta) {
    display: none;
  }
  .hero__title {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }
  .hero__dot {
    display: none;
  }
  .timeline {
    border-radius: 300px 300px 0 0;
  }
}
