/* ==========================================================================
   MARIAMCOLORS — VISUAL STORYTELLING & EDITORIAL DESIGN
   Design System & Bilingual Typography Engine (Arabic Default + English)
   Instagram: @mariam.mortadha
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Reem+Kufi:wght@400;600;700&display=swap');

:root {
  /* ==========================================================================
     DAYLIGHT PALETTE
     Warm ivory, sand, terracotta, sage, and deep warm ink.
     ========================================================================== */
  --bg-color: #FAF7F2;            /* Warm Ivory */
  --bg-surface: #F1ECE1;          /* Sand */
  --bg-surface-elevated: #FFFFFF; /* Pure Ivory White */
  --bg-surface-card: #FAF6EE;     /* Card Sand Tint */
  --text-primary: #1E1A17;        /* Deep Warm Ink */
  --text-secondary: #696159;      /* Muted Warm Ink / Taupe */
  --text-muted: #999084;
  --accent-color: #C75D3E;        /* Terracotta */
  --accent-hover: #AB492D;
  --accent-soft: rgba(199, 93, 62, 0.12);
  --accent-sage: #7C8D7B;         /* Sage */
  --accent-sage-soft: rgba(124, 141, 123, 0.15);
  --border-color: #E4DCD0;        /* Delicate Sand Border */
  --border-strong: #1E1A17;
  --border-subtle: #EDE7DC;
  --badge-bg: #EAE3D6;
  --badge-text: #4A443D;
  --pill-bg: rgba(30, 26, 23, 0.05);
  --pill-border: rgba(30, 26, 23, 0.12);
  --overlay-bg: rgba(250, 247, 242, 0.94);
  --modal-backdrop: rgba(30, 26, 23, 0.72);
  --grain-opacity: 0.035;
  --shadow-editorial: 0 16px 40px -12px rgba(30, 26, 23, 0.08);
  --shadow-hover: 0 24px 50px -10px rgba(30, 26, 23, 0.14);
  --slider-track: #E7DFD2;
  --slider-thumb: #C75D3E;

  /* Typography Stacks */
  --font-arabic: 'Alexandria', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Alexandria', 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Alexandria', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Space Mono', 'Alexandria', monospace;

  /* Transitions */
  --theme-transition: background-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      fill 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                      stroke 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   BLUE HOUR PALETTE (Night / Dusk)
   Soft blue slate, dusk blue, warm parchment, champagne, and muted eucalyptus.
   ========================================================================== */
[data-theme="night"],
[data-theme="bluehour"] {
  --bg-color: #0E141E;            /* Dusk Blue */
  --bg-surface: #182230;          /* Soft Blue Slate */
  --bg-surface-elevated: #202B3C; /* Elevated Dusk Slate */
  --bg-surface-card: #151D2A;     /* Soft Blue Slate Card */
  --text-primary: #F0ECE1;        /* Warm Parchment */
  --text-secondary: #8EA89F;      /* Muted Eucalyptus */
  --text-muted: #5B726C;
  --accent-color: #E5C99B;        /* Champagne */
  --accent-hover: #F2DAAF;
  --accent-soft: rgba(229, 201, 155, 0.16);
  --accent-sage: #8EA89F;         /* Muted Eucalyptus */
  --accent-sage-soft: rgba(142, 168, 159, 0.16);
  --border-color: #243347;        /* Soft Blue Slate Border */
  --border-strong: #F0ECE1;
  --border-subtle: #1C2737;
  --badge-bg: #1C2839;
  --badge-text: #BACDC7;
  --pill-bg: rgba(240, 236, 225, 0.06);
  --pill-border: rgba(240, 236, 225, 0.14);
  --overlay-bg: rgba(14, 20, 30, 0.94);
  --modal-backdrop: rgba(6, 10, 16, 0.88);
  --grain-opacity: 0.055;
  --shadow-editorial: 0 16px 40px -12px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 24px 50px -10px rgba(0, 0, 0, 0.65);
  --slider-track: #202D3F;
  --slider-thumb: #E5C99B;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* RTL / LTR Language Specific Tuning */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic);
}

html[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-family: var(--font-body);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.68;
  font-weight: 400;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: var(--theme-transition);
}

/* Subtle doodle layer — theme-aware, performant, respects reduced motion */
.doodle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.doodle {
  position: absolute;
  width: 140px;
  height: 140px;
  color: var(--accent-sage);
  opacity: 0.16;
  will-change: transform;
  animation: doodleFloat 24s ease-in-out infinite;
}
.doodle-1 { top: 8%; left: 4%; animation-delay: 0s; }
.doodle-2 { top: 14%; right: 6%; animation-delay: -6s; width: 100px; height: 100px; }
.doodle-3 { bottom: 12%; left: 8%; animation-delay: -12s; width: 160px; height: 160px; }
.doodle-4 { bottom: 18%; right: 10%; animation-delay: -4s; width: 180px; height: 180px; }
@keyframes doodleFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(18px, -24px) rotate(6deg) scale(1.03); }
  66% { transform: translate(-12px, 16px) rotate(-4deg) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .doodle { animation: none; }
}

/* Film Grain Texture Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  transition: opacity 0.4s ease;
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  transition: color 0.4s ease;
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3 {
  letter-spacing: normal;
  line-height: 1.35;
}

html[dir="ltr"] h1, 
html[dir="ltr"] h2 {
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

/* Top Archival Header Bar */
.masthead-ticker {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--theme-transition);
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-color);
  display: inline-block;
  box-shadow: 0 0 0 0 var(--accent-color);
  animation: pulse-dot 2.4s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(199, 93, 62, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(199, 93, 62, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(199, 93, 62, 0); }
}

[data-theme="night"] @keyframes pulse-dot,
[data-theme="bluehour"] @keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 201, 155, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(229, 201, 155, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 201, 155, 0); }
}

/* Main Navigation Masthead */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--theme-transition);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.15rem;
  line-height: 0.98;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
}

html[dir="ltr"] .brand-wordmark {
  letter-spacing: -0.05em;
}

.brand-subline {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* Language Switcher Button */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--theme-transition);
  outline: none;
}

.lang-switch-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Theme Toggle Component */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.45rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--theme-transition);
  outline: none;
  user-select: none;
}

.theme-switch-btn:hover {
  border-color: var(--text-primary);
}

.theme-switch-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-color);
}

.theme-toggle-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.theme-toggle-pill.active {
  background-color: var(--text-primary);
  color: var(--bg-color);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  fill: currentColor;
}

/* Instagram Header Button */
.insta-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-soft);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s var(--ease-editorial);
}

.insta-nav-link:hover {
  background: var(--accent-color);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Editorial Hero Section */
.hero-editorial {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
  transition: var(--theme-transition);
}

.hero-large-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

html[dir="ltr"] .hero-large-heading {
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-large-heading .accent-phrase {
  color: var(--accent-color);
  display: block;
}

.editorial-dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.5rem;
  line-height: 0.85;
  float: right;
  margin-left: 0.75rem;
  margin-bottom: -0.1rem;
  color: var(--accent-color);
}

html[dir="ltr"] .editorial-dropcap::first-letter {
  float: left;
  margin-right: 0.75rem;
  margin-left: 0;
}

/* Custom Editorial Badge / Metadata stamp */
.archival-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  transition: var(--theme-transition);
}

