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

:root {
  /* Light Backgrounds */
  --color-white: #ffffff;
  --color-ivory: #faf9f6;
  --color-cream: #f5f3ef;
  --color-pearl: #eceae5;
  
  /* Dark Text & Accents */
  --color-black: #0d0d0d;
  --color-ink: #1a1a1a;
  --color-charcoal: #2d2d2d;
  --color-slate: #4a4a4a;
  
  /* Gold Accents */
  --color-gold: #b8952f;
  --color-gold-dark: #96780f;
  --color-gold-soft: #d4b545;
  --color-champagne: #f7e7ce;
  
  /* Utility */
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-gold: rgba(184, 149, 47, 0.3);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--color-ivory);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-gold-dark); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-gold); }

/* ─── Page Shell ────────────────────────────────── */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Header ────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
}

/* Collapsing sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    padding      0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background   0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow   0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform    0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Scrolled / collapsed state */
.site-header.is-scrolled {
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header.is-scrolled .brand-mark {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  transition: font-size 0.3s ease, letter-spacing 0.3s ease;
}

.site-header.is-scrolled .site-nav a,
.site-header.is-scrolled .nav-toggle {
  font-size: 0.8rem;
  transition: font-size 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

/* Admin nav link — subtle, not styled like login CTA */
.site-nav .nav-admin {
  font-size: 0.75rem;
  color: #aaa;
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
}

.site-nav .nav-admin:hover {
  color: #96780f;
  border-color: rgba(184,149,47,0.4);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header.is-scrolled,
  .site-header.is-hidden {
    transition: none !important;
    transform: none !important;
  }
}

.brand { display: flex; flex-direction: column; gap: 0.1rem; }
.brand a { color: var(--color-black); }
.brand a:hover { color: var(--color-gold); }
.brand-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-black);
}

.site-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav a { color: var(--color-slate); }
.site-nav a:hover { color: var(--color-gold); }
.site-nav a[aria-current="page"] {
  color: var(--color-gold-dark);
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
}

/* ─── Hero ───────────────────────────────────────── */
.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 6rem 2.5rem;
  min-height: 90vh;
  align-items: center;
  background: linear-gradient(160deg, var(--color-white) 0%, var(--color-ivory) 50%, var(--color-cream) 100%);
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--color-black);
}

.hero-description {
  font-size: 1.05rem;
  color: var(--color-charcoal);
  max-width: 44ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--color-charcoal);
  transition: all 0.3s ease;
  display: block;
}
.panel:hover {
  background: var(--color-cream);
  border-color: var(--color-gold);
  color: var(--color-black);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
}
.btn-primary:hover {
  background: var(--color-gold-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(184, 149, 47, 0.25);
}
.btn-secondary {
  border: 1px solid var(--color-charcoal);
  color: var(--color-charcoal);
  background: transparent;
}
.btn-secondary:hover {
  border-color: var(--color-black);
  color: var(--color-black);
  background: rgba(0, 0, 0, 0.03);
}

/* ─── Sections ───────────────────────────────────── */
.section {
  padding: 6rem 2.5rem;
  border-top: 1px solid var(--color-border);
}

.section-head { margin-bottom: 3rem; }
.section-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--color-black);
  margin-bottom: 0.5rem;
}
.section-intro {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--color-charcoal);
  max-width: 60ch;
  margin-bottom: 3rem;
}

/* ─── Statement ──────────────────────────────────── */
.statement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.statement-grid h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-black);
}
.statement-grid p { color: var(--color-charcoal); max-width: 48ch; line-height: 1.7; }

/* ─── Feature ────────────────────────────────────── */
.feature-intro { margin-bottom: 3rem; }
.feature-intro h1,
.feature-intro h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-black);
}
.feature-intro p { color: var(--color-charcoal); max-width: 52ch; line-height: 1.7; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.feature-grid article {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}
.feature-grid article:hover {
  border-color: var(--color-border-gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.feature-grid span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}
.feature-grid p { color: var(--color-charcoal); line-height: 1.7; }

/* ─── Gallery ────────────────────────────────────── */
.image-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.image-card {
  background: linear-gradient(145deg, var(--color-pearl), var(--color-cream));
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: all 0.3s ease;
}
.image-card:hover {
  border-color: var(--color-border-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.image-card-large { grid-row: span 2; min-height: 460px; }
.image-card span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-slate);
}

/* ─── Quote ──────────────────────────────────────── */
.quote-block {
  text-align: center;
  padding: 5rem 2.5rem;
  background: var(--color-cream);
}
.quote-block blockquote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold-dark);
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.4;
}

