@font-face {
  font-family: RetroSignatureRegular;
  font-weight: normal;
  font-style: normal;
  src: url("./assets/site/fonts/RetroSignatureRegular/RetroSignatureRegular.eot");
  src:
    url("./assets/site/fonts/RetroSignatureRegular/RetroSignatureRegular.eot?") format("eot"),
    url("./assets/site/fonts/RetroSignatureRegular/RetroSignatureRegular.woff") format("woff"),
    url("./assets/site/fonts/RetroSignatureRegular/RetroSignatureRegular.ttf") format("truetype"),
    url("./assets/site/fonts/RetroSignatureRegular/RetroSignatureRegular.svg#RetroSignatureRegular") format("svg");
}

@font-face {
  font-family: "Lustria Wedding";
  font-weight: normal;
  font-style: normal;
  src: url("./assets/site/fonts/lustria/lustria.eot");
  src:
    url("./assets/site/fonts/lustria/lustria.eot?") format("eot"),
    url("./assets/site/fonts/lustria/lustria.woff") format("woff"),
    url("./assets/site/fonts/lustria/lustria.ttf") format("truetype"),
    url("./assets/site/fonts/lustria/lustria.svg#lustriaregular") format("svg");
}

:root {
  --white: oklch(1 0 0);
  --paper: oklch(0.965 0.009 92);
  --paper-warm: oklch(0.92 0.028 84);
  --leaf: oklch(0.58 0.07 126);
  --leaf-soft: oklch(0.84 0.045 122);
  --leaf-deep: oklch(0.34 0.055 125);
  --clay: oklch(0.58 0.088 47);
  --coast: oklch(0.56 0.055 215);
  --ink: oklch(0.22 0.024 74);
  --muted: oklch(0.42 0.025 80);
  --line: color-mix(in oklch, var(--ink), transparent 84%);
  --veil: color-mix(in oklch, var(--leaf-deep), black 18%);
  --shadow-tight: 0 8px 18px rgba(38, 35, 28, 0.12);
  --z-sticky: 20;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--paper), var(--white) 40%, var(--paper) 100%);
  font-family: Optima, Candara, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  min-height: 74px;
  padding: 14px max(28px, env(safe-area-inset-right)) 14px max(28px, env(safe-area-inset-left));
  background: color-mix(in oklch, var(--paper), transparent 7%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.1);
}

.brand {
  color: var(--sage);
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--leaf-deep);
}

:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--leaf-deep), transparent 25%);
  outline-offset: 4px;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 74px);
  place-items: center;
  overflow: clip;
  isolation: isolate;
  background: var(--leaf-deep);
}

.hero-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(33, 42, 28, 0.68), rgba(33, 42, 28, 0.12) 47%, rgba(33, 42, 28, 0.42)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.02) 42%, rgba(0, 0, 0, 0.38)),
    url("./assets/site/home-casal.jpg") center 34% / cover no-repeat;
  transform: scale(1.02);
}

.hero-veils {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 38%;
  background:
    radial-gradient(80% 120% at 20% 100%, color-mix(in oklch, var(--clay), transparent 22%), transparent 58%),
    linear-gradient(0deg, color-mix(in oklch, var(--veil), transparent 8%), transparent);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: start;
  width: min(1120px, 100%);
  padding: clamp(70px, 9vw, 132px) max(22px, env(safe-area-inset-right)) clamp(86px, 9vw, 128px) max(22px, env(safe-area-inset-left));
  color: var(--white);
  text-align: left;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.monogram {
  margin: 0 0 18px;
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1;
}

h1,
h2,
p,
blockquote {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-family: RetroSignatureRegular, "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(76px, 13vw, 148px);
  font-weight: 400;
  line-height: 0.78;
  max-width: 9ch;
}

.date {
  margin: 24px 0 0;
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 3vw, 40px);
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.scroll-cue {
  position: absolute;
  right: max(22px, env(safe-area-inset-right));
  bottom: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.scroll-cue::after {
  width: 34px;
  height: 1px;
  background: currentColor;
  content: "";
  transform-origin: left center;
  animation: cue-line 1800ms ease-out infinite;
}

.countdown-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(26px, 5vw, 78px);
  align-items: end;
  padding: clamp(58px, 8vw, 106px) max(22px, env(safe-area-inset-right)) clamp(52px, 8vw, 96px) max(22px, env(safe-area-inset-left));
  background: var(--paper);
}

.section-kicker {
  margin: 0 0 16px;
  color: var(--leaf-deep);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.countdown-section h2,
.option-section h2,
.messages-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.04;
}

.countdown-copy p:not(.section-kicker) {
  max-width: 52ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 132px));
  gap: 10px;
  justify-content: end;
  margin: 0;
}