/* Hairline Grid Dividers */
.hairline-border-r { border-right: 1px solid var(--border-color); }
.hairline-border-l { border-left: 1px solid var(--border-color); }
.hairline-border-b { border-bottom: 1px solid var(--border-color); }
.hairline-border-t { border-top: 1px solid var(--border-color); }

/* ==========================================================================
   SERVICES SHOWCASE SECTION
   ========================================================================== */

.services-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  transition: var(--theme-transition);
}

.service-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.35s var(--ease-editorial);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

html[dir="ltr"] .service-card::before {
  right: auto;
  left: 0;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.service-tag-pill {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-weight: 600;
}

.service-cta {
  margin-top: 1.75rem;
}

.service-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s var(--ease-editorial);
}

.service-cta-btn:hover {
  background: var(--accent-color);
  color: var(--bg-surface);
}

/* ==========================================================================
   ABOUT & CREATIVE DIARY SECTIONS
   ========================================================================== */

.about-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 2rem;
  transition: var(--theme-transition);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-visual {
  margin: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-card);
  padding: 0.75rem;
}

.about-visual img {
  display: block;
  width: 100%;
  height: clamp(320px, 46vh, 540px);
  object-fit: cover;
}

.about-visual figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.9rem 0.25rem 0.35rem;
}

.about-heading {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1.35rem;
}

.about-copy p {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-credential {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.6rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-color);
  transition: var(--theme-transition);
}

.about-credential::before {
  content: "✳";
  color: var(--accent-color);
  font-size: 0.95rem;
}

/* Creative Diary */
.diary-section {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 2rem;
  transition: var(--theme-transition);
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.diary-tile {
  min-height: 300px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-card);
  transition: var(--theme-transition);
}

.diary-tile:first-child {
  background: var(--bg-surface);
}

.diary-tile:last-child {
  background: var(--accent-sage-soft);
}

.diary-tile-top {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.diary-tile-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin-bottom: 0.65rem;
}

.diary-tile-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 34ch;
}

.diary-tile-body {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 40ch;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.diary-tile-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.diary-tile-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  color: var(--text-primary);
}

/* Hero & section supporting type */
.hero-lede {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 48ch;
  margin-top: 1.75rem;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.hero-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-sage);
  flex-shrink: 0;
}

.section-lede {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 54ch;
  margin-top: 0.9rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.5rem;
}

/* ==========================================================================
   CAROUSEL & EDITORIAL GALLERY SECTION
   ========================================================================== */

.carousel-section {
  position: relative;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--theme-transition);
}

.gallery-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
  transition: var(--theme-transition);
}

/* Filter Tab Pills */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s var(--ease-editorial);
  outline: none;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
  font-weight: 700;
}

/* Carousel Nav Buttons & Counters */
.carousel-nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-arrow-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s var(--ease-editorial);
  outline: none;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.nav-arrow-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-color);
}

.index-counter-display {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 700;
  min-width: 75px;
  text-align: center;
}

.view-toggle-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.view-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* Carousel Horizontal Track */
.carousel-viewport {
  position: relative;
  width: 100%;
  padding: 2.5rem 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  padding: 0 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--slider-thumb) var(--slider-track);
  cursor: grab;
  user-select: none;
}

.carousel-track:active {
  cursor: grabbing;
}

/* Minimal Custom Scrollbar for Carousel Track */
.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-track {
  background: var(--slider-track);
}

.carousel-track::-webkit-scrollbar-thumb {
  background: var(--slider-thumb);
}

.carousel-track::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Carousel Card Base */
.editorial-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--ease-editorial),
              box-shadow 0.45s var(--ease-editorial),
              border-color 0.45s ease,
              background-color 0.45s ease;
  overflow: hidden;
}

.editorial-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

/* Asymmetric sizing variations */
.editorial-card.ratio-portrait {
  width: min(390px, 84vw);
}

.editorial-card.ratio-landscape {
  width: min(580px, 90vw);
}

.editorial-card.ratio-square {
  width: min(440px, 86vw);
}

/* Card Header Strip */
.card-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--theme-transition);
}

.card-ref-badge {
  font-weight: 800;
  color: var(--accent-color);
}

/* Card Media Container & Hover Zoom */
.card-media-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #0E141E;
  cursor: pointer;
}

.aspect-3-4 { aspect-ratio: 3 / 4; }
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-16-10 { aspect-ratio: 16 / 10; }
.aspect-1-1 { aspect-ratio: 1 / 1; }

.card-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s var(--ease-editorial), filter 0.5s ease;
}

.editorial-card:hover .card-media-image {
  transform: scale(1.045);
}

.card-media-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.75s var(--ease-editorial);
}

.editorial-card:hover .card-media-svg {
  transform: scale(1.045);
}

/* Inspection Overlay Button */
.media-inspect-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(20, 26, 36, 0.88);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s var(--ease-editorial);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

html[dir="rtl"] .media-inspect-badge {
  left: 1rem;
  right: auto;
}

html[dir="ltr"] .media-inspect-badge {
  right: 1rem;
  left: auto;
}

.editorial-card:hover .media-inspect-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Card Body & Metadata Block */
.card-content-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: border-color 0.4s ease;
}

.meta-label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.meta-value {
  color: var(--text-primary);
  font-weight: 700;
}

/* Carousel Bottom Dynamic Progress Scrubber */
.carousel-progress-wrapper {
  padding: 1rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
  transition: var(--theme-transition);
}

.progress-track-bar {
  flex-grow: 1;
  height: 4px;
  background-color: var(--slider-track);
  position: relative;
  cursor: pointer;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill-indicator {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 12.5%;
  background-color: var(--accent-color);
  transition: width 0.15s ease-out, background-color 0.4s ease;
}

html[dir="ltr"] .progress-fill-indicator {
  right: auto;
  left: 0;
}

.progress-counter-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Keyboard hint chip */
.keyboard-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kbd-key {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-surface);
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--text-primary);
}

/* Grid View Mode */
.editorial-grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  padding: 2.5rem 2rem;
  overflow-x: visible !important;
}

.editorial-grid-mode .editorial-card {
  width: 100% !important;
  scroll-snap-align: none !important;
}

/* ==========================================================================
   TYPOGRAPHY — Qahwa / Arabic magazine type
   --------------------------------------------------------------------------
   Qahwa (coffee) and its "Arabic Salt" variant are free Arabic faces meant for
   display use; they self-host from resources/fonts/ (drop-in licensed files) and
   fall back to the already-loaded Google Fonts faces (Reem Kufi / Alexandria) so
   the design is never unstyled.
   ========================================================================== */

:root {
  --font-magazine: 'Qahwa Arabic Salt', 'Qahwa', 'Reem Kufi', 'Alexandria', serif;
  --font-magazine-display: 'Space Grotesk', 'Qahwa', 'Alexandria', sans-serif;
}

