/* =============================================================================
   style.css — Design tokens, resets, typography, and base layout primitives
   for Venue24x7.

   DESIGN SYSTEM
   Color   — Wine (#6B1D3C) + antique gold (#B8894A) on warm ivory, evoking a
             mandap's fabric and metalwork rather than a generic SaaS palette.
   Type    — Fraunces (display, editorial serif with real weight) paired with
             Karla (body, warm humanist sans) and IBM Plex Mono for numerals —
             prices, dates and booking IDs read like ledger entries.
   Motif   — The mandap arch (the ceremonial four-pillar canopy) is the
             signature shape: it caps hero/card imagery and repeats as a
             toran-style divider between sections.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,800&family=Karla:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  /* Color */
  --color-ivory: #FAF5EE;
  --color-ivory-deep: #F3EAE0;
  --color-wine: #6B1D3C;
  --color-wine-dark: #4A1329;
  --color-wine-tint: #F6E8ED;
  --color-gold: #B8894A;
  --color-gold-light: #E8D5B5;
  --color-gold-pale: #F6EEE0;
  --color-charcoal: #2A2420;
  --color-taupe: #7C6F65;
  --color-taupe-light: #B7ABA0;
  --color-blush: #F1E0DA;
  --color-line: #E7DCCE;
  --color-white: #FFFFFF;
  --color-success: #3C7A5C;
  --color-success-tint: #E4F0EA;
  --color-danger: #B23A3A;
  --color-danger-tint: #FBEAEA;
  --color-pending: #B8894A;
  --color-pending-tint: #FAF0DF;
  --color-info: #4A6FA5;
  --color-info-tint: #E9EFF8;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;

  /* Radius / shadow */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(42, 36, 32, 0.06), 0 1px 1px rgba(42, 36, 32, 0.04);
  --shadow-md: 0 8px 24px rgba(42, 36, 32, 0.09);
  --shadow-lg: 0 20px 48px rgba(74, 19, 41, 0.16);

  /* Layout */
  --container-width: 1240px;
  --header-height: 76px;
}

/* -------------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-ivory);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p { margin: 0; }
:focus-visible {
  outline: 2.5px solid var(--color-wine);
  outline-offset: 2px;
}
body.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------ Typography -------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-wine-dark); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 3.2vw + 1rem, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 1.8vw + 1rem, 2.4rem); line-height: 1.14; }
h3 { font-size: 1.35rem; line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
}
.lede { font-size: 1.08rem; color: var(--color-taupe); max-width: 60ch; }
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--color-taupe); }

/* -------------------------------- Layout ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.section { padding: var(--space-2xl) 0; }
.section--tight { padding: var(--space-xl) 0; }
.section--alt { background: var(--color-ivory-deep); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.section-head__text { max-width: 620px; }
.section-head__text h2 { margin-top: var(--space-2xs); }

main { display: block; min-height: 60vh; }

/* Push content below the fixed header */
.page-body { padding-top: var(--header-height); }

/* ------------------------------ Grid helpers ------------------------------ */
.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------------------------- Mandap arch motif ---------------------------- */
/* Signature shape: a four-pillar ceremonial arch silhouette used to cap
   imagery. Applied as a clip-path so any image can take the shape. */
.arch-clip {
  clip-path: path('M0,220 L0,70 C0,30 40,0 90,0 L410,0 C460,0 500,30 500,70 L500,220 Z');
}
.arch-divider {
  display: flex;
  justify-content: center;
  color: var(--color-gold);
  opacity: 0.55;
  margin: var(--space-xl) 0;
}
.arch-divider svg { width: 220px; height: 28px; }

/* --------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--color-wine); color: var(--color-white); }
.btn--primary:hover { background: var(--color-wine-dark); box-shadow: var(--shadow-sm); }
.btn--gold { background: var(--color-gold); color: var(--color-white); }
.btn--gold:hover { background: #A5793E; }
.btn--outline { background: transparent; border-color: var(--color-wine); color: var(--color-wine); }
.btn--outline:hover { background: var(--color-wine-tint); }
.btn--ghost { background: transparent; color: var(--color-wine-dark); border-color: transparent; }
.btn--ghost:hover { background: var(--color-wine-tint); }
.btn--danger-outline { background: transparent; border-color: var(--color-danger); color: var(--color-danger); }
.btn--danger-outline:hover { background: var(--color-danger-tint); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-white); border: 1.5px solid var(--color-line);
  color: var(--color-wine); transition: all 0.15s ease;
}
.btn-icon:hover { border-color: var(--color-wine); background: var(--color-wine-tint); }
.btn-icon--active { color: var(--color-danger); border-color: var(--color-danger); background: var(--color-danger-tint); }

/* --------------------------------- Forms ----------------------------------- */
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-wine-dark);
  margin-bottom: var(--space-3xs);
}
.form-group .hint { font-size: 0.78rem; color: var(--color-taupe); margin-top: 0.3rem; display: block; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--color-wine);
  box-shadow: 0 0 0 3px var(--color-wine-tint);
  outline: none;
}
textarea.input { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-group.has-error .input { border-color: var(--color-danger); }
.field-error { display: block; font-size: 0.78rem; color: var(--color-danger); margin-top: 0.3rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--color-wine); }

