/* ==========================================================================
   Marta & Garth — design tokens + global reset
   ========================================================================== */

:root {
  --butter: #f5f5b5;
  --cream: #faf8f3;
  --pastel-blue: #b6d2f8;
  --cocoa: #443b38;
  --ink: #1a1412;
  --cherry: #9b2044;
  --rickrack-red: #a50f18;
  --stone: #8a7d76;
  --prose: #3f3632;

  --rule-nav: rgba(26, 20, 18, 0.1);
  --rule-section: rgba(26, 20, 18, 0.18);
  --rule-on-blue: rgba(68, 59, 56, 0.2);

  --font-script: "Caveat", cursive;
  --font-label: "Cormorant Garamond", serif;
  --font-body: "Lora", serif;

  --nav-height: 60px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(64px, 9vw, 104px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--butter);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  opacity: 0.55;
}

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

[id] {
  scroll-margin-top: var(--nav-height);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob1 {
  0%, 100% { transform: rotate(-12deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-8px); }
}

@keyframes bob2 {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50% { transform: rotate(14deg) translateY(-7px); }
}

@keyframes bob4 {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(9deg) translateY(-9px); }
}

/* Scroll reveal — JS toggles .is-visible on [data-reveal] elements */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Shared pieces
   ========================================================================== */

.section {
  padding: var(--section-pad) var(--gutter);
}

.section-heading {
  font-family: var(--font-script);
  font-size: clamp(52px, 7vw, 72px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  margin: 0;
}

.label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0;
}

.label--small {
  font-size: 12px;
}

.body-copy {
  font-size: 17px;
  color: var(--prose);
  text-wrap: pretty;
  margin: 0;
}

.button-cta {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--rickrack-red);
  color: white;
  padding: 14px 44px;
  border-radius: 100px;
}

.button-cta:hover {
  opacity: 0.85;
}

/* Placeholder for a link that isn't live yet */
.button-cta--soon,
.button-cta--soon:hover {
  opacity: 0.55;
  cursor: default;
}

.button-cta--small {
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 10px 24px;
  white-space: nowrap;
}

.button-outline {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  padding: 10px 26px;
  border-radius: 100px;
}

/* ==========================================================================
   Hand-drawn frame — script.js draws an <svg> into every [data-frame]
   ========================================================================== */

[data-frame] {
  --frame-stroke: var(--cocoa);
  --frame-fill: var(--cream);
  position: relative;
  isolation: isolate;
}

[data-frame-fill="blue"] {
  --frame-fill: var(--pastel-blue);
}

.frame__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--frame-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frame__outer {
  fill: var(--frame-fill);
}

.frame__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--frame-stroke);
  pointer-events: none;
  z-index: 1;
}

.frame__dot--tl { left: 3px; top: 3px; transform: translate(-50%, -50%); }
.frame__dot--tr { right: 3px; top: 3px; transform: translate(50%, -50%); }
.frame__dot--br { right: 3px; bottom: 3px; transform: translate(50%, 50%); }
.frame__dot--bl { left: 3px; bottom: 3px; transform: translate(-50%, 50%); }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-height);
  background: rgba(245, 245, 181, 0.97);
  border-bottom: 1px solid var(--rule-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
}

.nav__logo {
  --frame-stroke: var(--ink);
  --frame-fill: none;
  font-family: var(--font-script);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 20px 7px;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(12px, 2.6vw, 32px);
}

.nav__link {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav__link--cta {
  background: var(--rickrack-red);
  color: white;
  padding: 8px 22px;
  border-radius: 100px;
}

.nav__link--cta:hover {
  opacity: 0.85;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle-bar {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 16px clamp(16px, 4vw, 48px) 56px;
}

.hero__stage {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  aspect-ratio: 2 / 1;
  container-type: inline-size;
}

.hero__stage img {
  position: absolute;
}

.hero__garth-face {
  left: 6%;
  top: 11.5%;
  width: 13.5%;
}

.hero__marta-word {
  left: 27.5%;
  top: 10.5%;
  width: 28%;
}

.hero__heart--top {
  left: 72.5%;
  top: 11%;
  width: 3.6%;
  animation: bob2 4.4s ease-in-out infinite;
}

.hero__marta-face {
  left: 81.5%;
  top: 24.5%;
  width: 13.5%;
}

.hero__amp {
  position: absolute;
  left: 34%;
  top: 41.5%;
  font-family: var(--font-script);
  font-size: 9.5cqw;
  font-weight: 700;
  line-height: 0.9;
  color: var(--ink);
  user-select: none;
}

.hero__garth-word {
  left: 49.5%;
  top: 43.5%;
  width: 26.5%;
}

.hero__they-love {
  left: 25.5%;
  top: 80%;
  width: 47%;
}

.hero__heart--left {
  left: 10.5%;
  top: 74.5%;
  width: 3.2%;
  animation: bob1 5s ease-in-out infinite;
}

.hero__heart--right {
  left: 79.5%;
  top: 80%;
  width: 3.2%;
  animation: bob4 4.2s ease-in-out 1s infinite;
}

.hero__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 8px;
  text-align: center;
  animation: fadeUp 0.9s ease 0.4s both;
}

.hero__date {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}

/* ==========================================================================
   Welcome
   ========================================================================== */

.welcome {
  background: var(--pastel-blue);
  color: var(--cocoa);
  padding: clamp(56px, 8vw, 96px) var(--gutter);
}

.welcome__inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome__frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(32px, 5vw, 52px) clamp(20px, 4vw, 48px);
}

.welcome__heading {
  font-family: var(--font-script);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 18px;
}

.welcome__lead {
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 32px;
  text-wrap: balance;
}

.welcome__facts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
}