@font-face {
  font-family: 'Qahwa';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../resources/fonts/Qahwa-Regular.woff2') format('woff2'),
       url('../resources/fonts/Qahwa-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Qahwa Arabic Salt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../resources/fonts/QahwaArabicSalt-Regular.woff2') format('woff2'),
       url('../resources/fonts/QahwaArabicSalt-Regular.ttf') format('truetype');
}

/* ==========================================================================
   MAGAZINE-STYLE WEDDING INVITATION ARTICLE (side article)
   --------------------------------------------------------------------------
   A Vogue / high-end editorial feature: image column beside the text, hairline
   rules, drop cap, oversized calligraphic headline, pull quote and numbered
   design list. The article is the written counterpart of the physical *and*
   digital invitations — the QR on the card opens the digital landing page it
   describes.
   ========================================================================== */

.wedding-article {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 3rem;
  align-items: start;
}

.wedding-article .wa-figure {
  margin: 0;
  position: sticky;
  top: 2rem;
}

.wedding-article .wa-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--bg-surface);
}

.wedding-article .wa-caption {
  display: block;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.wedding-article .wa-content { min-width: 0; }

.wedding-article .wa-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wedding-article .wa-kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.wedding-article .wa-title {
  font-family: var(--font-magazine);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

.wedding-article .wa-dek {
  font-family: var(--font-magazine);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

.wedding-article .wa-body { margin-top: 0; }

.wedding-article .wa-body p {
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0 0 1.1rem;
}

.wedding-article .wa-body p:first-of-type::first-letter {
  font-family: var(--font-magazine);
  font-size: 3.4em;
  float: left;
  line-height: 0.8;
  padding: 0.08em 0.14em 0 0;
  color: var(--accent-color);
}

.wedding-article .wa-pull {
  margin: 2.2rem 0;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.wedding-article .wa-pull {
  font-family: var(--font-magazine);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.4;
  color: var(--text-primary);
}

.wedding-article .wa-designs {
  list-style: none;
  padding: 0;
  margin: 2.2rem 0 0;
  border-top: 1px solid var(--border-color);
}

.wedding-article .wa-design {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-color);
}

.wedding-article .wa-design-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-color);
  letter-spacing: 0.12em;
}

.wedding-article .wa-design-name {
  font-family: var(--font-magazine);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .wedding-article {
    grid-template-columns: 1fr;
  }

  .wedding-article .wa-figure {
    position: static;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   INTERACTIVE WEDDING INVITATION WIDGET SHOWCASE
   ========================================================================== */

.invitation-showcase-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 4.5rem 2rem;
  transition: var(--theme-transition);
}

.invitation-mockup-frame {
  max-width: 620px;
  margin: 0 auto;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0;
  box-shadow: var(--shadow-editorial);
  position: relative;
  text-align: center;
  height: 700px;
  overflow: hidden;
}

.invitation-botanical-crest {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
}

.invitation-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s var(--ease-editorial);
}

.invitation-action-btn.btn-primary {
  background: var(--accent-color);
  color: #FFFFFF;
}

.invitation-action-btn.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(199, 93, 62, 0.35);
}

.invitation-action-btn.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.invitation-action-btn.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* ==========================================================================
   ARCHIVAL REGISTRY & TABLE SECTION
   ========================================================================== */

.archive-table-section {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  transition: var(--theme-transition);
}

.archival-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.archival-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

html[dir="rtl"] .archival-table {
  text-align: right;
}

html[dir="ltr"] .archival-table {
  text-align: left;
}

.archival-table th {
  padding: 1.1rem 1.5rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg-surface);
  white-space: nowrap;
  transition: var(--theme-transition);
}

.archival-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.4s ease;
}

.archival-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.archival-table tbody tr:hover {
  background-color: var(--bg-surface);
}

.archival-table tbody tr:hover td:first-child {
  color: var(--accent-color);
  font-weight: 800;
}

.status-badge-inline {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--accent-color);
}

/* ==========================================================================
   INSTAGRAM CONTACT & INQUIRY SECTION
   ========================================================================== */

.contact-section {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 2rem;
  transition: var(--theme-transition);
}

.insta-hero-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-editorial);
  position: relative;
  border-radius: 8px;
}

.insta-avatar-ring {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, var(--accent-color), var(--accent-sage), var(--accent-hover));
}

.insta-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-color);
}

.btn-insta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: var(--text-primary);
  color: var(--bg-color);
  padding: 0.95rem 2.2rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s var(--ease-editorial);
  cursor: pointer;
  border: none;
}

.btn-insta-primary:hover {
  background: var(--accent-color);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(199, 93, 62, 0.3);
}

.btn-insta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.95rem 1.8rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-insta-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* ==========================================================================
   INSPECTION MODAL / LIGHTBOX — Redesigned: minimal, centered, clean overlay
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--modal-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-editorial), visibility 0.4s var(--ease-editorial);
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background-color: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 960px;
  max-height: 85vh;
  display: flex;
  flex-direction: row;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s var(--ease-editorial);
  border-radius: 12px;
  /* Flex container (modal-backdrop) handles centering via align-items/justify-content */
  margin: 0 auto;
  align-self: center;
}

.modal-backdrop.is-open .modal-window {
  transform: translateY(0) scale(1);
}

.modal-media-pane {
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  min-height: 300px;
  max-height: 85vh;
  flex: 1 1 50%;
  border-inline-end: 1px solid var(--border-color);
}

.modal-media-pane img,
.modal-media-pane svg {
  width: 100%;
  height: 100%;
  max-height: 85vh;
  object-fit: cover;
  display: block;
}

.modal-details-pane {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--bg-color);
  max-height: 85vh;
  overflow-y: auto;
  gap: 1.5rem;
  flex: 1 1 50%;
  min-width: 0;
}

.modal-details-pane::-webkit-scrollbar {
  width: 4px;
}

.modal-details-pane::-webkit-scrollbar-track {
  background: transparent;
}

.modal-details-pane::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.modal-details-pane::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

html[dir="ltr"] .modal-close-btn {
  left: auto;
  right: 1rem;
}

.modal-close-btn:hover {
  background: var(--text-primary);
  color: var(--bg-color);
}

/* Modal content typography */
.modal-ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0.5rem 0 0.25rem;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-notes {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal-notes h4 {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-notes p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}

.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.modal-specs .meta-label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-specs .meta-value {
  color: var(--text-primary);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-nav-btns {
  display: flex;
  gap: 0.5rem;
}

.modal-nav-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-nav-btn:hover {
  background: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
}

.modal-inquire-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--text-primary);
  color: var(--bg-color);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s var(--ease-editorial);
  border: none;
  cursor: pointer;
}

.modal-inquire-btn:hover {
  background: var(--accent-color);
  color: #FFFFFF;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .modal-window {
    flex-direction: column;
    max-height: 95vh;
    border-radius: 0;
    margin: 0;
  }
  .modal-media-pane {
    min-height: 200px;
    max-height: 35vh;
    border-inline-end: none;
    border-bottom: 1px solid var(--border-color);
    flex: 0 0 auto;
  }
  .modal-details-pane {
    padding: 1.25rem;
    max-height: 60vh;
    flex: 1 1 auto;
  }
  .modal-close-btn {
    top: 0.75rem;
    left: 0.75rem;
  }
}