/* --------------------------------- Badges ----------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.3rem 0.65rem; border-radius: 999px; text-transform: uppercase;
}
.badge--pending { background: var(--color-pending-tint); color: var(--color-pending); }
.badge--confirmed { background: var(--color-success-tint); color: var(--color-success); }
.badge--cancelled { background: var(--color-danger-tint); color: var(--color-danger); }
.badge--completed { background: var(--color-info-tint); color: var(--color-info); }
.badge--rejected { background: var(--color-danger-tint); color: var(--color-danger); }
.badge--gold { background: var(--color-gold-pale); color: #8A621F; }

/* --------------------------------- Misc ------------------------------------- */
.rating { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; color: var(--color-wine-dark); }
.rating svg { width: 14px; height: 14px; color: var(--color-gold); }
.skeleton {
  background: linear-gradient(90deg, var(--color-ivory-deep) 25%, #EFE4D6 37%, var(--color-ivory-deep) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.empty-state { text-align: center; padding: var(--space-2xl) var(--space-md); color: var(--color-taupe); }
.empty-state h3 { margin-bottom: var(--space-2xs); }

.divider-line { border: none; border-top: 1px solid var(--color-line); margin: var(--space-md) 0; }

/* ------------------------------ Utility classes ----------------------------
   Small, reusable spacing/sizing helpers used instead of inline style="" so
   pages stay free of embedded CSS per the project's code-quality rules. */
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mb-sm { margin-bottom: var(--space-sm); }
.u-mb-md { margin-bottom: var(--space-md); }
.u-text-sm { font-size: 0.9rem; }
.u-text-xs { font-size: 0.78rem; }
.u-text-center { text-align: center; }
.u-hidden { display: none; }
.u-flex-row { display: flex; align-items: center; gap: 0.6rem; }
.u-flex-row-wrap { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.u-max-w-sm { max-width: 400px; }
.u-max-w-md { max-width: 640px; }
.u-max-w-lg { max-width: 720px; }
.u-full-width { width: 100%; }
.u-link-accent { color: var(--color-wine); font-weight: 600; }
.skeleton-block-sm { height: 64px; }
.skeleton-block-md { height: 90px; }
.skeleton-block-lg { height: 300px; }
.skeleton-block-xl { height: 420px; border-radius: var(--radius-lg); }
.section-subheading { font-size: 1.25rem; }
.input--auto { width: auto; }
.table-scroll { overflow-x: auto; }
.modal__panel--wide { max-width: 900px; }
.gallery-modal-img { width: 100%; border-radius: var(--radius-md); }

/* Toast */
.toast-container {
  position: fixed; top: calc(var(--header-height) + 12px); right: var(--space-md);
  display: flex; flex-direction: column; gap: 0.6rem; z-index: 1200;
}
.toast {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--color-wine-dark); color: var(--color-white);
  padding: 0.85rem 1.1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-size: 0.9rem; max-width: 320px;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--color-success); }
.toast--error { background: var(--color-danger); }
.toast__icon { font-weight: 700; }

/* Modal */
[data-modal] { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: var(--space-md); }
[data-modal][hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(42, 36, 32, 0.55); }
.modal__panel {
  position: relative; background: var(--color-white); border-radius: var(--radius-md);
  max-width: 480px; width: 100%; padding: var(--space-lg); box-shadow: var(--shadow-lg);
  max-height: 85vh; overflow-y: auto;
}
.modal__close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.4rem; color: var(--color-taupe); line-height: 1; }

/* Visitor gate — set on <html> by a tiny inline script in _Layout's <head>
   (before <main> ever paints) so a not-yet-unlocked visitor never sees a
   flash of hall content before wwwroot/js/common/visitorGate.js's popup
   covers it. Removed by that same script once the gate is submitted. */
html.visitor-gate-pending #main { display: none; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-wine); color: #fff;
  padding: 0.7rem 1rem; z-index: 2000; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
