/* ==========================================================================
   Daniel & Raya — Wedding Site
   Mediterranean coastal, sun-bleached villa
   ========================================================================== */

:root {
  --sand-light: #FBF6EC;
  --sand: #EFE4CD;
  --ink: #16323D;
  --clay: #E38B63;
  --clay-dark: #C46E48;
  --lavender: #F2EDFA;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-width: 720px;
  --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; }

/* ---------- Base ---------- */
body {
  background: var(--sand-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--sand-light);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  transition: top 0.15s ease;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.link {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.link:hover { color: var(--clay-dark); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: var(--container-width); }

.section {
  padding: 4.5rem 0;
}
.section--tint {
  background: var(--lavender);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.85rem;
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px;
  height: 3px;
  background: var(--clay);
  border-radius: 2px;
}

.section__lede {
  margin-bottom: 2rem;
  color: var(--ink);
}

.prose p + p,
.prose h3 {
  margin-top: 1.25rem;
}
.prose p { max-width: 60ch; }
.prose__placeholder {
  color: var(--ink);
  opacity: 0.55;
  font-style: italic;
}

.callout {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--lavender);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius);
}
.section--tint .callout { background: var(--sand-light); }

.venue__photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button--primary {
  background: var(--clay);
  color: var(--sand-light);
}
.button--primary:hover { background: var(--clay-dark); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(22, 50, 61, 0.08);
}
.nav__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__mark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--sand-light);
  border-bottom: 1px solid rgba(22, 50, 61, 0.08);
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav__menu.is-open {
  max-height: 400px;
}
.nav__menu a {
  padding: 0.9rem 1.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-top: 1px solid rgba(22, 50, 61, 0.06);
}
.nav__menu a:hover { color: var(--clay); }

@media (min-width: 720px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    flex-direction: row;
    max-height: none;
    overflow: visible;
    background: none;
    border: none;
  }
  .nav__menu a {
    border: none;
    padding: 0.4rem 0;
    margin-left: 2rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22, 50, 61, 0.55), rgba(22, 50, 61, 0.75)),
    url("assets/venue-view-pool.jpg") center 65% / cover no-repeat;
  color: var(--sand-light);
  padding: 6rem 1.5rem 5.5rem;
  text-align: center;
  overflow: hidden;
}
.hero__wave {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 60px;
  fill: var(--sand-light);
}
.hero__content {
  max-width: 640px;
  margin: 0 auto;
  animation: hero-rise 0.8s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .hero__content { animation: none; }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__date {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--sand);
  margin-bottom: 1.25rem;
}
.hero__names {
  font-size: clamp(2.75rem, 9vw, 5rem);
  color: var(--sand-light);
  margin-bottom: 1.5rem;
}
.hero__amp {
  font-style: italic;
  color: var(--clay);
  padding: 0 0.15em;
}
.hero__welcome {
  font-size: 1.1rem;
  color: var(--sand);
  max-width: 46ch;
  margin: 0 auto 2.25rem;
}

/* ---------- Timeline (The Weekend) ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.timeline__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(22, 50, 61, 0.1);
}
.timeline__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.timeline__date {
  font-family: var(--font-display);
  color: var(--clay);
  font-size: 1.1rem;
  line-height: 1.3;
}
.timeline__date span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.6;
}
.timeline__body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.timeline__body p {
  color: var(--ink);
  opacity: 0.85;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion__item {
  border-bottom: 1px solid rgba(22, 50, 61, 0.12);
  padding: 1.1rem 0;
}
.accordion__item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: "+";
  font-family: var(--font-body);
  color: var(--clay);
  font-size: 1.3rem;
  margin-left: 1rem;
}
.accordion__item[open] summary::after { content: "\2212"; }
.accordion__item p {
  margin-top: 0.85rem;
}

/* ---------- RSVP form ---------- */
.rsvp-form {
  flex-direction: column;
  gap: 1.25rem;
}
.rsvp-form:not([hidden]) {
  display: flex;
}
.rsvp-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.rsvp-thanks {
  padding: 1.5rem;
  background: var(--sand-light);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.section--tint .rsvp-thanks { background: #fff; }
.rsvp-thanks[hidden] { display: none; }
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field label,
fieldset.field legend {
  font-size: 0.9rem;
  font-weight: 600;
}
.req { color: var(--clay); }

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--sand-light);
  border: 1px solid rgba(22, 50, 61, 0.25);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.section--tint input[type="text"],
.section--tint input[type="number"],
.section--tint input[type="date"],
.section--tint textarea {
  background: var(--sand-light);
}
textarea { resize: vertical; }

fieldset.field {
  border: none;
}
.field--attending {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.field--attending legend {
  width: 100%;
  margin-bottom: 0.15rem;
}
.radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}
.radio input { width: 18px; height: 18px; accent-color: var(--clay); }

.attending-fields {
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--sand-light);
  border-radius: var(--radius);
  border: 1px solid rgba(22, 50, 61, 0.1);
}
.attending-fields:not([hidden]) {
  display: flex;
}
.section--tint .attending-fields { background: #fff; }

.field-group {
  gap: 1rem;
  padding: 1rem;
  background: var(--sand);
  border-radius: var(--radius);
}
.field-group__title {
  font-size: 0.9rem;
  font-weight: 600;
}
.section--tint .field-group,
.attending-fields .field-group { background: var(--lavender); }

.rsvp-form .button { align-self: flex-start; }
.rsvp-form__status {
  font-size: 0.9rem;
  color: var(--clay-dark);
  min-height: 1.2em;
}

/* ---------- Footer ---------- */
.footer {
  background:
    linear-gradient(180deg, rgba(22, 50, 61, 0.8), rgba(22, 50, 61, 0.88)),
    url("assets/venue-garden-twilight.jpg") center / cover no-repeat;
  color: var(--sand);
  padding: 3rem 0;
  text-align: center;
}
.footer__names {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sand-light);
  margin-bottom: 0.75rem;
}
.footer .prose__placeholder {
  color: var(--sand);
  opacity: 0.6;
}
.footer__hashtag {
  margin-top: 0.5rem;
}

/* ---------- Optional client-side gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  background: var(--ink);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}
.gate:not([hidden]) {
  display: flex;
}
.gate[hidden] {
  display: none;
}
.gate__form {
  max-width: 360px;
  width: 100%;
  text-align: center;
  color: var(--sand-light);
}
.gate__eyebrow {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.gate__form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--sand);
}
.gate__form input {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 246, 236, 0.3);
  background: rgba(251, 246, 236, 0.08);
  color: var(--sand-light);
  margin-bottom: 1rem;
  text-align: center;
}
.gate__form button {
  width: 100%;
  padding: 0.75rem;
  background: var(--clay);
  color: var(--sand-light);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
.gate__hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--clay);
  min-height: 1.2em;
}

body.is-gated #site { display: none; }