/* ==========================================================================
   MAGAZINE-STYLE ARTICLES — Vogue-like horizontal showcase
   ========================================================================== */

.magazine-showcase {
  padding: 3rem 0;
}

.magazine-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.magazine-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.magazine-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.magazine-dek {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
}

.magazine-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--slider-track);
}

.magazine-scroll::-webkit-scrollbar {
  height: 6px;
}

.magazine-scroll::-webkit-scrollbar-track {
  background: var(--slider-track);
  border-radius: 3px;
}

.magazine-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

.magazine-article {
  flex: 0 0 auto;
  width: min(420px, 85vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.4s var(--ease-editorial);
}

.magazine-article:hover {
  transform: translateY(-4px);
}

.magazine-article-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-surface);
}

.magazine-article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-editorial);
}

.magazine-article:hover .magazine-article-img {
  transform: scale(1.03);
}

.magazine-article-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

html[dir="rtl"] .magazine-article-num {
  left: auto;
  right: 1rem;
}

.magazine-article-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.magazine-article-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.magazine-article-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
}

.magazine-article-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.magazine-article-link {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: transform 0.2s var(--ease-editorial);
  display: inline-block;
}

.magazine-article-link:hover {
  transform: translateX(4px);
}

html[dir="rtl"] .magazine-article-link:hover {
  transform: translateX(-4px);
}

.magazine-pull {
  font-family: var(--font-magazine, var(--font-display));
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
  margin: 3rem auto 0;
  max-width: 600px;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .magazine-article {
    width: min(320px, 85vw);
  }
  .magazine-scroll {
    gap: 1.25rem;
  }
}

/* ==========================================================================
   MAGAZINE SINGLE ARTICLE — Vogue-like editorial, no scroll, no cards
   ========================================================================== */

.magazine-article-single {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.magazine-single {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.magazine-single-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.magazine-single-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.magazine-single-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.magazine-single-title {
  font-family: var(--font-magazine, var(--font-display));
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}

.magazine-single-dek {
  font-family: var(--font-magazine, var(--font-display));
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  max-width: 680px;
}

.magazine-single-body {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.magazine-single-figure {
  margin: 0;
  width: 100%;
}

.magazine-single-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.magazine-single-caption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.magazine-single-para {
  font-family: var(--font-magazine, var(--font-body));
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0;
  max-width: 720px;
}

.magazine-single-para::first-letter {
  font-family: var(--font-magazine, var(--font-display));
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  padding: 0.08em 0.14em 0 0;
  color: var(--accent-color);
  font-weight: 700;
}

html[dir="rtl"] .magazine-single-para::first-letter {
  float: right;
  padding: 0.08em 0 0 0.14em;
}

.magazine-single-pull {
  font-family: var(--font-magazine, var(--font-display));
  font-style: italic;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
  margin: 1rem auto;
  max-width: 640px;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.magazine-single-designs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.magazine-single-design {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  transition: all 0.25s var(--ease-editorial);
}

.magazine-single-design:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .magazine-article-single {
    padding: 2rem 1rem;
  }
  .magazine-single-title {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }
  .magazine-single-dek {
    font-size: 1rem;
  }
  .magazine-single-para {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   COLOPHON & FOOTER
   ========================================================================== */

.colophon-footer {
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  transition: var(--theme-transition);
}

.btn-editorial-submit {
  background: var(--text-primary);
  color: var(--bg-color);
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid var(--text-primary);
  cursor: pointer;
  font-weight: 700;
  border-radius: 9999px;
  transition: all 0.25s ease;
}

.btn-editorial-submit:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #FFFFFF;
}

/* Responsive Breakpoints */
.container-editorial {
  max-width: 1680px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .modal-window {
    flex-direction: column;
    max-height: 90vh;
  }
  .modal-media-pane {
    min-height: 200px;
    max-height: 40vh;
    border-inline-end: none;
    border-bottom: 1px solid var(--border-color);
    flex: 0 0 auto;
  }
  .modal-details-pane {
    flex: 1 1 auto;
    max-height: 50vh;
  }
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr !important;
  }

  .diary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .gallery-control-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .filter-tabs {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .carousel-viewport {
    padding: 1.5rem 0;
  }
  .carousel-track {
    padding: 0 1rem;
    gap: 1.25rem;
  }
  .editorial-card.ratio-portrait,
  .editorial-card.ratio-landscape,
  .editorial-card.ratio-square {
    width: 86vw;
  }
  .carousel-progress-wrapper {
    padding: 0.75rem 1rem;
  }
  .keyboard-hint-chip {
    display: none;
  }
  .about-section,
  .diary-section {
    padding: 3.5rem 1rem;
  }
  .service-grid {
    grid-template-columns: 1fr !important;
  }
  .service-card {
    padding: 1.75rem;
  }
}

/* ==========================================================================
   IMMERSIVE WEDDING LANDING PAGE (hidden overlay)
   ========================================================================== */

.wedding-landing {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-color);
  overflow-y: auto;
}

.wedding-landing[hidden] { display: none; }

.wedding-landing[data-palette="daylight"] {
  --bg-color: #FAF7F2;
  --bg-surface: #F1ECE1;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-card: #FAF6EE;
  --text-primary: #1E1A17;
  --text-secondary: #696159;
  --text-muted: #999084;
  --accent-color: #C75D3E;
  --accent-hover: #AB492D;
  --accent-soft: rgba(199, 93, 62, 0.12);
  --accent-sage: #7C8D7B;
  --accent-sage-soft: rgba(124, 141, 123, 0.15);
  --border-color: #E4DCD0;
  --border-strong: #1E1A17;
  --border-subtle: #EDE7DC;
}

.wedding-landing[data-palette="bluehour"] {
  --bg-color: #0E141E;
  --bg-surface: #182230;
  --bg-surface-elevated: #202B3C;
  --bg-surface-card: #151D2A;
  --text-primary: #F0ECE1;
  --text-secondary: #8EA89F;
  --text-muted: #5B726C;
  --accent-color: #E5C99B;
  --accent-hover: #F2DAAF;
  --accent-soft: rgba(229, 201, 155, 0.16);
  --accent-sage: #8EA89F;
  --accent-sage-soft: rgba(142, 168, 159, 0.16);
  --border-color: #243347;
  --border-strong: #F0ECE1;
  --border-subtle: #1C2737;
}

.wedding-landing .wl-frame {
  width: min(720px, 100%);
  margin: auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.wedding-landing .wl-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.wedding-landing .wl-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent-color);
}

.wedding-landing .wl-close {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.3s var(--ease-editorial);
}

.wedding-landing .wl-close:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.wedding-landing .wl-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 1.25rem;
}

.wedding-landing .wl-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

.wedding-landing .wl-sub {
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 2rem;
}

.wedding-landing .wl-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.wedding-landing .wl-meta-cell {
  padding: 1.1rem 0.5rem;
}

.wedding-landing .wl-meta-cell + .wl-meta-cell { border-left: 1px solid var(--border-color); }

.wedding-landing .wl-meta-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.wedding-landing .wl-meta-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.wedding-landing .wl-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.wedding-landing .wl-cta { text-align: center; }

.wedding-landing .wl-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  border: none;
  background: var(--accent-color);
  color: var(--onAccent, #FAF7F2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s var(--ease-editorial), box-shadow 0.3s var(--ease-editorial);
}

.wedding-landing .wl-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(199, 93, 62, 0.45);
}

