/* ==============================
   Kirk & Nikki Wedding Site
   ============================== */

:root {
  --purple:       #7048B5;
  --purple-light: #9C89AE;
  --purple-pale:  #D2C9DA;
  --purple-dark:  #1E102A;
  --white:        #ffffff;
  --text:         #222222;
  --font-script:  'Parisienne', cursive;
  --font-heading: 'Parisienne', cursive;
  --font-nav:     'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;
  --font-btn:     'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.25; }
.script { font-family: var(--font-script); font-weight: 400; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-btn);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple-pale);
  color: var(--purple);
}
.btn-primary:hover { background: var(--purple); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-outline:hover { background: var(--purple); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--purple);
}
.btn-white:hover { background: var(--purple-pale); }

.btn-success {
  background: #4CAF50;
  color: var(--white);
}

/* ── Header / Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid #eee;
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.logo img { width: 60px; height: 60px; object-fit: contain; }

nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
}
nav a {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 15px;
  color: var(--purple);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
nav a:hover, nav a.active {
  color: var(--purple-dark);
  border-bottom-color: var(--purple);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple);
  transition: all 0.3s;
}

/* ── Page wrapper ── */
.page { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ── Section spacing ── */
.section { padding: 60px 16px; }
.section--purple { background: var(--purple); color: var(--white); }
.section--pale   { background: var(--purple-pale); }

.section-title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--purple);
  text-align: center;
  margin-bottom: 40px;
}
.section--purple .section-title { color: var(--white); }

/* ── Login Page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  text-align: center;
  width: 100%;
  max-width: 420px;
}
.login-box h1 { font-size: 2rem; margin-bottom: 8px; }
.login-box p  { color: #666; margin-bottom: 32px; }
.login-box input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-body);
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 12px;
}
.login-box input[type="password"]:focus { outline: 2px solid var(--purple); border-color: var(--purple); }
.login-box .btn { width: 100%; }
.login-error { color: #c0392b; font-size: 14px; margin-bottom: 12px; }

/* ── Home Page ── */
.home-hero {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 64px 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.home-photo {
  flex: 0 0 280px;
  max-width: 280px;
}
.filmstrip {
  position: relative;
  background: #1a1a1a;
  padding: 16px 20px;
  border-radius: 2px;
}
.filmstrip::before,
.filmstrip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  background: #1a1a1a;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 10px,
    #333 10px,
    #333 10px,
    #000 10px,
    #000 18px,
    transparent 18px,
    transparent 28px
  );
}
.filmstrip::before { left: 0; border-radius: 2px 0 0 2px; }
.filmstrip::after  { right: 0; border-radius: 0 2px 2px 0; }
.filmstrip img { width: 100%; display: block; }

.home-text { text-align: center; }
.home-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--purple);
  line-height: 1.15;
  margin-bottom: 16px;
}
.home-date {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text);
  margin-bottom: 32px;
}
.home-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Details Page ── */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto 16px;
}
.location-card { text-align: center; }
.location-map {
  width: 100%;
  height: 200px;
  border: 0;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #eee;
}
.location-map-link {
  display: block;
  background: #f0edf4;
  border-radius: 4px;
  min-height: 64px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--purple);
  font-size: 14px;
  text-decoration: underline;
}
.location-card address { font-style: normal; line-height: 1.7; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.plan-step h3 {
  font-family: var(--font-nav);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  margin-bottom: 12px;
  color: var(--white);
}
.plan-step p { font-size: 15px; color: var(--white); opacity: 0.92; }

.wear-section { max-width: 700px; margin: 0 auto; text-align: center; }
.wear-section p { margin-bottom: 16px; font-size: 1.05rem; }
.wear-highlight { font-weight: 700; }

/* ── RSVP Page ── */
.rsvp-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 60px 16px;
  text-align: center;
}
.rsvp-intro { font-size: 1.15rem; margin-bottom: 32px; line-height: 1.7; }
.rsvp-intro strong { font-weight: 700; }
.rsvp-contact { margin-top: 32px; font-size: 0.95rem; color: #555; }
.rsvp-contact a { color: var(--purple); text-decoration: underline; }
.rsvp-sig {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--purple);
  margin-top: 40px;
}

/* ── Forms ── */
.form-wrap { max-width: 640px; margin: 0 auto; }
.form-section-title {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--purple);
  text-align: center;
  margin-bottom: 32px;
}
.form-intro { text-align: center; margin-bottom: 40px; color: #444; line-height: 1.7; }

.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--purple);
  font-size: 15px;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(112,72,181,0.12); }
.field textarea { resize: vertical; min-height: 90px; }

.radio-group, .checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option, .checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
}
.radio-option input, .checkbox-option input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--purple);
  cursor: pointer;
}

.rsvp-form-box, .menu-form-box {
  background: #faf8fc;
  border: 1px solid var(--purple-pale);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 40px;
}

.attendance-toggle { display: none; }
.attendance-toggle.visible { display: block; }

.submit-row { text-align: center; margin-top: 8px; }
.submit-row .btn { min-width: 200px; }

