:root {
  --navy: #10233f;
  --navy-2: #162f55;
  --green: #183d32;
  --green-2: #275344;
  --brown: #c8a87d;
  --brown-2: #a98458;
  --cream: #f7f1e8;
  --ivory: #fffaf1;
  --ink: #15202c;
  --muted: #6f655a;
  --line: rgba(24, 61, 50, 0.16);
  --shadow: 0 24px 70px rgba(16, 35, 63, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  color: var(--ivory);
  background: rgba(16, 35, 63, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(200, 168, 125, 0.24);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--navy);
  background: var(--brown);
  border-radius: 50%;
  font-size: 0.75rem;
  overflow: hidden;
}

.brand-mark img {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
}

.nav-links a {
  font-size: 0.9rem;
  color: rgba(255, 250, 241, 0.78);
}

.nav-links a:hover {
  color: var(--brown);
}

.hero {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr);
  align-items: stretch;
  background:
    linear-gradient(125deg, rgba(16, 35, 63, 0.94), rgba(24, 61, 50, 0.9)),
    radial-gradient(circle at 15% 15%, rgba(200, 168, 125, 0.36), transparent 36%);
  color: var(--ivory);
}

.hero-media {
  min-height: 34rem;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background:
    linear-gradient(rgba(16, 35, 63, 0.1), rgba(16, 35, 63, 0.36)),
    url("https://images.unsplash.com/photo-1519689680058-324335c77eba?auto=format&fit=crop&w=1400&q=85")
      center/cover;
}

.photo-frame {
  display: grid;
  width: min(24rem, 88vw);
  aspect-ratio: 4 / 5;
  place-items: center;
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  color: var(--ivory);
  background: rgba(16, 35, 63, 0.42);
  border: 1px solid rgba(255, 250, 241, 0.5);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cross {
  display: grid;
  width: 5.5rem;
  height: 5.5rem;
  place-items: center;
  color: var(--brown);
  font-family: "Cormorant Garamond", serif;
  font-size: 5rem;
  line-height: 1;
}

.bear-illustration {
  width: min(21rem, 78vw);
  height: auto;
  align-self: end;
  filter: drop-shadow(0 16px 22px rgba(16, 35, 63, 0.28));
}

.photo-frame p {
  margin: 0;
  max-width: 12rem;
  font-weight: 600;
}

.hero-copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 6rem);
}

.eyebrow,
.label {
  margin: 0 0 0.8rem;
  color: var(--brown);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
}

h1 {
  max-width: none;
  color: var(--ivory);
  font-size: clamp(3.2rem, 8vw, 7.8rem);
  font-weight: 700;
}

h1 .child-name {
  color: var(--brown);
}

.child-name {
  white-space: nowrap;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.mobile-break {
  display: none;
}

.mobile-copy-break {
  display: none;
}

h2 {
  max-width: 12ch;
  color: var(--navy);
  font-size: clamp(2.5rem, 5vw, 4.9rem);
}

h3 {
  color: var(--green);
  font-size: 1rem;
}

.hero-background-bear {
  position: absolute;
  right: max(-5rem, -8vw);
  bottom: 4rem;
  z-index: -1;
  width: min(39vw, 34rem);
  max-height: 82%;
  object-fit: contain;
  object-position: bottom center;
  opacity: 0.92;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.24));
}

.hero-text {
  max-width: 36rem;
  margin: 2.6rem 0 0;
  color: rgba(255, 250, 241, 0.78);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-actions,
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.8rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: var(--navy);
  background: var(--brown);
}

.button.secondary {
  color: var(--green);
  background: var(--ivory);
  border-color: var(--line);
}

.intro-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem clamp(1rem, 5vw, 5rem);
  background: var(--green);
  color: var(--ivory);
}

.intro-band strong {
  display: block;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  gap: 0.75rem;
  min-width: min(31rem, 100%);
}

.countdown span {
  padding: 0.8rem;
  text-align: center;
  background: rgba(255, 250, 241, 0.08);
  border: 1px solid rgba(200, 168, 125, 0.22);
}

.countdown strong {
  color: var(--brown);
  font-size: 1.4rem;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 5rem);
}

.split-section,
.location-section,
.rsvp-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(20rem, 1.18fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.section p {
  max-width: 40rem;
  color: var(--muted);
}

.keepsake-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  background: var(--ivory);
}