@keyframes wlFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wlRise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.wedding-landing { animation: wlFadeIn 0.8s var(--ease-editorial) both; }
.wedding-landing .wl-headline { animation: wlRise 1.1s var(--ease-editorial) 0.12s both; }

/* ==========================================================================
   ANIMATION SYSTEM — Elegant, performant, prefers-reduced-motion aware
   All motion uses transform + opacity only (compositor-thread cheap).
   ========================================================================== */

:root {
  --anim-duration-fast: 0.35s;
  --anim-duration-normal: 0.6s;
  --anim-duration-slow: 0.9s;
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --anim-ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --anim-stagger: 0.12s;
}

/* Page load reveal — hero content fades and slides up in sequence */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pageFadeInSlow {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

html[dir="rtl"] @keyframes slideInLeft {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

/* Reveal utilities — applied by IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--anim-duration-normal) var(--anim-ease),
              transform var(--anim-duration-normal) var(--anim-ease);
}

.reveal.reveal--up {
  transform: translateY(34px);
}

.reveal.reveal--fade {
  transform: none;
}

.reveal.reveal--left {
  transform: translateX(-24px);
}

html[dir="rtl"] .reveal.reveal--left {
  transform: translateX(24px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.is-visible.reveal--delay-1 { transition-delay: var(--anim-stagger); }
.reveal.is-visible.reveal--delay-2 { transition-delay: calc(var(--anim-stagger) * 2); }
.reveal.is-visible.reveal--delay-3 { transition-delay: calc(var(--anim-stagger) * 3); }
.reveal.is-visible.reveal--delay-4 { transition-delay: calc(var(--anim-stagger) * 4); }

/* Page load body fade-in */
body {
  animation: pageFadeIn var(--anim-duration-normal) var(--anim-ease-out) both;
}
.hero-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: pageFadeIn var(--anim-duration-normal) var(--anim-ease) forwards;
}

/* Section entrance */
.section-enter {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--anim-ease-out), transform 0.7s var(--anim-ease-out);
}

.section-enter.is-visible {
  opacity: 1;
  transform: none;
}

/* Carousel card reveal on filter change */
.editorial-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--anim-ease), transform 0.5s var(--anim-ease);
}

.editorial-card.is-visible {
  opacity: 1;
  transform: none;
}

/* Diary tile entrance */
.diary-tile {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--anim-ease), transform 0.6s var(--anim-ease);
}

.diary-tile.is-visible {
  opacity: 1;
  transform: none;
}

/* Service card hover — refined lift + glow */
.service-card {
  will-change: transform, box-shadow, border-color;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: var(--shadow-hover);
}

/* Media image hover zoom — smoother, less aggressive */
.card-media-image {
  will-change: transform;
}

.editorial-card:hover .card-media-image {
  transform: scale(1.03);
}

/* Button press feedback */
.btn-editorial-submit:active,
.invitation-action-btn:active,
.service-cta-btn:active {
  transform: scale(0.97);
}

/* Inspect badge hover lift — already has transition; keep performant */
.media-inspect-badge {
  will-change: opacity, transform;
}

/* Masthead live dot — subtle breathing */
.live-indicator {
  will-change: transform, box-shadow;
}

/* Theme toggle pill — active state */
.theme-toggle-pill.active {
  transform: scale(1.02);
}

/* Reduced motion — disable all non-essential animation */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .section-enter,
  .editorial-card,
  .diary-tile,
  .hero-title-word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .live-indicator {
    animation: none !important;
  }
  .service-card:hover {
    transform: none !important;
  }
  .editorial-card:hover .card-media-image {
    transform: none !important;
  }
}

/* --- Visible focus rings (CRITICAL: keyboard operability) --- */
.editorial-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-color);
  z-index: 2;
}

.filter-btn:focus-visible,
.nav-arrow-btn:focus-visible,
.view-toggle-btn:focus-visible,
.invitation-action-btn:focus-visible,
.wl-close:focus-visible,
.wl-cta-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-color);
}

/* Inspect badge revealed on keyboard focus too (touch + keyboard access) */
.editorial-card:focus-visible .media-inspect-badge,
.card-media-wrap:focus-within .media-inspect-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Card tap feedback on touch devices */
.editorial-card:active {
  transform: scale(0.985);
}

/* --- Reduced motion: honor prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .editorial-card:hover .card-media-image,
  .editorial-card:hover .card-media-svg {
    transform: none;
  }
  .editorial-card:hover,
  .editorial-card:active {
    transform: none !important;
    box-shadow: none !important;
  }
  .editorial-card {
    transition: none !important;
  }
  .carousel-track {
    scroll-behavior: auto !important;
  }
  .hero-carousel .hc-track {
    transition: none !important;
  }
  .wedding-landing {
    animation: none !important;
  }
  .wedding-landing .wl-headline {
    animation: none !important;
  }
  .invitation-action-btn:active {
    transform: none !important;
  }
}

/* --- Invitation card: palette-driven visual design --- */
.invitation-card-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--inv-surface, var(--bg-color));
  border: 1px solid var(--inv-border, var(--border-color));
  color: var(--inv-text, var(--text-primary));
  transition: var(--theme-transition);
}

.invitation-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background: var(--inv-accent, var(--accent-color));
  mask-image: radial-gradient(circle at 30% 30%, #000 40%, transparent 70%),
              radial-gradient(circle at 80% 70%, #000 35%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 40%, transparent 70%),
                      radial-gradient(circle at 80% 70%, #000 35%, transparent 65%);
}

.invitation-card-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.invitation-crest-polished {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--inv-accent, var(--accent-color));
  background: var(--inv-surface, var(--bg-surface));
  color: var(--inv-accent, var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.invitation-meta-box {
  padding: 1.1rem;
  background: var(--inv-surface, var(--bg-surface));
  border: 1px solid var(--inv-border, var(--border-color));
  border-radius: 10px;
  margin: 0 auto 1.75rem;
  max-width: 460px;
  width: 100%;
  text-align: left;
}

html[dir="rtl"] .invitation-meta-box { text-align: right; }

.invitation-meta-box .wd-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--inv-accent, var(--accent-color));
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.invitation-meta-box .wd-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--inv-text, var(--text-primary));
  line-height: 1.4;
}

.invitation-qr-wrap {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.invitation-qr-wrap .wd-qr-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.invitation-countdown {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0 0;
  font-family: var(--font-mono);
}

.invitation-countdown .wd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.invitation-countdown .wd-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--inv-accent, var(--accent-color));
}

