:root {
  --text: #162850;
  --muted: #2c436e;
  --button: #86ba9c;
  --background: #f4e7e7;
  --blue: #414d6d;
  --form-bg: #fffdfd;
  --container: 1120px;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--background);
  scroll-behavior: smooth;
}

/* Ensure anchor targets have room below the sticky header */
section { scroll-margin-top: 96px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.navbar {
  position: sticky;
  top: 0;
  background: var(--background);
  padding: 1.25rem 0;
  z-index: 1000;
  box-shadow: 0 2px 0 rgba(0,0,0,0.04);
}

header.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 50px;
  font-family: serif;
}

.logo-mark img{
  height: 82px;
  position: relative;
  top: -15px;
}

.brand-text { opacity: 0.8; }

.main-nav a {
  color: var(--text);
  margin-left: 1.25rem;
  text-decoration: none;
  font-weight: 700;
}

.hero {
  padding: 3rem 0 2rem;
  background-color: var(--background);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-copy h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.date-row {
  display: grid;
  grid-auto-flow: column;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.date-row .dow { text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.date-row .day { font-size: 3rem; font-weight: 800; color: var(--text); }
.date-row .month { color: var(--muted); }

.hero-media {
  position: relative;
  display: grid;
  place-items: center;
}

.photo-circle {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: var(--form-bg);
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 700;
}

.ribbon {
  position: absolute;
  bottom: -28px;
  right: -40px;
  background: var(--button);
  padding: 0.75rem 2rem;
  transform: skewX(-12deg);
  border-radius: 6px;
}

.ribbon span {
  display: inline-block;
  transform: skewX(12deg);
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
}

.btn {
  background: var(--button);
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.btn-primary { box-shadow: 0 6px 0 rgba(0,0,0,0.08); }

section {
  padding: 4rem 2rem;
}

.blue-section {
  background-color: var(--blue);
  color: #f4e7e7;
}

/* Story section */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.photo-circle.large {
  width: 520px;
  height: 520px;
  border-width: 6px;
}

.story-card {
  background: rgba(255,255,255,0.6);
  border: 3px dashed var(--blue);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.75rem;
  margin: 1.25rem 0 0;
}

.story-card h3 {
  margin: 0 0 0.5rem;
}

.read-more {
  color: var(--button);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .photo-circle.large { width: 400px; height: 400px; }
}

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-photo { order: -1; margin-bottom: 1.5rem; }
}

/* Wishes section */
.wishes-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.wish-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--button);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  box-shadow: inset 0 0 0 3px var(--blue);
  margin: 1rem 0;
  position: relative;
  flex-wrap: wrap;
}

.wish-text {
  font-weight: 700;
  color: var(--text);
}

.wish-plus {
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}

.wish-plus:focus { outline: 2px solid var(--blue); outline-offset: 2px; }

.wish-card .wish-extra {
  width: 100%;
  margin-top: 0.75rem;
  color: var(--text);
  font-weight: 400;
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}

.wish-card.is-open .wish-extra { max-height: 400px; }

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

/* Info section */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.info-content .center { text-align: right; }

.info-block {
  text-align: right;
  margin: 1.25rem 0;
}

@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; }
  .info-photo { order: -1; margin-bottom: 1.5rem; }
}

/* Ceremony section */
.ceremony { text-align: center; }
.ceremony .photo-circle { margin: 0 auto; }
.ceremony-details p { margin: 0.5rem 0; }

/* Program section */
.program-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.program-item { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; margin: 1rem 0; }
.program-icon { font-size: 2rem; opacity: 0.8; }
.program-time { color: var(--button); font-weight: 900; font-size: 1.6rem; }

@media (max-width: 900px) {
  .program-grid { grid-template-columns: 1fr; }
  .program-photo { order: 2; }
}

/* Final form section */
.subtitle { color: var(--muted); margin-top: -0.5rem; }
.center { text-align: center; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.form-card {
  background: var(--form-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.actions { text-align: right; }
.actions button { min-width: 140px; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-photo { order: -1; margin-bottom: 1.5rem; }
}

.columns {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

form {
  background: var(--form-bg);
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input, form textarea, form select {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: var(--button);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.timeline {
  list-style: none;
  padding: 0;
}

.timeline li {
  margin: 1rem 0;
}

.timeline span {
  font-weight: bold;
  display: inline-block;
  width: 80px;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; margin-bottom: 2rem; }
}

/* Center hero content on mobile */
@media (max-width: 900px) {
  .hero-copy { text-align: center; }
  .date-row { justify-content: center; }
}

/* Mobile header/menu fixes */
@media (max-width: 900px) {
  header.navbar .container { flex-direction: column; align-items: center; gap: 0.5rem; }
  .main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.75rem; }
  .main-nav a { margin: 0 0.5rem; }
  .logo-mark img { height: 72px; top: -16px; }
}

/* Center photos on mobile */
@media (max-width: 900px) {
  .hero-media,
  .story-photo,
  .wishes-photo,
  .info-photo,
  .program-photo,
  .form-photo { justify-self: center; }
  .photo-circle { margin-left: auto; margin-right: auto; }
}

/* Modals */
.modal { position: fixed; inset: 0; display: none; padding: 1.5rem; z-index: 2000; }
.modal.is-open { display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); z-index: 0; }
.modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  background: var(--form-bg);
  color: var(--text);
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  animation: modalIn .24s ease-out;
}
.modal-dialog h3 { margin: 0 2rem 0.75rem 0; }
.modal-content { line-height: 1.6; }
.modal-close {
  position: absolute; right: 10px; top: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--background); color: var(--text);
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 1.25rem; cursor: pointer;
}
.modal-close:hover { filter: brightness(0.98); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