/* ─── Access Form ────────────────────────────────── */
.access { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.access-copy h1,
.access-copy h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-black);
}
.access-copy p { color: var(--color-charcoal); line-height: 1.7; }

.access-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}
.access-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate);
}
.access-form input[type="text"],
.access-form input[type="email"] {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  color: var(--color-black);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.access-form input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 47, 0.15);
}
.access-form input::placeholder {
  color: var(--color-slate);
}
.access-form label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-charcoal);
}
.access-form input[type="checkbox"] {
  accent-color: var(--color-gold);
  width: 18px;
  height: 18px;
}

/* Improved Intake Form Layout */
.access-form {
  max-width: 800px;
  margin: 0 auto;
}

.access-form fieldset {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcfa 100%);
}

.access-form legend {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0 1rem;
  color: #1a1a1a;
  background: #faf9f6;
  border-radius: 4px;
}

.access-form label {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.access-form input,
.access-form select,
.access-form textarea {
  margin-top: 0.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.access-form input:focus,
.access-form select:focus,
.access-form textarea:focus {
  border-color: #b8952f;
  box-shadow: 0 0 0 3px rgba(184, 149, 47, 0.12);
  outline: none;
}

.access-form input::placeholder,
.access-form textarea::placeholder {
  color: #999;
}

.access-form textarea {
  resize: vertical;
  min-height: 90px;
}

.access-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Two-column grid for form fields on larger screens */
@media (min-width: 640px) {
  .access-form fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    padding: 2rem;
  }

  .access-form legend {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
  }

  .access-form .fieldset-note {
    grid-column: 1 / -1;
  }

  /* Full-width fields */
  .access-form label[for="email"],
  .access-form label[for="emailConfirm"],
  .access-form label[for="bio"],
  .access-form label[for="interest"],
  .access-form label[for="additionalNotes"],
  .access-form label[for="profilePhoto"],
  .access-form label[for="idVerification"],
  .access-form label[for="additionalDocs"],
  .access-form .upload-agreement,
  .access-form .checkbox-label {
    grid-column: 1 / -1;
  }
}

/* Fieldset notes */
.fieldset-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 1.25rem 0;
  padding: 0.875rem 1rem;
  background: rgba(184, 149, 47, 0.06);
  border-radius: 8px;
  border-left: 3px solid #b8952f;
  line-height: 1.5;
}

/* Field notes (inline) */
.field-note {
  font-size: 0.8rem;
  font-weight: 400;
  color: #666;
}

/* Checkbox labels */
.access-form .checkbox-label {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  cursor: pointer;
  line-height: 1.5;
}

.access-form .checkbox-label input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #b8952f;
}

/* File upload styling */
.file-upload-label {
  position: relative;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.file-upload-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-hint {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #666;
  margin: 0.25rem 0 0.75rem 0;
  line-height: 1.4;
}

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: #fff;
  border: 1px dashed rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label:hover .file-upload-btn,
.file-upload-label input[type="file"]:focus + .file-upload-btn {
  border-color: #b8952f;
  border-style: solid;
  background: rgba(184, 149, 47, 0.05);
}

.file-name {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #28a745;
  font-weight: 500;
}

.file-name:empty {
  display: none;
}

.upload-agreement {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Email status */
.email-status {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  min-height: 1.2em;
}

.email-status.checking { color: #666; }
.email-status.success { color: #28a745; }
.email-status.error { color: #dc3545; }

/* Account note styling */
.account-note {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(184, 149, 47, 0.08), rgba(184, 149, 47, 0.03));
  border-left: 4px solid #b8952f;
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.account-note strong {
  color: #96780f;
}

/* Submit button area */
.access-form > button[type="submit"] {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 2rem auto 1rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Form status messages */
#form-status:not(:empty) {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 0.5rem;
}

/* ─── Footer ─────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 2.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-slate);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--color-cream);
}
.site-footer a { 
  color: var(--color-gold-dark); 
  text-decoration: underline; 
  text-underline-offset: 0.2em; 
}
.site-footer a:hover { color: var(--color-gold); }

/* ─── Reveal Animation ───────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ─── Mobile Nav Toggle ──────────────────────────── */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-charcoal);
  color: var(--color-charcoal);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.08em;
}
.nav-toggle:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

.site-nav .nav-close {
  display: none;
  background: none;
  border: none;
  color: var(--color-black);
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }

  .site-nav .nav-close { display: block; }

  .site-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(250, 249, 246, 0.98);
    backdrop-filter: blur(12px);
    z-index: 200;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.1rem;
  }

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

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .site-header { padding: 1.25rem 1.5rem; }
  .site-nav { gap: 1.25rem; font-size: 0.75rem; }
  .hero-panel { grid-template-columns: 1fr; padding: 4rem 1.5rem; min-height: auto; }
  .hero-panels { grid-template-columns: 1fr 1fr; }
  .statement-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: 1fr 1fr; }
  .image-card-large { grid-row: span 1; min-height: 220px; }
  .access { grid-template-columns: 1fr; }
  .section { padding: 4rem 1.5rem; }
}

