/* ============================================================
   Parhar Wedding — main.css
   Palette: deep burgundy (#7b1c3b), warm gold (#c9974a),
            ivory (#fdf8f2), charcoal (#2c2c2c)
   ============================================================ */

/* ── Self-hosted fonts ─────────────────────────────────────── */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --burgundy:   #7b1c3b;
  --burgundy-dk:#5e1530;
  --gold:       #c9974a;
  --gold-lt:    #e8c98a;
  --ivory:      #fdf8f2;
  --ivory-dk:   #f3ece0;
  --charcoal:   #2c2c2c;
  --mid-grey:   #6b6b6b;
  --border:     #ddd0bc;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Lato", system-ui, sans-serif;

  --max-width: 1060px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--burgundy); }
a:hover { color: var(--burgundy-dk); }

/* ── Nav ──────────────────────────────────────────────────── */
header {
  background: var(--burgundy);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

nav {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-lt);
  text-decoration: none;
  padding: 1rem 1.5rem 1rem 0;
  margin-right: auto;
  font-family: var(--font-serif);
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: .875rem;
  letter-spacing: .03em;
  padding: 1.1rem .85rem;
  transition: color .15s, background .15s;
}

.nav-links a:hover {
  color: var(--gold-lt);
  background: rgba(255,255,255,.08);
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

/* Animated × when open */
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Main content area ────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-size: 2rem;
  color: var(--burgundy);
  margin-bottom: .5rem;
  letter-spacing: .02em;
}

h2 {
  font-size: 1.35rem;
  color: var(--burgundy);
  margin: 1.75rem 0 .5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .3rem;
}

h3 {
  font-size: 1.05rem;
  color: var(--charcoal);
  margin: 1.25rem 0 .3rem;
}

p { margin-bottom: .9rem; }

ul, ol {
  margin: 0 0 1rem 1.5rem;
}

li { margin-bottom: .35rem; }

section { margin-bottom: 2.5rem; }

/* ── Decorative page header ───────────────────────────────── */
.page-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.4rem;
  color: var(--burgundy);
}

.page-header p {
  color: var(--mid-grey);
  font-style: italic;
  margin: .3rem 0 0;
}

/* ── Home page hero ───────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 2rem 4.5rem;
  background:
    radial-gradient(ellipse at center, rgba(253,248,242,.6) 0%, rgba(253,248,242,.0) 70%),
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 40px,
      rgba(201,151,74,.07) 40px,
      rgba(201,151,74,.07) 80px
    ),
    linear-gradient(160deg, var(--ivory-dk) 0%, var(--ivory) 60%, #f5e9d4 100%);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 3.2rem;
  font-style: italic;
  line-height: 1.2;
  color: var(--burgundy);
}

.hero .subtitle {
  color: var(--mid-grey);
  font-style: italic;
  font-size: 1.15rem;
  margin: .6rem 0 1.8rem;
  font-family: var(--font-sans);
}

.hero .cta {
  display: inline-block;
  background: var(--burgundy);
  color: #fff;
  padding: .8rem 2.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s;
}

.hero .cta:hover { background: var(--burgundy-dk); color: #fff; }

/* ── Feature grid (home page) ────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--charcoal);
  transition: box-shadow .2s, transform .2s;
}

.feature-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
  color: var(--charcoal);
}

.feature-card-icon {
  font-size: 1.8rem;
  margin-bottom: .5rem;
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1rem;
  color: var(--burgundy);
  margin: .4rem 0 .3rem;
}

.feature-card p {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--mid-grey);
  margin: 0;
}

/* ── Two-column grid layout ───────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── Timeline (schedule page) ─────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--gold);
  margin-bottom: 2.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.55rem;
  top: .4rem;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-date {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .2rem;
}

.timeline-item h2 {
  font-size: 1.25rem;
  border: none;
  padding: 0;
  margin: 0 0 .3rem;
}

.timeline-item p {
  margin-bottom: .5rem;
}

/* ── FAQ accordion (details/summary) ─────────────────────── */
.faq-section {
  margin-bottom: 2rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  padding: .9rem 2rem .9rem 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--charcoal);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1;
  transition: transform .25s ease;
}

