:root {
  --bg: #f7f2e9;
  --bg-raise: #fffcf6;
  --ink: #453b32;
  --ink-soft: #8c7d6c;
  --hair: #e4d6bc;
  --sand: #c9a877;
  --sand-deep: #a8804c;
  --sea: #8ba3aa;
  --sea-deep: #6d8890;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--sea-deep);
}

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

::selection {
  background: var(--sand);
  color: #fff;
}

.eyebrow {
  font-family: "Jost", "Helvetica Neue", sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.script {
  font-family: "Alex Brush", cursive;
  font-weight: 400;
  line-height: 1.06;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 4.5rem);
  background: rgba(247, 242, 233, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-color: var(--hair);
}

.nav .mono {
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
}

.nav .links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.navlink {
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.navlink.active {
  color: var(--ink);
}

.navlink.rsvp {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.65rem 1.4rem;
  border-radius: 1px;
}

.navlink.rsvp:hover {
  background: var(--ink);
  color: var(--bg-raise);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}

.nav-mobile-panel {
  display: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: -35%;
  height: 170%;
  background: radial-gradient(ellipse 900px 640px at 50% 46%, rgba(40, 46, 45, 0.2), transparent 62%),
    linear-gradient(180deg, #e9edec 0%, #cddadb 22%, #a7bcc0 42%, #93a9a6 56%, #b7ab8a 72%, #e3d2ac 100%);
  background-image: url("../images/hero-beach.jpg");
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  will-change: transform;
}

/* Narrow phones: the couple sits left-of-center in the source photo, so a
   centered crop pushes Sheryl off the left edge. Shift the crop left. */
@media (max-width: 560px) {
  .hero-bg {
    background-position: 30% 20%;
  }
}

/* Tablets in landscape are wide-but-short, which crops from the top and
   clips Jeano's head. Show more headroom. */
@media (min-width: 700px) and (max-height: 1000px) and (orientation: landscape) {
  .hero-bg {
    background-position: center 8%;
  }
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(ellipse 900px 640px at 50% 46%, rgba(35, 40, 39, 0.22), transparent 62%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 242, 233, 0.3) 0%, transparent 18%, transparent 80%, rgba(247, 242, 233, 0.38) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
  padding: 0 1.5rem;
  max-width: 60rem;
}

.hero-names {
  color: #fffcf6;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.75rem;
}

.hero-headline {
  color: #fffcf6;
  font-size: clamp(2.3rem, 9.5vw, 7.2rem);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.22);
  margin: 0;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  margin-top: 2.1rem;
  flex-wrap: wrap;
}

.hero-meta span {
  color: #fffcf6;
  font-size: 0.78rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.hero-meta .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.7);
}

.placeholder-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 252, 246, 0.85);
  border: 1px dashed var(--sand-deep);
  border-radius: 2px;
  padding: 0.5rem 0.85rem;
  max-width: calc(100vw - 3rem);
}

.placeholder-tag svg {
  flex: none;
}

.placeholder-tag span {
  font-size: 0.62rem;
  color: var(--ink-soft);
}

