/* ==========================================================================
   Aanandini Heirlooms
   Palette, type and layout for the one-page site.
   ========================================================================== */

:root {
  --maroon:       #471016;
  --maroon-deep:  #3a0d12;
  --rose:         #6d2a30;
  --mauve:        #a7797c;
  --mauve-light:  #d9bfc0;
  --cream:        #f7f1e5;
  --cream-warm:   #efe2c6;
  --blush:        #e8d8d6;
  --ink:          #33161a;

  --serif-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --serif-body:    'Crimson Pro', Georgia, 'Times New Roman', serif;

  --gutter: 48px;
  --measure: 680px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rose); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus-visible { color: var(--mauve); }

:focus-visible { outline: 2px solid var(--mauve); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cream-warm); color: var(--maroon);
  padding: 12px 20px; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- shared -- */

.eyebrow {
  margin: 0;
  font-size: 14px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mauve);
}
.eyebrow--wide { font-size: 16px; letter-spacing: .22em; }

.display {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
  color: var(--maroon);
}
.display--sm { font-size: clamp(32px, 4vw, 46px); line-height: 1.15; }
.display--cream { color: var(--cream-warm); }

.body-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 20px;
  line-height: 1.65;
  font-weight: 300;
  text-wrap: pretty;
}
.body-copy p { margin: 0; }
.body-copy--cream { color: var(--blush); line-height: 1.6; gap: 18px; }

.rule { display: block; width: 56px; height: 1px; background: var(--mauve); }

.section { padding: 110px 24px 90px; }
.section--prose { display: flex; justify-content: center; }
.section--ruled {
  border-top: 1px solid rgba(71, 16, 22, .15);
  border-bottom: 1px solid rgba(71, 16, 22, .15);
  padding-bottom: 110px;
}

.prose {
  max-width: var(--measure);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pull-quote {
  margin: 18px 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--mauve);
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.4;
  color: var(--rose);
}

.closing-line {
  margin: 8px 0 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 28px);
  color: var(--rose);
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--maroon);
  display: flex;
  flex-direction: column;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px var(--gutter);
}

.nav__brand {
  font-family: var(--serif-display);
  font-variant: small-caps;
  letter-spacing: .18em;
  font-size: 17px;
  color: var(--cream-warm);
}
.nav__brand:hover { color: var(--mauve-light); }

.nav__links {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav__links a { color: var(--mauve-light); }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--cream-warm); }

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 40px 24px 80px;
  text-align: center;
}

.hero__logo { width: min(360px, 70vw); }

.hero__tagline {
  margin: 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--cream-warm);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--mauve);
  font-size: 20px;
  line-height: 1;
  padding: 10px;
  animation: drift 2.6s ease-in-out infinite;
}
.hero__scroll:hover { color: var(--cream-warm); }

@keyframes drift {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

/* -------------------------------------------------------------- gallery -- */

.gallery {
  padding: 0 var(--gutter) 110px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.gallery__item {
  position: relative;
  margin: 0;
  height: 420px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(167, 121, 124, .07) 0 8px,
      transparent 8px 16px
    ),
    rgba(167, 121, 124, .06);
}
.gallery__item--offset { margin-top: 48px; }

/* The placeholder sits behind the photograph, so an empty or still-loading
   frame reads as intentional rather than broken. A real image covers it. */
.gallery__item::before {
  content: attr(data-caption);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 19px;
  color: var(--mauve);
  text-align: center;
}

.gallery__item.is-empty { outline: 1px solid rgba(71, 16, 22, .18); outline-offset: -1px; }

.gallery__item img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .3, 1);
}
.gallery__item:hover img { transform: scale(1.04); }

/* The frames are portrait, so landscape photographs get cropped. Nudge the
   crop per frame with object-position when the centre isn't the best part. */
.gallery__item:nth-child(2) img { object-position: 34% center; }

/* --------------------------------------------------------------- invite -- */

.invite {
  background: var(--maroon);
  display: flex;
  justify-content: center;
  padding: 110px 24px;
}

.invite__inner {
  max-width: 620px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.invite__mark { width: 110px; opacity: .9; }

.signup {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.signup input {
  background: transparent;
  border: 1px solid rgba(239, 226, 198, .35);
  border-radius: 0;
  padding: 14px 18px;
  font-family: var(--serif-body);
  font-size: 18px;
  color: var(--cream-warm);
  outline: none;
  transition: border-color .2s ease;
}
.signup input::placeholder { color: rgba(247, 241, 229, .45); }
.signup input:focus { border-color: var(--cream-warm); }
.signup input:user-invalid { border-color: var(--mauve); }

.signup button {
  margin-top: 8px;
  background: var(--cream-warm);
  color: var(--maroon);
  border: none;
  padding: 16px 20px;
  font-family: var(--serif-body);
  font-size: 16px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.signup button:hover:not(:disabled) { background: var(--mauve); color: var(--cream); }
.signup button:disabled { opacity: .6; cursor: default; }

.signup__error {
  margin: 0;
  font-size: 17px;
  color: var(--mauve-light);
}

.signup__thanks {
  margin: 12px 0 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 26px;
  color: var(--cream-warm);
}

/* --------------------------------------------------------------- footer -- */

.footer {
  background: var(--maroon-deep);
  padding: 56px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  font-size: 17px;
  color: var(--mauve-light);
}
.footer__contacts a { color: var(--mauve-light); }
.footer__contacts a:hover { color: var(--cream-warm); }

.footer__place {
  margin: 0;
  font-size: 16px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mauve);
}

.footer__sign-off {
  margin: 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 20px;
  color: var(--blush);
}

/* ------------------------------------------------------------- motion --- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .3, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 90px;
  }
  .gallery__item { height: 340px; }
  .gallery__item:last-child { grid-column: 1 / -1; height: 300px; }
}

@media (max-width: 620px) {
  .nav {
    flex-direction: column;
    gap: 18px;
    padding: 24px var(--gutter);
  }
  .nav__links {
    gap: 20px;
    font-size: 13px;
    letter-spacing: .12em;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__inner { gap: 28px; padding: 24px 24px 90px; }

  .section { padding: 76px 24px 64px; }
  .section--ruled { padding-bottom: 76px; }
  .invite { padding: 80px 24px; }

  .body-copy { font-size: 18px; }
  .pull-quote { padding-left: 20px; }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 70px;
  }
  .gallery__item,
  .gallery__item:last-child { height: 300px; }
  .gallery__item--offset { margin-top: 0; }

  .footer__contacts { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