.faq-item[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item > p,
.faq-item > div {
  padding: .2rem 0 1rem;
  color: var(--mid-grey);
  font-size: .97rem;
}

/* ── Scroll animations ────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
  }

  .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Cards (schedule events) ─────────────────────────────── */
.event-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.event-card h2 {
  border: none;
  padding: 0;
  margin-top: 0;
  font-size: 1.25rem;
}

.event-card .event-meta {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--mid-grey);
  margin-bottom: .6rem;
}

.event-card .event-description {
  font-style: italic;
  color: var(--mid-grey);
  font-size: .95rem;
}

/* ── RSVP status table ────────────────────────────────────── */
.rsvp-status-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: .9rem;
  margin: .8rem 0 1rem;
}

.rsvp-status-table th {
  text-align: left;
  padding: .45rem .7rem;
  background: var(--ivory-dk);
  border-bottom: 2px solid var(--border);
  color: var(--mid-grey);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rsvp-status-table td {
  padding: .45rem .7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.rsvp-status-table tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.badge--pending  { background: #fef3cd; color: #856404; }
.badge--attending{ background: #d1e7dd; color: #0a5438; }
.badge--declined { background: #f8d7da; color: #842029; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .5rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.4;
}

.btn--primary {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
}

.btn--primary:hover {
  background: var(--burgundy-dk);
  border-color: var(--burgundy-dk);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}

.btn--secondary:hover {
  background: var(--ivory-dk);
  color: var(--burgundy-dk);
}

/* default .btn (no modifier — used in dashboard) */
.event-card .btn {
  background: var(--burgundy);
  color: #fff;
  border-color: var(--burgundy);
  font-size: .82rem;
  padding: .4rem 1rem;
}

.event-card .btn:hover {
  background: var(--burgundy-dk);
  border-color: var(--burgundy-dk);
  color: #fff;
}

/* ── Forms ────────────────────────────────────────────────── */
form p { margin-bottom: .8rem; }

label {
  display: block;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: .3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: .5rem .75rem;
  font-family: var(--font-sans);
  font-size: .95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--charcoal);
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(123,28,59,.12);
}

textarea { min-height: 80px; resize: vertical; }

.field { margin-bottom: 1rem; }

.field-error {
  display: block;
  font-family: var(--font-sans);
  font-size: .82rem;
  color: #842029;
  margin-top: .25rem;
}

ul.errorlist {
  list-style: none;
  margin: 0 0 .8rem;
  padding: .6rem .9rem;
  background: #f8d7da;
  border-radius: var(--radius);
  color: #842029;
  font-family: var(--font-sans);
  font-size: .875rem;
}

ul.errorlist li { margin: 0; }

/* Invite code form — centred narrow card */
.invite-code-card {
  max-width: 420px;
  margin: 3rem auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.invite-code-card h1 { margin-bottom: .4rem; }
.invite-code-card p  { color: var(--mid-grey); margin-bottom: 1.2rem; font-size: .95rem; }

.invite-code-card input[type="text"] {
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.invite-code-card button {
  width: 100%;
  padding: .65rem;
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: .5rem;
  transition: background .15s;
}

.invite-code-card button:hover { background: var(--burgundy-dk); }

/* Guest RSVP fieldsets */
fieldset.guest-rsvp-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem 1rem;
  margin-bottom: 1.4rem;
  background: #fff;
}

fieldset.guest-rsvp-fieldset legend {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--burgundy);
  padding: 0 .5rem;
}

.form-actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── Thank-you page ───────────────────────────────────────── */
.thank-you {
  text-align: center;
  padding: 3rem 1rem;
}

.thank-you h1 { font-size: 2.2rem; margin-bottom: .75rem; }

.thank-you p {
  color: var(--mid-grey);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto .9rem;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-family: var(--font-sans);
  font-size: .8rem;
  color: var(--mid-grey);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  header { padding: 0 1rem; }

  /* Show hamburger, hide nav links by default on mobile */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: -1rem;
    right: -1rem;
    background: var(--burgundy);
    padding: .5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    z-index: 200;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    padding: .75rem 1.5rem;
    font-size: .9rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .nav-links a:first-child { border-top: none; }

  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 3.5rem 1.5rem 3rem; }

  main { margin: 1.5rem auto; padding: 0 1rem; }

  .feature-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }

  .rsvp-status-table th:last-child,
  .rsvp-status-table td:last-child { display: none; } /* hide Meal on small screens */

  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; text-align: center; }
}