.keepsake-card {
  display: grid;
  grid-template-columns: minmax(7rem, 0.75fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(16, 35, 63, 0.08);
}

.keepsake-card img {
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}

.keepsake-card .keepsake-bear {
  max-height: 20rem;
  filter: drop-shadow(0 12px 18px rgba(16, 35, 63, 0.18));
}

.keepsake-card span {
  display: block;
  color: var(--brown-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.keepsake-card strong {
  display: block;
  margin-top: 0.5rem;
  color: var(--green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.horse-accent {
  position: absolute;
  right: clamp(1rem, 6vw, 5rem);
  bottom: 1.5rem;
  width: min(10rem, 24vw);
  opacity: 0.92;
  pointer-events: none;
}

.horse-accent img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(16, 35, 63, 0.16));
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

.detail-card,
.family-grid article,
.map-panel,
.rsvp-form {
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(16, 35, 63, 0.08);
}

.detail-card {
  padding: 1.25rem;
  border-radius: 8px;
}

.icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--navy);
  background: rgba(200, 168, 125, 0.34);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 900;
}

.detail-card p,
.detail-card small {
  display: block;
  margin: 0.5rem 0 0;
}

.detail-card p {
  color: var(--navy);
  font-weight: 800;
}

.detail-card small {
  color: var(--muted);
}

.schedule-section {
  background: var(--cream);
}

.schedule-section h2 {
  margin-bottom: 2rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  max-width: 54rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.timeline-item time {
  color: var(--brown-2);
  font-weight: 900;
}

.timeline-item p {
  margin: 0.35rem 0 0;
}

.map-panel {
  display: grid;
  min-height: 22rem;
  place-items: center;
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.9), rgba(255, 253, 248, 0.9)),
    repeating-linear-gradient(45deg, var(--navy), var(--navy) 1px, transparent 1px, transparent 18px);
}

.map-pin {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  color: var(--ivory);
  background: var(--green);
  border-radius: 50%;
  font-weight: 900;
}

.family-section {
  background: var(--navy);
  color: var(--ivory);
}

.family-section h2 {
  color: var(--ivory);
  max-width: none;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.family-grid article {
  padding: 1.4rem;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.08);
  border-color: rgba(200, 168, 125, 0.24);
}

.family-grid span {
  display: block;
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.family-grid strong {
  display: block;
  margin-top: 0.6rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.15;
}

.form-status {
  min-height: 1.5rem;
  font-weight: 800;
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: #9b2f2f;
}

.rsvp-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(16, 35, 63, 0.16);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  color: var(--ink);
  background: var(--ivory);
  font: inherit;
  font-size: 1rem;
}

textarea {
  resize: vertical;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 5vw, 5rem);
  color: var(--ivory);
  background: var(--green);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--brown);
  font-weight: 800;
}

.mobile-rsvp-bar {
  display: none;
}

body.has-scrolled .mobile-rsvp-bar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }

  .split-section,
  .location-section,
  .rsvp-section,
  .keepsake-section {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 850px) {
  body {
    padding-bottom: 5.5rem;
  }

  .site-header {
    position: sticky;
    top: 0;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .site-header,
  .intro-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    width: 100%;
  }

  .nav-links {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .nav-links a {
    display: grid;
    min-height: 2.4rem;
    place-items: center;
    padding: 0 0.75rem;
    text-align: center;
    background: rgba(255, 250, 241, 0.08);
    border: 1px solid rgba(200, 168, 125, 0.18);
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
  }

  .nav-links a[href="#rsvp"] {
    color: var(--navy);
    background: var(--brown);
    border-color: var(--brown);
  }

  .hero,
  .keepsake-section,
  .split-section,
  .location-section,
  .rsvp-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 21rem;
    order: 2;
    padding: 1.25rem;
  }

  .hero-copy {
    order: 1;
    min-height: calc(100svh - 8rem);
    padding: 2.4rem 1.15rem;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.9rem, 13.2vw, 5.2rem);
  }

  .hero-copy .eyebrow {
    margin-bottom: 2.15rem;
  }

  .mobile-break {
    display: block;
  }

  .mobile-copy-break {
    display: block;
  }

  .hero-background-bear {
    right: -3.2rem;
    bottom: 11.2rem;
    width: min(62vw, 18rem);
    max-height: 58%;
    opacity: 0.55;
  }

  h2 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 12vw, 3.6rem);
  }

  .hero-text {
    margin-top: 2.1rem;
  }

  .hero-actions {
    margin-top: 3.6rem;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .photo-frame {
    width: min(19rem, 82vw);
  }

  .bear-illustration {
    width: min(17.5rem, 76vw);
  }

  .mobile-rsvp-bar {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 1rem;
    z-index: 999;
    display: grid;
    min-height: 3.4rem;
    place-items: center;
    color: var(--navy);
    background: var(--brown);
    border: 1px solid rgba(255, 250, 241, 0.4);
    border-radius: 999px;
    box-shadow: 0 18px 46px rgba(16, 35, 63, 0.35);
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
    transition: opacity 180ms ease, transform 180ms ease;
  }
}

@media (max-width: 520px) {
  .intro-band {
    padding: 1.3rem 1rem;
  }

  .countdown {
    width: 100%;
    gap: 0.55rem;
  }

  .countdown span {
    padding: 0.7rem 0.4rem;
    font-size: 0.82rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .detail-card,
  .keepsake-card,
  .family-grid article,
  .map-panel,
  .rsvp-form {
    box-shadow: 0 12px 28px rgba(16, 35, 63, 0.08);
  }

  .keepsake-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .keepsake-card img {
    max-height: 13rem;
  }

  .keepsake-card .keepsake-bear {
    max-height: 18rem;
  }

  .horse-accent {
    position: static;
    width: min(12rem, 58vw);
    margin: -1.5rem auto 0;
  }

  .button {
    width: 100%;
  }

  .map-actions {
    width: 100%;
  }

}