@media (max-width: 560px) {
  .welcome__facts {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.welcome__fact {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}

.welcome__fact-label {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cherry);
  margin-bottom: 8px;
}

.welcome__fact-value {
  font-size: 17px;
  margin: 0;
}

/* ==========================================================================
   The Weekend
   ========================================================================== */

.weekend .section-heading {
  margin-bottom: 48px;
}

.weekend__grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.weekend__card {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weekend__title {
  font-family: var(--font-script);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.weekend__note {
  font-size: 15px;
  font-style: italic;
  color: var(--stone);
  margin: 0;
}

/* ==========================================================================
   Venue
   ========================================================================== */

.photo-divider {
  position: relative;
  height: clamp(240px, 40vw, 480px);
  overflow: hidden;
}

.photo-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(26, 20, 18, 0.45), rgba(26, 20, 18, 0.15) 70%);
  pointer-events: none;
}

.photo-divider__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-divider__text {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(88%, 760px);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 3px rgba(26, 20, 18, 0.55));
}

.venue {
  padding: clamp(56px, 8vw, 88px) var(--gutter);
}

.venue__grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 40px;
  align-items: center;
}

.venue__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.venue__heading {
  font-family: var(--font-script);
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.venue__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.venue__address {
  font-size: 17px;
  margin: 0;
}

/* ==========================================================================
   Travel & Stay
   ========================================================================== */

.stay {
  background: var(--cream);
}

.stay__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.stay__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.stay__lede {
  max-width: 560px;
}

.stay__getting-there {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.stay__way {
  color: var(--cocoa);
  padding: 34px 38px;
}

.stay__way-label {
  margin-bottom: 4px;
  color: var(--ink);
}

.stay__way-copy {
  font-size: 16px;
  margin: 0;
}

.stay__hotels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hotel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  background: white;
  border-radius: 6px;
  padding: 16px;
}

.hotel__photo {
  flex: 0 1 200px;
  min-width: 160px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
}

.hotel__body {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hotel__name {
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.hotel__note {
  font-size: 15px;
  color: var(--prose);
  text-wrap: pretty;
  margin: 0;
}

.hotel__book {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.hotel__price {
  font-size: 20px;
}

.hotel__per {
  font-size: 14px;
  color: var(--stone);
}

.stay__footnote {
  font-size: 15px;
  color: var(--prose);
  text-wrap: pretty;
  margin: 8px 0 0;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.faq__list {
  border-top: 1px solid var(--rule-section);
}

.faq__item {
  border-bottom: 1px solid var(--rule-section);
}

.faq__question {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--ink);
}

.faq__question:hover {
  opacity: 0.55;
}

.faq__question:focus-visible {
  outline: 2px solid var(--cherry);
  outline-offset: 2px;
}

.faq__icon {
  font-family: var(--font-script);
  font-size: 34px;
  line-height: 1;
  color: var(--cherry);
  flex: none;
  width: 24px;
  text-align: center;
}

.faq__answer {
  font-size: 17px;
  color: var(--prose);
  text-wrap: pretty;
  padding: 0 4px 24px;
  margin: 0;
}

/* ==========================================================================
   Registry
   ========================================================================== */

.registry {
  background: var(--pastel-blue);
}

.registry__card {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 64px) clamp(28px, 6vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.registry__cta {
  padding: 14px 40px;
  margin-top: 6px;
}

/* ==========================================================================
   RSVP
   ========================================================================== */

.poem {
  background: var(--cream);
}

.poem__inner {
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poem__author {
  font-family: var(--font-label);
  font-size: 20px;
  font-style: italic;
  color: var(--stone);
  margin: 12px 0 clamp(32px, 5vw, 44px);
}

.poem__text {
  align-self: stretch;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.9;
  color: var(--prose);
  margin: 0;
}

.poem__line {
  display: block;
  padding-left: 1.25em;
  text-indent: -1.25em;
}

.rsvp {
  padding: clamp(72px, 10vw, 120px) var(--gutter);
  text-align: center;
}

.rsvp__inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.rsvp__heart {
  width: 56px;
  transform: rotate(-10deg);
}

.rsvp__heading {
  font-size: clamp(52px, 7vw, 76px);
}

.rsvp__cta {
  padding: 14px 48px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--cream);
  color: var(--ink);
  padding: clamp(56px, 7vw, 80px) var(--gutter) clamp(48px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer__names {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(36px, 4vw, 44px);
  font-weight: 700;
  line-height: 1;
}

.footer__meta {
  margin: 18px 0 0;
  text-wrap: balance;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cocoa);
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */

@media (max-width: 640px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--butter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--rule-nav);
    display: none;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid var(--rule-nav);
  }

  .nav__link--cta {
    align-self: center;
    margin: 16px 0;
    padding: 8px 22px;
    border-top: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__stage img {
    animation: none !important;
  }
}

/* Heart and flower buttons scattered by script.js */
[data-buttons] {
  position: relative;
  overflow-x: clip;
}

.scatter-button {
  position: absolute;
  width: var(--size);
  height: auto;
  transform: rotate(var(--rot));
  filter: drop-shadow(1px 2px 1.5px rgba(68, 59, 56, 0.28));
  pointer-events: none;
  user-select: none;
}

.scatter-button--left {
  left: var(--x);
}

.scatter-button--right {
  right: var(--x);
}

@media (max-width: 640px) {
  .scatter-button {
    width: calc(var(--size) * 0.7);
  }

  .scatter-button--left {
    left: -10px;
  }

  .scatter-button--right {
    right: -10px;
  }
}

/* Red rickrack trim straddling each section seam */
.rickrack {
  height: 28px;
  margin: -14px 0;
  position: relative;
  z-index: 2;
  background-image: url('art/rickrack.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 28px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .rickrack {
    height: 20px;
    margin: -10px 0;
    background-size: auto 20px;
  }
}
