/* ==========================================================================
   KSV DIGITAL WEDDING INVITATION - BASE STYLES & LAYOUT
   Mobile-First (9:16) with centered luxury desktop experience
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  background-color: #23040B; /* Deep regal maroon backdrop on desktop */
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: #23040B;
  min-height: 100vh;
  min-height: 100svh;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Luxury Temple Tapestry Backdrop for Desktop */
.desktop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 20%, rgba(107, 14, 35, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(197, 152, 56, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(197, 152, 56, 0.12) 0%, transparent 40%),
    linear-gradient(180deg, #1A0307 0%, #2A060E 50%, #150205 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4vw;
}

.desktop-flank {
  display: none;
}

@media (min-width: 900px) {
  .desktop-flank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    opacity: 0.35;
    color: var(--gold-light);
    font-family: var(--font-serif-en);
    text-align: center;
    max-width: 180px;
    user-select: none;
  }
  .desktop-flank-kolam {
    width: 110px;
    height: 110px;
    stroke: var(--gold-light);
    stroke-width: 1.2;
    fill: none;
    animation: rotateSlow 80s linear infinite;
  }
  .desktop-flank-title {
    font-family: var(--font-display-en);
    letter-spacing: 0.25em;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gold-bright);
  }
  .desktop-flank-quote {
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5;
  }
}

/* Main Mobile Application Container (9:16 Portrait Canvas) */
.invitation-app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px; /* Primary mobile standard width */
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg-parchment);
  background-image: 
    radial-gradient(rgba(197, 152, 56, 0.08) 1px, transparent 0),
    linear-gradient(180deg, #FFFDF8 0%, var(--bg-parchment) 50%, #F5EFE0 100%);
  background-size: 24px 24px, 100% 100%;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6), 0 0 100px rgba(107, 14, 35, 0.4);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 481px) {
  .invitation-app-container {
    border-left: 2px solid rgba(197, 152, 56, 0.45);
    border-right: 2px solid rgba(197, 152, 56, 0.45);
  }
}

/* Floating Petals Canvas Layer */
#petals-canvas {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
}

/* Paper Texture & Traditional Border Overlay */
.traditional-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(197, 152, 56, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  margin: 16px 16px;
  overflow: hidden;
}

.traditional-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(197, 152, 56, 0.4);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
}

/* Corner Ornaments for Traditional Cards */
.card-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  stroke: var(--gold-antique);
  fill: none;
}
.card-corner.top-left { top: 9px; left: 9px; }
.card-corner.top-right { top: 9px; right: 9px; transform: scaleX(-1); }
.card-corner.bottom-left { bottom: 9px; left: 9px; transform: scaleY(-1); }
.card-corner.bottom-right { bottom: 9px; right: 9px; transform: scale(-1); }

/* Typography Standard Classes */
.font-display {
  font-family: var(--font-display-en);
  letter-spacing: 0.08em;
}

.font-serif {
  font-family: var(--font-serif-en);
}

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

.font-tamil {
  font-family: var(--font-tamil);
  line-height: 1.75;
}

/* Section Wrapper Base */
.invitation-section {
  position: relative;
  padding: 44px 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Auspicious Thoranam Header Garland */
.thoranam-header {
  width: 100%;
  max-width: 440px;
  height: 28px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.9;
}

/* Traditional Ornamental Separators */
.ornamental-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px auto;
  width: 80%;
  max-width: 280px;
}

.ornamental-divider::before,
.ornamental-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.ornamental-divider svg,
.ornamental-divider span {
  color: var(--gold-primary);
  flex-shrink: 0;
  font-size: 14px;
}

/* Button Standards */
.btn-royal-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: var(--font-display-en);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: linear-gradient(135deg, #7A1128 0%, #520A17 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(107, 14, 35, 0.35), 0 0 10px rgba(197, 152, 56, 0.25);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  user-select: none;
  min-height: 48px; /* Thumb friendly */
}

.btn-royal-gold:hover,
.btn-royal-gold:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #8E1631 0%, #600C1C 100%);
  border-color: var(--gold-bright);
  box-shadow: 0 6px 20px rgba(107, 14, 35, 0.45), 0 0 16px rgba(223, 178, 91, 0.4);
  outline: none;
}

.btn-royal-gold:active {
  transform: translateY(1px);
}

.btn-gold-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-display-en);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-maroon);
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(197, 152, 56, 0.15);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 44px;
}

.btn-gold-outline:hover {
  background: #FFFDF8;
  border-color: var(--gold-deep);
  color: var(--color-maroon-dark);
  box-shadow: 0 4px 12px rgba(197, 152, 56, 0.25);
}