.invitation-countdown .wd-unit-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- QR pass visual (honest digital-pass representation) --- */
.qr-pass {
  width: 132px;
  height: 132px;
  border: 2px solid var(--inv-border, var(--border-color));
  border-radius: 14px;
  background: var(--inv-surface, var(--bg-surface));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.qr-pass:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-color);
}

.qr-pass:active { transform: scale(0.96); }

.qr-finder {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 4px solid var(--inv-text, var(--text-primary));
  border-radius: 2px;
  top: 10px;
  left: 10px;
  box-sizing: border-box;
}
.qr-finder::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid var(--inv-surface, var(--bg-surface));
  border-radius: 1px;
  background: var(--inv-surface, var(--bg-surface));
}

.qr-data {
  position: absolute;
  top: 66px;
  left: 66px;
  width: 4px;
  height: 4px;
  background: var(--inv-text, var(--text-primary));
  opacity: 0.55;
  box-shadow:
    16px 0 0 0 var(--inv-text), 32px 0 0 0 var(--inv-text), 48px 0 0 0 var(--inv-text),
    0 16px 0 0 var(--inv-text), 16px 16px 0 0 var(--inv-text), 32px 16px 0 0 var(--inv-text),
    0 32px 0 0 var(--inv-text), 16px 32px 0 0 var(--inv-text),
    8px 8px 0 0 var(--inv-text), 24px 8px 0 0 var(--inv-text),
    40px 40px 0 0 var(--inv-text), 44px 44px 0 0 var(--inv-text);
  opacity: 0.5;
}

.qr-hint { pointer-events: none; }

/* --- Music toggle visual state --- */
.invitation-action-btn.music-playing {
  background: var(--accent-color);
  color: #FFFFFF;
}

.invitation-action-btn.music-playing.btn-secondary {
  border-color: var(--accent-color);
}

/* ==========================================================================
   INVITATION CARD REDESIGN — Three distinct visual languages
   Each card reflects its own aesthetic: terracotta garden, starlit night, royal garden
   ========================================================================== */

/* Base card refinements — softer, more tactile */
.invitation-card-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--inv-surface, var(--bg-color));
  border: 1px solid var(--inv-border, var(--border-color));
  color: var(--inv-text, var(--text-primary));
  transition: var(--theme-transition);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.invitation-card-wrap:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  z-index: 2;
}

.invitation-card-wrap:active {
  transform: scale(0.98);
}

/* Card background — decorative element per palette, behind content */
.invitation-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background: var(--inv-accent, var(--accent-color));
  mask-image: radial-gradient(circle at 30% 30%, #000 40%, transparent 70%),
              radial-gradient(circle at 80% 70%, #000 35%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 40%, transparent 70%),
                      radial-gradient(circle at 80% 70%, #000 35%, transparent 65%);
}

/* Three.js canvas behind card content */
#weddingCardCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 24px;
}

/* Content layer sits above background and canvas */
.invitation-card-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  overflow-y: auto;
}

/* Crest — different styles per palette */
.invitation-crest-polished {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--inv-accent, var(--accent-color));
  background: var(--inv-surface, var(--bg-surface));
  color: var(--inv-accent, var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: var(--theme-transition);
}

.invitation-card-wrap:hover .invitation-crest-polished {
  transform: rotate(-5deg) scale(1.05);
}

/* --- Palette 1: Terracotta Garden (Nour & Rayan) — Paper craft aesthetic --- */
.invitation-card-wrap[data-theme="daylight"][data-wedding-palette="terracotta-ivory"] {
  --inv-accent: #C75D3E;
}

.invitation-card-wrap[data-wedding-palette="terracotta-ivory"] .invitation-card-bg {
  mask-image: radial-gradient(circle at 20% 20%, #000 50%, transparent 80%),
              radial-gradient(circle at 80% 80%, #000 40%, transparent 70%),
              radial-gradient(circle at 50% 50%, #000 30%, transparent 60%);
}

.invitation-card-wrap[data-wedding-palette="terracotta-ivory"] .invitation-crest-polished {
  border-style: dashed;
  box-shadow: 0 4px 12px rgba(199, 93, 62, 0.2);
}

.invitation-card-wrap[data-wedding-palette="terracotta-ivory"]::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(199, 93, 62, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Palette 2: Starlit Night (Sama & Taymour) — Night sky aesthetic --- */
.invitation-card-wrap[data-theme="bluehour"][data-wedding-palette="slate-eucalyptus"] {
  --inv-accent: #E5C99B;
}

.invitation-card-wrap[data-wedding-palette="slate-eucalyptus"] .invitation-card-bg {
  mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 60%);
  opacity: 0.3;
}

.invitation-card-wrap[data-wedding-palette="slate-eucalyptus"] .invitation-crest-polished {
  border-style: solid;
  box-shadow: 0 4px 20px rgba(229, 201, 155, 0.3);
}

.invitation-card-wrap[data-wedding-palette="slate-eucalyptus"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(229, 201, 155, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Star twinkle animation for starlit card */
@keyframes starTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.invitation-card-wrap[data-wedding-palette="slate-eucalyptus"] .invitation-crest-polished::before {
  content: "✦";
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 0.7rem;
  color: var(--inv-accent);
  animation: starTwinkle 3s ease-in-out infinite;
}

/* --- Palette 3: Royal Garden (Layla & Omar) — Gold lattice aesthetic --- */
.invitation-card-wrap[data-theme="daylight"][data-wedding-palette="champagne-emerald"] {
  --inv-accent: #D4AF37;
}

.invitation-card-wrap[data-wedding-palette="champagne-emerald"] .invitation-card-bg {
  mask-image: repeating-conic-gradient(from 0deg, #000 0deg 15deg, transparent 15deg 30deg),
              radial-gradient(circle at 50% 50%, #000 40%, transparent 80%);
}

.invitation-card-wrap[data-wedding-palette="champagne-emerald"] .invitation-crest-polished {
  border-radius: 0;
  border-style: double;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.invitation-card-wrap[data-wedding-palette="champagne-emerald"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(212, 175, 55, 0.06) 2px, rgba(212, 175, 55, 0.06) 4px),
                    repeating-linear-gradient(90deg, transparent 0, transparent 2px, rgba(212, 175, 55, 0.06) 2px, rgba(212, 175, 55, 0.06) 4px);
  pointer-events: none;
  z-index: 0;
}

/* Card flip for mobile — tap to see back */
.invitation-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-editorial);
}

.invitation-card-inner.flipped {
  transform: rotateY(180deg);
}

.invitation-card-front,
.invitation-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  box-sizing: border-box;
}

.invitation-card-back {
  transform: rotateY(180deg);
  background: var(--inv-surface, var(--bg-color));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--inv-border, var(--border-color));
}

/* --- Share button --- */
.invitation-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--inv-border, var(--border-color));
  border-radius: 9999px;
  background: transparent;
  color: var(--inv-text, var(--text-primary));
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--theme-transition);
  margin-top: 0.5rem;
}