@media (max-width: 600px) {
  .hero-panels { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: 1fr; }
}

/* Returning Guest Banner */
.returning-guest-banner {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  color: #fff;
  padding: 1rem 1.5rem;
  position: relative;
}

.returning-guest-banner .banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.returning-guest-banner .banner-greeting {
  font-size: 0.95rem;
}

.returning-guest-banner .banner-greeting strong {
  color: #b8952f;
}

.returning-guest-banner .banner-message {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.returning-guest-banner .btn-small {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  background: #b8952f;
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.returning-guest-banner .btn-small:hover {
  background: #a07f28;
}

.returning-guest-banner .banner-dismiss {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.returning-guest-banner .banner-dismiss:hover {
  color: #fff;
}

/* Nav login button */
.site-nav .nav-login {
  background: rgba(184, 149, 47, 0.12);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #96780f;
  font-weight: 600;
}

.site-nav .nav-login:hover {
  background: rgba(184, 149, 47, 0.2);
  text-decoration: none;
}

@media (max-width: 640px) {
  .returning-guest-banner .banner-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding-right: 2rem;
  }
}

/* ── Chatbot Widget ───────────────────────────────────────── */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Toggle button */
.chat-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border: 2px solid rgba(184, 149, 47, 0.4);
  color: #b8952f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 0 rgba(184,149,47,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.chat-toggle:hover {
  transform: scale(1.06);
  border-color: rgba(184, 149, 47, 0.7);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3), 0 0 0 6px rgba(184,149,47,0.08);
}