/* ---------- intro ---------- */
.intro {
  padding: clamp(5rem, 10vw, 8rem) 1.5rem clamp(4rem, 8vw, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro .eyebrow {
  color: var(--ink-soft);
}

.intro .script {
  font-size: clamp(2rem, 5vw, 3.9rem);
  max-width: 44rem;
  margin-top: 1.6rem;
}

.rule {
  width: 4rem;
  height: 1px;
  background: var(--hair);
  margin-top: 2.4rem;
}

/* ---------- details ---------- */
.details {
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(5rem, 9vw, 7.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.detail-card {
  text-align: center;
  padding: 2.6rem 1.5rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--bg-raise);
}

.detail-card svg {
  margin: 0 auto 1.1rem;
}

.detail-card .eyebrow {
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.detail-card .value {
  font-size: 1.7rem;
  font-weight: 500;
}

.detail-card .sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0.4rem;
}

.details-cta {
  display: flex;
  justify-content: center;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(5rem, 9vw, 7.5rem);
  margin-top: -1.25rem;
}

/* ---------- rsvp ---------- */
.rsvp-section {
  background: linear-gradient(180deg, #eef1ee, #e8ebe5);
  padding: clamp(5rem, 9vw, 7.5rem) 1.5rem clamp(5.5rem, 10vw, 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-section .eyebrow {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.rsvp-section .script {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  margin: 0 0 0.7rem;
}

.rsvp-lede {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.15rem;
  max-width: 32rem;
  text-align: center;
  margin: 0 0 3rem;
}

.rsvp-card {
  width: 100%;
  max-width: 38rem;
  background: var(--bg-raise);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: clamp(1.5rem, 5vw, 3.4rem);
  box-shadow: 0 24px 60px rgba(69, 59, 50, 0.08);
}

.field {
  margin-bottom: 1.7rem;
}

.field label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.field input[type="text"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  padding: 0.7rem 0.2rem;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--sea-deep);
}

.field textarea {
  resize: none;
}

.attend-row {
  display: flex;
  gap: 1rem;
}

.attend-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  cursor: pointer;
}

.attend-option.yes {
  border-color: var(--sand-deep);
}

.attend-option input {
  accent-color: var(--sea-deep);
}

.attend-option span {
  font-size: 0.72rem;
}

.attend-option.checked {
  background: rgba(139, 163, 170, 0.08);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

.submit-btn {
  width: 100%;
  padding: 1.05rem;
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fffcf6;
  background: var(--sea-deep);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover {
  background: #5c757c;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- album ---------- */
.album-header {
  padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem clamp(3.5rem, 7vw, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.album-header .eyebrow {
  color: var(--ink-soft);
}

.album-header .script {
  font-size: clamp(2.4rem, 6vw, 5rem);
  margin: 1.4rem 0 0;
}

.album-header p {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 1.1rem;
  max-width: 32rem;
  margin: 1.3rem 0 0;
}

.gallery {
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(5rem, 9vw, 7.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 16rem;
  gap: 1.5rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border: 1.5px dashed var(--sand-deep);
  border-radius: 2px;
}

.tile span {
  font-size: 0.68rem;
  color: #fffcf6;
  opacity: 0.92;
}

.tile.light span {
  color: var(--ink-soft);
}

/* ---------- information page ---------- */
.info-grid {
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.info-card {
  text-align: center;
  padding: 2.6rem 2rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--bg-raise);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-card svg {
  margin-bottom: 1.1rem;
}

.info-card .eyebrow {
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.info-card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.info-card-time {
  color: var(--sand-deep);
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

.info-card-address {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 0.9rem;
  line-height: 1.5;
}

.info-card-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  max-width: 26rem;
  margin: 0.9rem 0 0;
}

.directions {
  position: relative;
  margin-top: 1.5rem;
}

.btn-directions {
  display: inline-block;
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.7rem 1.5rem;
  border-radius: 1px;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-directions:hover {
  background: var(--ink);
  color: var(--bg-raise);
}

.directions-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  min-width: 10rem;
  background: var(--bg-raise);
  border: 1px solid var(--hair);
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(69, 59, 50, 0.14);
  padding: 0.35rem;
}

.directions-menu a {
  display: block;
  padding: 0.65rem 0.9rem;
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 1px;
}

.directions-menu a:hover {
  background: rgba(139, 163, 170, 0.1);
}

.travel-section {
  padding: clamp(3rem, 7vw, 5rem) 1.5rem clamp(4rem, 8vw, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, #eef1ee, #e8ebe5);
}

.travel-section .eyebrow {
  color: var(--ink-soft);
}

.travel-section .script {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 1.1rem 0 2.5rem;
}

.travel-visual {
  width: 100%;
  max-width: 40rem;
}

.travel-label {
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  fill: var(--ink);
}

.travel-estimate {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin: 2rem 0 0.4rem;
}

.travel-note {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
  max-width: 28rem;
  margin: 0;
}

.dress-code-section {
  padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4.5rem) clamp(5rem, 9vw, 7.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dress-code-section .eyebrow {
  color: var(--ink-soft);
}

.dress-code-section .script {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 1.1rem 0 2.5rem;
}

.dress-code-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 60rem;
  text-align: left;
}

.dress-code-palette {
  width: 100%;
}

.dress-code-text p {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 1.1rem;
}

.dress-code-text p:last-child {
  margin-bottom: 0;
}

.placeholder-copy {
  color: var(--sand-deep) !important;
  font-style: italic;
  font-size: 0.9rem !important;
  border: 1px dashed var(--sand-deep);
  border-radius: 2px;
  padding: 0.85rem 1rem;
}

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

  .dress-code-body {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dress-code-text {
    text-align: left;
  }
}

/* ---------- footer ---------- */
footer {
  padding: 3.5rem 1.5rem;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

footer .mono {
  font-family: "Jost", sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
}

footer .sub {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .details {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .nav .links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-mobile-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--hair);
    flex-direction: column;
    padding: 0.5rem clamp(1.25rem, 5vw, 4.5rem) 1.5rem;
    gap: 1.1rem;
  }

  .nav-mobile-panel.open {
    display: flex;
  }

  .nav-mobile-panel .navlink {
    padding: 0.5rem 0;
  }

  .nav-mobile-panel .navlink.rsvp {
    display: inline-block;
    width: fit-content;
  }
}

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

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 13rem;
  }

  .tile[style*="span 2"] {
    grid-row: span 1 !important;
  }

  .two-col,
  .attend-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero {
    min-height: 100svh;
  }
}