/* Success state */
.success-box {
  background: #f0fdf4;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}
.success-box .tick { font-size: 2.5rem; margin-bottom: 12px; }
.success-box h3 { color: #2e7d32; margin-bottom: 8px; font-size: 1.3rem; }
.success-box p { color: #444; margin-bottom: 24px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Menu form divider ── */
.form-divider {
  border: 0;
  border-top: 2px dashed var(--purple-pale);
  margin: 48px 0;
}

/* ── Book a Room ── */
.room-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 32px;
  max-width: 800px;
  margin: 0 auto;
}
.room-section .date-label { font-size: 1rem; opacity: 0.8; margin-bottom: 16px; }
.room-section h2 { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 24px; }
.room-section p { font-size: 1.05rem; margin-bottom: 24px; opacity: 0.95; line-height: 1.7; }
.room-phone {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  white-space: normal;
}
.room-phone a { color: inherit; text-decoration: underline; }

/* ── Gifts ── */
.gifts-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 32px;
  max-width: 800px;
  margin: 0 auto;
}
.gifts-section h2 { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 24px; }
.gifts-section p { font-size: 1.05rem; margin-bottom: 32px; opacity: 0.95; line-height: 1.7; }

/* ── Dietary contact section ── */
.contact-section { max-width: 700px; margin: 0 auto; text-align: center; padding: 48px 16px; }
.contact-section h2 { font-family: var(--font-script); font-size: 2rem; color: var(--purple); margin-bottom: 12px; }
.contact-section p { margin-bottom: 24px; color: #555; }
.contact-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Validation ── */
.field-error { color: #c0392b; font-size: 13px; margin-top: 4px; }
.field input.invalid, .field textarea.invalid { border-color: #c0392b; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 660px) {
  .home-hero { flex-direction: column; gap: 32px; text-align: center; }
  .home-photo { flex: none; max-width: 220px; margin: 0 auto; }

  .plan-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .rsvp-form-box, .menu-form-box { padding: 20px; }

  nav ul { display: none; flex-direction: column; gap: 0; position: absolute; top: 80px; left: 0; right: 0; background: white; border-bottom: 1px solid #eee; padding: 8px 0; }
  nav ul.open { display: flex; }
  nav ul li a { display: block; padding: 12px 24px; }
  .nav-toggle { display: flex; }

  .room-section, .gifts-section { padding: 48px 16px; }
}

@media (max-width: 480px) {
  .plan-grid { grid-template-columns: 1fr; }
  .success-actions { flex-direction: column; }
  .success-actions .btn { width: 100%; }
}

/* Accessibility and responsive refinements */
input, textarea, select, button { font: inherit; }
.btn-primary { background:var(--purple); color:#fff; }
.btn-primary:hover { background:#513080; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline:3px solid #39205f; outline-offset:4px; }
.section--purple a:focus-visible { outline-color:#fff; }
.skip-link { position:fixed; top:8px; left:8px; padding:12px; background:#fff; color:#39205f; z-index:1000; transform:translateY(-180%); }
.skip-link:focus { transform:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
main { scroll-margin-top:96px; }
main:focus { outline:none; }
fieldset.field { border:0; min-width:0; padding:0; }
.field legend { font-weight:600; color:#7048B5; margin-bottom:12px; font-size:1rem; }
.field label.radio-option { display:flex; align-items:flex-start; padding:8px 0; min-height:44px; font-weight:400; color:#352640; }
.radio-option span { min-width:0; }
.radio-option input { margin-top:3px; }
.field input:focus, .field textarea:focus { outline:2px solid var(--purple); }
.privacy-note, .field-help { font-size:.9rem; margin:0 0 24px; text-align:left; }
.error-summary { border:2px solid #9d2020; color:#721616; padding:20px; margin-bottom:24px; text-align:left; }
.error-summary h2 { font:600 1rem Montserrat,sans-serif; margin-bottom:12px; }
.error-summary ul { padding-left:20px; }
.page-heading { text-align:center; padding-top:40px; }
.page-heading .section-title { margin-bottom:16px; }
.menu-page { padding-top:40px; padding-bottom:40px; }
.form-intro { max-width:680px; margin:0 auto 28px; }
.menu-form-section { scroll-margin-top:96px; }
.room-section h1, .gifts-section h1 { font-family:var(--font-script); font-size:clamp(2.5rem,5vw,3.5rem); margin-bottom:24px; }
.room-rates h2 { font-family:var(--font-nav); font-size:1.25rem; font-weight:600; margin:16px 0; }
.room-rates ul { padding-left:22px; margin-bottom:24px; }
.room-rates li { margin-bottom:12px; }
.success-box h2 { font-family:var(--font-nav); font-size:1.2rem; font-weight:600; margin-bottom:16px; }
.rsvp-wrap > p { margin-bottom:24px; }
.btn { white-space:normal; min-height:44px; }
@media (max-width:960px) {
 .nav-toggle { display:flex; min-width:44px; min-height:44px; align-items:center; justify-content:center; }
 nav ul { display:none; flex-direction:column; gap:0; position:absolute; top:80px; left:0; right:0; background:#fff; border-bottom:1px solid #ddd; padding:8px 0; max-height:calc(100dvh - 80px); overflow-y:auto; }
 nav ul.open { display:flex; }
 nav ul li { width:100%; }
 nav ul li a { display:block; padding:12px 24px; }
}
@media (max-width:660px) {
 .home-hero { padding-top:32px; }
 .plan-step h3 { white-space:normal; }
 .locations-grid { grid-template-columns:1fr; }
 .btn { max-width:100%; }
 .room-section, .gifts-section { min-height:0; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { transition:none!important; } }

.admin-page { padding-top:40px; padding-bottom:60px; }
.admin-page p { margin-bottom:24px; }
.admin-page h2 { margin:24px 0 16px; }
.table-scroll { overflow-x:auto; margin-bottom:32px; }
table { border-collapse:collapse; width:100%; font-size:.875rem; }
caption { text-align:left; font-weight:600; padding:12px 0; }
th,td { padding:12px; border:1px solid #ddd; text-align:left; vertical-align:top; }
th { background:#7048B5; color:#fff; }
tr:nth-child(even) { background:#faf8fc; }
.field input[type="password"] { width:100%; padding:12px; font:inherit; }