.chat-toggle svg {
  width: 24px;
  height: 24px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.chat-toggle .icon-chat { position: absolute; }
.chat-toggle .icon-close { position: absolute; opacity: 0; transform: rotate(-90deg); }
.chat-toggle.is-open .icon-chat { opacity: 0; transform: rotate(90deg); }
.chat-toggle.is-open .icon-close { opacity: 1; transform: rotate(0deg); }

/* Unread dot */
.chat-unread {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #faf9f6;
  font-size: 0;
  animation: chat-pulse 2s infinite;
}

@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* Chat window */
.chat-window {
  width: 360px;
  max-height: 540px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.chat-window.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Chat header */
.chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8952f, #d4ab3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 600; font-size: 0.9rem; display: block; }
.chat-header-status { font-size: 0.72rem; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 0.35rem; }
.chat-header-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; }

.chat-header-actions { display: flex; gap: 0.5rem; }
.chat-header-btn { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; padding: 4px; border-radius: 4px; transition: color 0.15s; }
.chat-header-btn:hover { color: #fff; }
.chat-header-btn svg { width: 16px; height: 16px; display: block; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* Message bubbles */
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 85%;
  animation: msg-in 0.25s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot  { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8952f, #d4ab3a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  color: #fff;
}

.msg-bubble {
  padding: 0.6rem 0.875rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-msg.bot  .msg-bubble { background: #f4f3f0; color: #1a1a1a; border-bottom-left-radius: 4px; }
.chat-msg.user .msg-bubble { background: #1a1a1a; color: #fff; border-bottom-right-radius: 4px; }

.msg-time { font-size: 0.65rem; color: #aaa; padding: 0 0.25rem 0.1rem; }

/* Quick replies */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
}

.quick-reply {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(184,149,47,0.35);
  border-radius: 20px;
  background: transparent;
  color: #96780f;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quick-reply:hover { background: rgba(184,149,47,0.08); border-color: #b8952f; }

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.75rem;
  color: #aaa;
  height: 28px;
}

.typing-dots { display: flex; gap: 3px; }
.typing-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: #ccc;
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Input area */
.chat-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  background: #fff;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 22px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.4;
  transition: border-color 0.15s;
  background: #faf9f6;
}

.chat-input:focus { border-color: #b8952f; }
.chat-input::placeholder { color: #aaa; }

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1a;
  border: none;
  color: #b8952f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.chat-send:hover { background: #2d2d2d; }
.chat-send:active { transform: scale(0.92); }
.chat-send:disabled { opacity: 0.4; cursor: default; }
.chat-send svg { width: 16px; height: 16px; }

/* Disclaimer */
.chat-disclaimer {
  text-align: center;
  font-size: 0.65rem;
  color: #bbb;
  padding: 0.3rem 1rem 0.5rem;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .chat-window,
  .chat-toggle,
  .chat-msg { transition: none !important; animation: none !important; }
}

/* ── Base background — warm, welcoming ───────────────────── */
:root {
  --bg:          #f5f0e8;   /* warm parchment — replaces cold #faf9f6 */
  --bg-subtle:   #ede8de;
  --bg-surface:  #ffffff;
  --text-primary:#1a1809;
  --text-muted:  #6b6452;
  --gold:        #b8952f;
  --gold-dark:   #96780f;
}

html,
body {
  background-color: var(--bg);
  color: var(--text-primary);
}

.page-shell {
  background-color: var(--bg);
}

/* Sections that had a hard white — soften to warm */
.section {
  background-color: transparent;
}

.hero-panel {
  background-color: var(--bg);
}

/* Cards / fieldsets pick up warmth */
.mockup-card,
.access-form fieldset,
.feature-grid article {
  background: linear-gradient(145deg, #ffffff, var(--bg));
}

/* Footer warm tone */
.site-footer {
  background-color: var(--bg-subtle);
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── Collapsing Sticky Header ─────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    padding    0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform  0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.site-header.at-top {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.site-header.is-scrolled {
  background: rgba(245, 240, 232, 0.95); /* matches new --bg */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header.is-scrolled .brand-mark {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
}

.site-header.is-scrolled .site-nav a,
.site-header.is-scrolled .nav-toggle {
  font-size: 0.8rem;
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

/* Admin nav link */
.site-nav .nav-admin {
  font-size: 0.75rem;
  color: #aaa;
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
}

.site-nav .nav-admin:hover {
  color: var(--gold-dark);
  border-color: rgba(184,149,47,0.4);
  text-decoration: none;
}

/* ── Access form — auto-size to page width ───────────────── */
.section.access,
.section.access-wide {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section.access .access-form,
.section.access-wide .access-form {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.section.access .access-form fieldset,
.section.access-wide .access-form fieldset {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem 0;
  padding: 2rem clamp(1rem, 5vw, 4rem);
  border: 1px solid rgba(26, 24, 9, 0.1);
  border-radius: 12px;
  background: #ffffff;
  box-sizing: border-box;
}

.section.access .access-copy,
.section.access-wide .access-copy {
  width: 100%;
  max-width: 100%;
  padding: 0 clamp(1rem, 5vw, 4rem) 2rem;
  box-sizing: border-box;
}

/* Two-column field grid at wider viewports */
@media (min-width: 700px) {
  .section.access .access-form fieldset,
  .section.access-wide .access-form fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }

  .section.access .access-form fieldset legend,
  .section.access-wide .access-form fieldset legend,
  .section.access .access-form fieldset p.fieldset-note,
  .section.access-wide .access-form fieldset p.fieldset-note {
    grid-column: 1 / -1;
  }

  .section.access .access-form fieldset label:has(textarea),
  .section.access-wide .access-form fieldset label:has(textarea),
  .section.access .access-form fieldset .file-upload-label,
  .section.access-wide .access-form fieldset .file-upload-label,
  .section.access .access-form fieldset .upload-agreement,
  .section.access-wide .access-form fieldset .upload-agreement,
  .section.access .access-form fieldset .checkbox-label,
  .section.access-wide .access-form fieldset .checkbox-label {
    grid-column: 1 / -1;
  }
}

/* ── Desktop : more horizontal padding ──────────────────── */
@media (min-width: 1100px) {
  .section.access-wide .access-form fieldset {
    padding: 3rem 8vw;
  }
}

/* ── Large screens ──────────────────────────────────────── */
@media (min-width: 1600px) {
  .section.access-wide .access-form fieldset {
    padding: 3rem 12vw;
  }
}