.invitation-share-btn:hover {
  border-color: var(--inv-accent, var(--accent-color));
  color: var(--inv-accent, var(--accent-color));
}

/* --- Guest personalization banner --- */
.guest-greeting {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--inv-accent, var(--accent-color));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  animation: slideUpFade 0.6s var(--anim-ease) both;
}


/* ==========================================================================
   THREE.JS IMMERSIVE WEDDING CANVASES
   Positioned behind invitation content, respecting reduced motion.
   ========================================================================== */

#weddingCardCanvas {
  border-radius: 20px;
  overflow: hidden;
}

#weddingLandingCanvas {
  z-index: 0;
}

.wedding-landing {
  position: relative;
  z-index: 1;
}

/* Fallback starfield (CSS) for when Three.js is unavailable or reduced motion */
.starfield, .petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.6;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  animation: starTwinkle 4s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.petal {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #e8c5b8;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: petalFall 6s linear infinite;
}

@keyframes petalFall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #weddingCardCanvas,
  #weddingLandingCanvas {
    display: none !important;
  }
  .star, .petal {
    animation: none !important;
    opacity: 0.3 !important;
  }
}

/* ==========================================================================
   WEDDING LANDING PAGE — Three distinct immersive layouts
   ========================================================================== */

.wedding-landing {
  animation: wlFadeIn 0.8s var(--ease-editorial) both;

}

.wedding-landing .wl-headline {
  animation: wlRise 1.1s var(--ease-editorial) 0.12s both;
}

/* --- Design story cards: horizontal scroll gallery --- */
.design-story-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
  scrollbar-width: none;
}

.design-story-scroll::-webkit-scrollbar { display: none; }

.design-story-card {
  flex: 0 0 auto;
  width: min(340px, 90vw);
  scroll-snap-align: start;
  background: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--theme-transition);
}

