/* Amber & Matt — values taken from reference/source-design.html */

@font-face {
  font-family: 'Auto Signature';
  src: url('/fonts/AutoSignature.ttf') format('truetype');
  font-display: swap;
}

:root {
  --burgundy: #902b25;
  --burgundy-dark: #6e1f1b;
  --pink: #ec977d;
  --body-size: clamp(18px, 2vw, 21px);
  --serif: 'adobe-garamond-pro', 'Adobe Garamond Pro', 'EB Garamond', Garamond, serif;
}

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

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--burgundy);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--burgundy-dark); }
a:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }

picture { display: contents; }
img { display: block; }

@keyframes writeOn {
  from { clip-path: inset(-20% 100% -20% 0); }
  to { clip-path: inset(-20% 0 -20% 0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 0;
  transition: opacity .3s ease, transform .3s ease;
}
.site-nav.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}
.site-nav a {
  padding: 1px 0;
  font-size: 12.5px;
  line-height: 1.25;
  letter-spacing: .1em;
  text-transform: lowercase;
  text-decoration: none;
  font-weight: 400;
}
.site-nav a[aria-current='page'] { font-weight: 600; }

/* ---------- Page shell ---------- */

.page {
  padding: 84px clamp(20px, 5vw, 56px) 0;
}

/* ---------- Welcome ---------- */

.welcome {
  margin-top: -84px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vh, 20px);
  padding: 84px 0;
  animation: fadeUp .6s ease both;
}
.welcome__stack { display: grid; place-items: center; }
.welcome__strip {
  grid-area: 1 / 1;
  position: relative;
  height: min(62vh, 600px, 110vw);
  aspect-ratio: 721 / 3804;
  overflow: hidden;
  background: #ffffff;
}
.welcome__strip img { width: 100%; height: 100%; object-fit: cover; }
.welcome__lettering {
  grid-area: 1 / 1;
  position: relative;
  top: clamp(24px, 5vh, 56px);
  width: min(80vw, 640px);
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  pointer-events: none;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 14px);
  margin: clamp(8px, 2vh, 24px) 0 0;
}
.countdown__num {
  font-family: 'Nothing You Could Do', cursive;
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1;
  color: var(--pink);
  -webkit-text-stroke: .5px var(--pink);
  opacity: .9;
  transform: rotate(-4deg);
  letter-spacing: .02em;
  text-align: center;
  clip-path: inset(-20% 100% -20% 0);
  animation: writeOn 1.1s cubic-bezier(.45, .05, .4, 1) .9s forwards;
}
.countdown__label {
  height: clamp(38px, 5vw, 52px);
  width: auto;
  margin-top: clamp(6px, 1vw, 10px);
  clip-path: inset(-20% 100% -20% 0);
  animation: writeOn 1.6s cubic-bezier(.45, .05, .4, 1) 2s forwards;
}

/* ---------- The Day / Info ---------- */

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(0px, 2vw, 24px) 0 96px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp .45s ease both;
}

.venue { width: min(70%, 300px); height: auto; margin: 0 auto; }

.heading {
  margin: 56px 0 0;
  line-height: 0;
  display: flex;
  justify-content: center;
  font-weight: 400;
}
.heading img {
  height: clamp(62px, 8.5vw, 88px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.heading--page { margin: 0; }
.heading--page img { height: clamp(84px, 12vw, 124px); }
.heading--after-venue { margin-top: 80px; }
.heading--after-title { margin-top: 40px; }
/* Used only when a heading has no handwritten PNG */
.heading--text {
  font-family: 'Auto Signature', 'Nothing You Could Do', cursive;
  font-size: clamp(48px, 7vw, 64px);
  line-height: 1.2;
}

.body {
  margin: 18px 0 0;
  font-size: var(--body-size);
  line-height: 1.65;
  text-wrap: pretty;
}
.heading + .body { margin-top: 14px; }
.body--light { margin-top: 20px; font-weight: 300; }

.detail {
  margin: 18px 0 0;
  font-size: 14px;
  font-style: italic;
  letter-spacing: .04em;
  line-height: 1.6;
}
.detail--lg { font-size: 15px; }
.detail b { font-weight: 600; font-style: normal; }

.dress-code { margin: 14px 0 0; font-size: 16px; line-height: 1.65; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; justify-content: center; }
.swatch { width: 22px; height: 22px; border-radius: 50%; }

.sublabel {
  margin: 40px 0 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: normal;
}
.sublabel--spaced { margin-top: 64px; }

.contact { margin: 56px 0 0; font-size: 15px; font-style: italic; letter-spacing: .04em; }

.content--centred { min-height: 60vh; justify-content: center; }

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

@media (prefers-reduced-motion: reduce) {
  .welcome, .content { animation: none; }
  .countdown__num, .countdown__label { animation: none; clip-path: none; }
  .site-nav { transition: none; }
}

/* ---------- Welcome gate ---------- */

.gate {
  min-height: calc(100vh - 84px);
  margin-top: -84px;
  padding: 84px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeUp .6s ease both;
}
.gate__title {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .02em;
}
.gate__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(28px, 5vh, 48px);
  width: min(100%, 320px);
}
.gate__label { font-size: 15px; font-style: italic; letter-spacing: .04em; line-height: 1.6; }
.gate__input {
  width: 100%;
  border: 0;
  border-bottom: .5px solid var(--burgundy);
  border-radius: 0;
  background: transparent;
  padding: 6px 4px;
  font: 18px/1.4 var(--serif);
  color: var(--burgundy);
  text-align: center;
  letter-spacing: .04em;
}
.gate__input:focus { outline: none; border-bottom-width: 1px; }
.gate__button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  font: 600 12.5px/1.25 var(--serif);
  letter-spacing: .1em;
  text-transform: lowercase;
  color: var(--burgundy);
}
.gate__button:hover { color: var(--burgundy-dark); }
.gate__button:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.gate__error { margin: 0; font-size: 15px; font-style: italic; line-height: 1.6; }
.gate__error[hidden] { display: none; }

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