@font-face {
  font-family: "American Oak Script";
  src: url("assets/fonts/american-oak-script.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #111111;
  --charcoal: #2b2b2b;
  --grey-dark: #555555;
  --grey: #8a8a8a;
  --grey-light: #d8d8d8;
  --off-white: #f7f6f4;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Instrument Sans", sans-serif;
  color: var(--charcoal);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 28px 6vw;
  background: transparent;
  transition: background-color 0.4s ease, padding 0.4s ease,
    box-shadow 0.4s ease;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navbar__link {
  position: relative;
  display: inline-block;
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  padding-bottom: 6px;
  text-shadow: 0 2px 20px rgba(247, 246, 244, 0.85);
  transition: text-shadow 0.4s ease;
}

.navbar__link-underline {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.navbar__link:hover .navbar__link-underline {
  width: 100%;
}

.navbar--solid {
  background: var(--off-white);
  padding: 18px 6vw;
}

.navbar--solid .navbar__link {
  text-shadow: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  top: -18%;
  left: 0;
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  will-change: transform;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 10vh 6vw 6vh;
  will-change: transform, opacity;
}

.hero__title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  text-transform: none;
}

.eyebrow.hero__subtitle {
  margin-top: -6px;
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2vw, 2.5rem);
  letter-spacing: 0.2em;
}

.hero__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero__meta-item {
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: none;
}

.eyebrow {
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--grey-dark);
}

.rule {
  width: 40px;
  height: 1px;
  background: var(--black);
  border: none;
  margin: 22px 0 26px;
}

.names {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--black);
  text-transform: uppercase;
}

.hero__title.names {
  font-family: "American Oak Script", cursive;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Invite ---------- */

.invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 11vh 6vw 12vh;
  background: var(--white);
  border-top: 1px solid var(--grey-light);
}

.monogram {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.monogram__letter {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--black);
}

.monogram__divider {
  width: 1px;
  height: 46px;
  background: var(--black);
}

.invite .eyebrow {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.invite .rule {
  width: 50px;
  margin: 26px auto 34px;
}

.invite__note {
  margin-top: 42px;
  max-width: 620px;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--grey-dark);
}

.countdown {
  display: flex;
  align-items: center;
  gap: 44px;
  margin-top: 2px;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
}

.countdown__number {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  line-height: 1;
  color: var(--black);
}

.countdown__label {
  margin-top: 12px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}

.countdown__divider {
  width: 1px;
  height: 46px;
  background: var(--grey-light);
}

/* ---------- Gallery ---------- */

.gallery {
  overflow: hidden;
  padding: 10vh 0;
  background: var(--off-white);
}

.gallery__track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  animation: gallery-scroll 55s linear infinite;
}

.gallery__item {
  flex: 0 0 auto;
  width: 230px;
  height: 500px;
  border-radius: 999px;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes gallery-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14vh 6vw 10vh;
}

.footer__heading {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.2;
  color: var(--black);
}

.footer .rule {
  width: 50px;
  margin: 30px auto;
}

.footer__note {
  max-width: 440px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--grey-dark);
}

.footer__signature {
  margin-top: 40px;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--grey);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .navbar {
    padding: 20px 6vw;
  }

  .navbar--solid {
    padding: 14px 6vw;
  }

  .hero {
    min-height: 100svh;
  }

  .hero__image {
    object-position: 52% center;
  }

  .hero__content {
    min-height: 100svh;
    padding: 9vh 8vw 6vh;
  }

  .hero__meta {
    flex-direction: column;
    gap: 10px;
  }

  .hero__title.names {
    white-space: nowrap;
    font-size: 10vw;
  }

  .eyebrow.hero__subtitle {
    margin-top: 4px;
    font-size: 4.6vw;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }

  .hero .eyebrow {
    color: var(--black);
  }

  .rule {
    margin: 20px auto 24px;
  }

  .invite {
    min-height: 100svh;
    padding: 9vh 8vw 10vh;
  }

  .monogram__letter {
    font-size: 2.4rem;
  }

  .monogram__divider {
    height: 32px;
  }

  .countdown {
    gap: 14px;
  }

  .countdown__item {
    min-width: 44px;
  }

  .gallery {
    padding: 7vh 0;
  }

  .gallery__track {
    gap: 14px;
  }

  .gallery__item {
    width: 140px;
    height: 300px;
  }

  .footer {
    padding: 11vh 8vw 9vh;
  }
}

@media (max-width: 420px) {
  .countdown {
    gap: 8px;
  }

  .countdown__number {
    font-size: 15vw;
  }

  .countdown__label {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__track {
    animation: none;
  }
}