.design-story-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.design-story-media {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.design-story-index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.16em;
  background: var(--bg-surface-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.design-story-content {
  padding: 1.25rem;
}

.design-story-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.design-story-text {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

html[dir="rtl"] .design-story-scroll {
  scroll-snap-align: start;
}

/* Horizontal wedding-article wrapper */
.wedding-article.horizontal {
  padding-top: 2rem;
}

.wedding-article.horizontal .wa-dek {
  margin-bottom: 2rem;
}

.wedding-article.horizontal .wa-pull {
  margin: 2rem 0;
  text-align: center;
  font-style: italic;
}

/* --- Layout 1: Paper Garden (Terracotta) — Vertical magazine editorial --- */
.wedding-landing[data-palette="terracotta-ivory"] .wl-frame {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-kicker,
.wedding-landing[data-palette="terracotta-ivory"] .wl-sub,
.wedding-landing[data-palette="terracotta-ivory"] .wl-note {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: left;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-itinerary {
  border: none;
  padding: 0;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-itinerary ol {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-itinerary li {
  border: none;
  padding: 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}

.wedding-landing[data-palette="terracotta-ivory"] .wl-itinerary .wd-time {
  font-size: 0.75rem;
  color: var(--inv-accent, var(--accent-color));
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Petal drift animation for terracotta */
@keyframes petalDrift {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.petal {
  position: fixed;
  top: -20px;
  width: 8px;
  height: 8px;
  background: #C75D3E;
  border-radius: 50% 50% 50% 0;
  opacity: 0.6;
  pointer-events: none;
  z-index: 9999;
  animation: petalDrift 6s linear infinite;
}

/* --- Layout 2: Starlit Night (Slate Eucalyptus) — Single-screen constellation --- */
.wedding-landing[data-palette="slate-eucalyptus"] .wl-frame {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-headline {
  font-size: clamp(2.6rem, 10vw, 6rem);
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-meta {
  grid-template-columns: 1fr;
  gap: 1rem;
  border: none;
  padding: 1.5rem 0;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary ol {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary li {
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary .wd-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Constellation lines between itinerary items */
.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary li::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #8EA89F, transparent);
  left: 50%;
  top: 100%;
  z-index: -1;
}

.wedding-landing[data-palette="slate-eucalyptus"] .wl-itinerary li:last-child::before {
  display: none;
}

/* Starfield background */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, #182230 0%, #0E141E 100%);
}

.star {
  position: absolute;
  background: #FFFFFF;
  border-radius: 50%;
  opacity: 0.6;
  animation: starTwinkle 4s ease-in-out infinite;
}

/* --- Layout 3: Royal Garden (Champagne Emerald) — Split-screen regal --- */
.wedding-landing[data-palette="champagne-emerald"] .wl-frame {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  gap: 0;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-topbar {
  grid-column: 1 / -1;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.wedding-landing[data-palette="champagne-emerald"] .wl-kicker,
.wedding-landing[data-palette="champagne-emerald"] .wl-sub,
.wedding-landing[data-palette="champagne-emerald"] .wl-note {
  text-align: left;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-meta {
  grid-template-columns: 1fr;
  border: none;
  padding: 1.5rem 0;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-itinerary {
  border: none;
  padding: 0;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-itinerary ol {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-itinerary li {
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wedding-landing[data-palette="champagne-emerald"] .wl-itinerary .wd-time {
  font-size: 0.75rem;
  color: #D4AF37;
  font-weight: 800;
  font-family: var(--font-mono);
}

.wedding-landing[data-palette="champagne-emerald"] .wl-cta {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
}

html[dir="rtl"] .wedding-landing[data-palette="champagne-emerald"] .wl-frame {
  grid-template-columns: 1fr 320px;
}

/* Gold shimmer animation for royal */
@keyframes goldShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.invitation-card-wrap[data-wedding-palette="champagne-emerald"]:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
  animation: goldShimmer 1.5s ease-in-out;
  pointer-events: none;
  z-index: 3;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .petal { display: none; }
  .star { animation: none; }
  .invitation-card-wrap:hover { transform: none; }
  .invitation-card-wrap[data-wedding-palette="champagne-emerald"]:hover::before { display: none; }
  .wedding-landing .wl-headline { animation: none; }
  .wedding-landing .wl-kicker { animation: none; }
}

/* --- Wedding landing: countdown + itinerary polish --- */
.wl-countdown {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.wl-countdown .wd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.wl-countdown .wd-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-color);
}

.wl-countdown .wd-unit-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.wl-itinerary {
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: left;
}

html[dir="rtl"] .wl-itinerary { text-align: right; }

.wl-itinerary .wd-kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.wl-itinerary ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wl-itinerary li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

html[dir="rtl"] .wl-itinerary li { gap: 1rem; }

.wl-itinerary .wd-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.wl-itinerary .wd-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.wl-itinerary .wd-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   HERO PICTURE CAROUSEL (minimal, borderless, seamless, magazine-like)
   ========================================================================== */

.hero-carousel {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.hc-track {
  display: flex;
  width: 100%;
  transition: opacity 1.4s var(--ease-editorial);
}

.hc-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 400px;
  overflow: hidden;
  background: var(--bg-surface);
}

.hc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hc-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(250, 247, 242, 0) 40%, rgba(250, 247, 242, 0.55) 100%);
}

/* ==========================================================================
   INVITATION GALLERY — Client-orderable invitation cards
   ========================================================================== */

.invitation-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.invitation-card {
  position: relative;
  border: 1px solid var(--inv-border, var(--border-color));
  border-radius: 24px;
  background: var(--inv-bg, var(--bg-color));
  color: var(--inv-text, var(--text-primary));
  cursor: pointer;
  transition: transform 0.4s var(--ease-editorial), box-shadow 0.4s var(--ease-editorial), border-color 0.4s var(--ease-editorial);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.invitation-card[aria-pressed="true"] {
  border-color: var(--inv-accent, var(--accent-color));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(1.03);
  z-index: 5;
}

.invitation-card:focus-visible {
  outline: 3px solid var(--inv-accent, var(--accent-color));
  outline-offset: 2px;
}

.invitation-card:not([aria-pressed="true"]):hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.invitation-card:active {
  transform: scale(0.97);
}

.card-stage {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

.card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.card-crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--inv-accent, var(--accent-color));
  background: var(--inv-bg, var(--bg-color));
  color: var(--inv-accent, var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--inv-text, var(--text-primary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.card-date {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin: 0.2rem 0;
  color: var(--inv-text-secondary, var(--text-secondary));
}

.card-venue {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--inv-text-secondary, var(--text-secondary));
}

.card-accent-line {
  height: 1px;
  margin: 1rem 0;
  width: 40px;
}

.card-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: auto;
  color: var(--inv-accent, var(--accent-color));
}

/* ==========================================================================
   INVITATION LANDING POPUP — Stunning interactive popup for ordering
   ========================================================================== */

.invitation-landing-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(30, 26, 23, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-editorial), visibility 0.4s var(--ease-editorial);
}

.invitation-landing-popup[hidden] {
  display: none;
}

.invitation-landing-popup:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.landing-popup-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-editorial);
  z-index: 10001;
}

.landing-popup-close:hover {
  border-color: var(--inv-accent, var(--accent-color));
  color: var(--inv-accent, var(--accent-color));
  background: var(--inv-bg, var(--bg-color));
}

.landing-popup-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
}

#landingPopupCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: 32px;
}

.landing-popup-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border-radius: 32px 32px 0 0;
  background: var(--inv-bg, var(--bg-color));
  color: var(--inv-text, var(--text-primary));
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

.landing-preview {
  position: relative;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  overflow-y: hidden;
  min-height: 0;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.preview-crest {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--inv-accent, var(--accent-color));
  background: var(--inv-bg, var(--bg-color));
  color: var(--inv-accent, var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.preview-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--inv-accent, var(--accent-color));
}

.preview-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0.5rem 0;
  letter-spacing: -0.02em;
  color: var(--inv-text, var(--text-primary));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.preview-sub {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--inv-text-secondary, rgba(0, 0, 0, 0.65));
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.preview-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.preview-meta span {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- Invitation card actions (landing + calendar buttons) --- */
.invitation-card-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.invitation-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s var(--ease-editorial);
  border: 1px solid transparent;
}

.invitation-action-btn.btn-primary {
  background: var(--inv-accent, var(--accent-color));
  color: #FFFFFF;
  border-color: var(--inv-accent, var(--accent-color));
}

.invitation-action-btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.invitation-action-btn.btn-secondary {
  background: transparent;
  color: var(--inv-text, var(--text-primary));
  border-color: var(--inv-border, var(--border-color));
}

.invitation-action-btn.btn-secondary:hover {
  border-color: var(--inv-accent, var(--accent-color));
  color: var(--inv-accent, var(--accent-color));
}

/* --- Preview calendar button --- */
.preview-calendar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  border: 1px solid var(--inv-border, var(--border-color));
  background: transparent;
  color: var(--inv-text, var(--text-primary));
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease-editorial);
}

.preview-calendar-btn:hover {
  border-color: var(--inv-accent, var(--accent-color));
  color: var(--inv-accent, var(--accent-color));
  transform: translateY(-2px);
}

/* --- 3D Preview Container --- */
.landing-3d-preview {
  position: relative;
  width: 100%;
  height: 280px;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--inv-bg, #FAF7F2) 0%, var(--inv-surface, #F1ECE1) 100%);
  border: 1px solid var(--inv-border, var(--border-color));
}

.wedding-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Preview actions row --- */
.preview-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
}

/* --- Consistent invitation color palette tokens --- */
:root {
  --inv-terracotta: #C75D3E;
  --inv-ivory: #FAF7F2;
  --inv-sand: #F1ECE1;
  --inv-ink: #1E1A17;
  --inv-slate: #0E141E;
  --inv-eucalyptus: #8EA89F;
  --inv-champagne: #E5C99B;
  --inv-emerald: #1F2E24;
  --inv-gold: #D4AF37;
}

.preview-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  border: none;
  background: var(--inv-accent, var(--accent-color));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease-editorial), box-shadow 0.2s var(--ease-editorial);
}

.preview-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.landing-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: hidden;
}

.landing-form-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.landing-form-sub {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 0 1rem;
}

.landing-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.landing-form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
}

.landing-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.landing-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s var(--ease-editorial);
}

.landing-input:focus {
  outline: none;
  border-color: var(--inv-accent, var(--accent-color));
}

.landing-palette-picker,
.landing-typo-picker {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.landing-qty-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.landing-qty-btn {
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-editorial);
}

.landing-qty-btn:hover {
  border-color: var(--inv-accent, var(--accent-color));
  color: var(--inv-accent, var(--accent-color));
}

.landing-qty-btn.active {
  background: var(--inv-accent, var(--accent-color));
  color: #FFFFFF;
  border-color: var(--inv-accent, var(--accent-color));
}

.landing-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  border: none;
  background: var(--inv-accent, var(--accent-color));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s var(--ease-editorial), box-shadow 0.2s var(--ease-editorial);
  width: 100%;
}

.landing-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.landing-note {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.5);
  margin-top: auto;
  text-align: center;
  font-style: italic;
}

/* ==========================================================================
   WEDDING INVITATION ARTICLES — Creative articles about invitation making
   ========================================================================== */

.invitation-articles {
  padding: 4rem 0;
}

.articles-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.articles-intro .archival-badge {
  margin-bottom: 0.75rem;
}

.articles-intro .article-heading {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.articles-intro .article-intro p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.article-tile {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-surface-card);
  cursor: pointer;
  transition: transform 0.4s var(--ease-editorial), box-shadow 0.4s var(--ease-editorial), border-color 0.4s var(--ease-editorial);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.article-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
}

.article-tile:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.article-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.article-index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.12em;
  background: var(--bg-surface-elevated);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.article-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  color: var(--text-primary);
}

.article-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

.article-pull {
  grid-column: 1 / -1;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .invitation-card,
  .article-tile,
  .preview-order-btn,
  .landing-order-btn {
    animation: none !important;
    transition: none !important;
  }
  .invitation-card:hover,
  .article-tile:hover {
    transform: none !important;
  }
}