.countdown-grid span {
  display: grid;
  gap: 6px;
  min-height: 124px;
  place-items: center;
  padding: 18px 12px;
  border: 1px solid color-mix(in oklch, var(--leaf-deep), transparent 68%);
  background: linear-gradient(180deg, var(--leaf-deep), color-mix(in oklch, var(--leaf-deep), black 12%));
  color: var(--paper);
  box-shadow: var(--shadow-tight);
}

.countdown-grid strong {
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 400;
  line-height: 0.9;
}

.countdown-grid small {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.welcome-section,
.option-section,
.messages-section {
  padding: clamp(64px, 8vw, 112px) 22px;
}

.welcome-section {
  background:
    linear-gradient(90deg, color-mix(in oklch, var(--leaf-soft), transparent 34%), transparent 54%),
    var(--white);
}

.option-section {
  background: var(--white);
}

.section-shell {
  width: min(940px, 100%);
  margin: 0 auto;
  text-align: center;
}

blockquote {
  margin: 0 auto 22px;
  color: var(--leaf-deep);
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.14;
  text-transform: uppercase;
}

.section-shell > p:not(.section-kicker) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.option-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.option-menu a {
  display: grid;
  gap: 12px;
  min-height: 182px;
  align-content: space-between;
  padding: 22px;
  border: 1px solid color-mix(in oklch, var(--leaf-deep), transparent 72%);
  background:
    linear-gradient(145deg, color-mix(in oklch, var(--paper), var(--white) 38%), var(--white));
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.option-menu a:hover,
.option-menu a:focus-visible {
  border-color: var(--leaf-deep);
  background: var(--leaf-deep);
  color: var(--paper);
  transform: translateY(-2px);
}

.option-menu span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.option-menu a:hover span,
.option-menu a:focus-visible span {
  color: var(--leaf-soft);
}

.option-menu strong {
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.08;
}

.option-menu small {
  color: color-mix(in oklch, currentColor, transparent 16%);
  font-size: 14px;
  line-height: 1.45;
}

.messages-section {
  background:
    linear-gradient(180deg, var(--paper-warm), color-mix(in oklch, var(--leaf-soft), var(--white) 50%));
}

.message-form {
  display: grid;
  gap: 14px;
  width: min(640px, 100%);
  margin: 34px auto 30px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow-tight);
}

.message-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.message-form input,
.message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--paper), var(--white) 42%);
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.message-form input {
  min-height: 46px;
  padding: 0 14px;
}

.message-form textarea {
  min-height: 136px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

.message-form input:focus,
.message-form textarea:focus {
  outline: 2px solid rgba(116, 124, 85, 0.3);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  background: var(--leaf-deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  background: color-mix(in oklch, var(--leaf-deep), black 14%);
  transform: translateY(-1px);
}

.button--light {
  background: var(--paper);
  color: var(--leaf-deep);
}

.button--ghost {
  border: 1px solid color-mix(in oklch, var(--white), transparent 35%);
  background: transparent;
  color: var(--white);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: color-mix(in oklch, var(--white), transparent 86%);
  color: var(--white);
}

.message-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--leaf-deep);
  font-size: 14px;
  line-height: 1.4;
}

.message-carousel {
  display: grid;
  gap: 18px;
  width: min(780px, 100%);
  margin: 38px auto 0;
  padding: 28px;
  border: 1px solid color-mix(in oklch, var(--leaf-deep), transparent 78%);
  background:
    radial-gradient(85% 120% at 100% 0%, color-mix(in oklch, var(--coast), transparent 82%), transparent 54%),
    linear-gradient(135deg, var(--white), color-mix(in oklch, var(--paper), var(--white) 34%));
  box-shadow: var(--shadow-tight);
  text-align: left;
}

.message-carousel:empty {
  display: none;
}

.message-track {
  position: relative;
  min-height: 172px;
}

.message-item {
  display: none;
  margin: 0;
  padding: 0;
}

.message-item.is-active {
  display: block;
  animation: message-slide-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.message-item blockquote {
  margin: 0;
  color: var(--ink);
  font-family: "Lustria Wedding", Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.28;
  text-transform: none;
}

.message-item figcaption {
  margin-top: 18px;
  color: var(--leaf-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-carousel-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

.message-progress {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  overflow: hidden;
  background: color-mix(in oklch, var(--leaf-deep), transparent 82%);
}

.message-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--leaf-deep);
  transform-origin: left center;
}

.message-carousel.is-playing .message-progress span {
  animation: message-progress 6200ms linear both;
}

.message-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.message-control {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--leaf-deep), transparent 60%);
  background: transparent;
  color: var(--leaf-deep);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.message-control:hover,
.message-control:focus-visible {
  background: var(--leaf-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.message-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.message-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid var(--leaf-deep);
  background: transparent;
  cursor: pointer;
}

.message-dot[aria-current="true"] {
  background: var(--leaf-deep);
}

.site-footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 34px 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

body.is-ready .hero-photo {
  animation: hero-settle 1200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-ready .hero-copy > * {
  animation: copy-rise 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-ready .hero-copy > :nth-child(2) {
  animation-delay: 90ms;
}

body.is-ready .hero-copy > :nth-child(3) {
  animation-delay: 170ms;
}

body.is-ready .hero-copy > :nth-child(4) {
  animation-delay: 250ms;
}

[data-reveal] {
  transform: translateY(22px);
  opacity: 0.001;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 700ms ease;
}

[data-reveal].is-visible {
  transform: none;
  opacity: 1;
}

@keyframes hero-settle {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes copy-rise {
  from {
    transform: translateY(18px);
    opacity: 0;
    filter: blur(6px);
  }
  to {
    transform: none;
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes cue-line {
  0%,
  100% {
    transform: scaleX(0.55);
    opacity: 0.55;
  }
  45% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes message-slide-in {
  from {
    transform: translateY(10px);
    opacity: 0;
    filter: blur(4px);
  }
  to {
    transform: none;
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes message-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
  }

  .site-nav {
    justify-self: center;
    justify-content: center;
    font-size: 12px;
  }

  .hero {
    min-height: calc(100svh - 112px);
  }

  .hero-copy {
    align-self: end;
  }

  .countdown-section {
    grid-template-columns: 1fr;
  }

  .countdown-grid {
    justify-content: start;
  }

  .option-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .site-nav {
    gap: 8px 14px;
  }

  .hero-photo {
    background:
      linear-gradient(180deg, rgba(33, 42, 28, 0.03), rgba(33, 42, 28, 0.1) 38%, rgba(33, 42, 28, 0.8)),
      url("./assets/site/home-casal.jpg") center top / cover no-repeat;
  }

  .hero-copy {
    align-self: end;
    padding-top: 44px;
    padding-bottom: 86px;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(64px, 22vw, 86px);
    line-height: 0.76;
  }

  .monogram {
    margin-bottom: 12px;
  }

  .date {
    margin-top: 16px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 170px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 330px);
  }

  .option-menu {
    grid-template-columns: 1fr;
  }

  .option-menu a {
    min-height: 132px;
  }

  .welcome-section,
  .option-section,
  .messages-section {
    padding: 56px 16px;
  }

  .message-carousel {
    padding: 22px;
  }

  .message-track {
    min-height: 210px;
  }

  .message-carousel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .message-controls {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    transform: none;
    opacity: 1;
  }

  .message-item.is-active {
    animation: none;
  }

  .message-carousel.is-playing .message-progress span {
    animation: none;
  }
}
