/* H-ENVITE Design System — Soft Pastel Glass Garden */

/* === Base === */
html { scroll-behavior: smooth; }

/* === CSS Variables === */
:root {
    --dusty-rose:          #D4A3A3;
    --sage-mist:           #B5C4A8;
    --periwinkle:          #B8B5D0;
    --petal-cream:         #fbf9f7;
    --primary:             #7c5454;
    --on-surface:          #3a3033;
    --on-surface-variant:  #504444;
}

body {
    background: #fbf9f7;
    min-height: 100vh;
    color: #3a3033;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #fbf9f7; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #D4A3A3, #B8B5D0);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c49090, #a8a5c4);
}

/* === Glass Utilities === */
.glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.glass-card {
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    box-shadow: 0 4px 28px rgba(180, 150, 150, 0.07), 0 1px 4px rgba(180, 150, 150, 0.06);
}

/* === Navigation Glass === */
.nav-glass {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}
.nav-glass.scrolled {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 24px rgba(180, 150, 150, 0.1);
}

/* === Nav Links === */
.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: #504444;
    letter-spacing: 0.04em;
    text-decoration: none;
    position: relative;
    padding: 0.42rem 0.85rem;
    border-radius: 7px;
    transition: color 0.22s ease;
}

/* Animated green rectangle that appears on hover */
.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 7px;
    background: rgba(87, 98, 56, 0.09);
    border: 1px solid rgba(87, 98, 56, 0.18);
    opacity: 0;
    transform: scale(0.84) translateY(3px);
    transition:
        opacity   0.24s ease,
        transform 0.30s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.nav-link:hover::before {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.nav-link:hover { color: #576238; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #D4A3A3 0%, #c49090 100%);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 14px rgba(212, 163, 163, 0.3);
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 163, 163, 0.42);
}

/* === Entrance Animations === */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scalePop {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.animate-enter {
    opacity: 0;
    animation: blurFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-fade {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}
.animate-pop {
    opacity: 0;
    animation: scalePop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1  { animation-delay: 0.08s; }
.delay-2  { animation-delay: 0.16s; }
.delay-3  { animation-delay: 0.26s; }
.delay-4  { animation-delay: 0.36s; }
.delay-5  { animation-delay: 0.46s; }
.delay-6  { animation-delay: 0.58s; }

/* === Card Hover === */
.card-hover {
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px -8px rgba(180, 150, 150, 0.2);
}

/* === Category / Status Badges === */
.badge-rose   { background: rgba(212,163,163,0.22); color: #7c5454; border-radius: 100px; }
.badge-sage   { background: rgba(181,196,168,0.28); color: #3d5a32; border-radius: 100px; }
.badge-peri   { background: rgba(184,181,208,0.28); color: #3d3b6a; border-radius: 100px; }
.badge-warm   { background: rgba(233,217,184,0.35); color: #6b5020; border-radius: 100px; }

.status-confirmed { background: rgba(181,196,168,0.32); color: #3d5a32; }
.status-pending   { background: rgba(236,221,160,0.45); color: #7a6020; }
.status-declined  { background: rgba(212,163,163,0.32); color: #7c3030; }

/* === Progress Bars === */
.progress-gradient {
    background: linear-gradient(90deg, #D4A3A3 0%, #B5C4A8 100%);
}

/* === Dashboard Glass Header === */
.dash-header {
    background: linear-gradient(135deg,
        rgba(212,163,163,0.18) 0%,
        rgba(184,181,208,0.18) 50%,
        rgba(181,196,168,0.18) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.45);
}

/* === Dashboard Tab Nav === */
.dash-tabs {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.45);
}

.dash-tab {
    padding: 1rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    color: rgba(80, 68, 68, 0.5);
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.dash-tab:hover { color: #D4A3A3; }
.dash-tab.active {
    color: #7c5454;
    border-bottom-color: #D4A3A3;
}

/* === Glass Inputs === */
.input-glass {
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(212, 163, 163, 0.28);
    border-radius: 0.625rem;
    padding: 0.7rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #3a3033;
    outline: none;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input-glass:focus {
    background: rgba(255, 255, 255, 0.78);
    border-color: #D4A3A3;
    box-shadow: 0 0 0 3px rgba(212, 163, 163, 0.14);
}
.input-glass::placeholder { color: rgba(80, 68, 68, 0.35); }

.select-glass {
    background: rgba(255,255,255,0.52);
    border: 1px solid rgba(212, 163, 163, 0.28);
    border-radius: 0.625rem;
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #3a3033;
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D4A3A3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.select-glass:focus {
    border-color: #D4A3A3;
    box-shadow: 0 0 0 3px rgba(212, 163, 163, 0.14);
    background-color: rgba(255, 255, 255, 0.78);
}

/* === Buttons === */
.btn-primary {
    background: linear-gradient(135deg, #D4A3A3 0%, #c49090 100%);
    color: white;
    border-radius: 0.625rem;
    padding: 0.72rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(212, 163, 163, 0.3);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(212, 163, 163, 0.42);
}

.btn-outline {
    background: transparent;
    color: #7c5454;
    border: 1px solid rgba(212, 163, 163, 0.45);
    border-radius: 0.625rem;
    padding: 0.72rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-outline:hover {
    background: rgba(212, 163, 163, 0.08);
    border-color: #D4A3A3;
}

/* === Drag Zone === */
.drag-zone {
    background: rgba(184, 181, 208, 0.08);
    border: 1.5px dashed rgba(184, 181, 208, 0.42);
    border-radius: 0.875rem;
    min-height: 100px;
    transition: all 0.2s ease;
}
.drag-zone.drag-over {
    background: rgba(212, 163, 163, 0.1);
    border-color: rgba(212, 163, 163, 0.5);
}

/* === Modal === */
.modal-backdrop {
    background: rgba(250, 240, 240, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(180, 150, 150, 0.14);
    animation: modalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* === Invite card iframe containers (index.html) === */
.invite-preview-container { position: relative; overflow: hidden; }

/* === Backward compat for old blur background === */
.custom-blur-bg {
    background-image: var(--bg-url);
    filter: blur(10px) brightness(0.9);
    transform: scale(1.1);
    background-size: cover;
    background-position: center;
}

.phone-mockup {
  width: 224px;
  height: 452px;
  border-radius: 38px;
  border: 3px solid rgba(255,255,255,0.75);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 14px 44px rgba(0,0,0,0.2),
              inset 0 1px 0 rgba(255,255,255,0.85);
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 13px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
  z-index: 10;
}

.phone-screen {
  position: absolute;
  inset: 6px;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
}

/*
  Phone screen inner: 224px - 2×6px = 212px wide, 452px - 2×6px = 440px tall
  Render iframe at 390px (true iPhone width) → scale = 212/390 ≈ 0.544
  Visible content height at scale: 440 / 0.544 ≈ 809px
  Scroll distance to reach bottom of 3600px iframe: 3600 - 809 ≈ 2791px
*/
.phone-screen iframe {
  width: 390px !important;
  height: 3600px !important;
  border: none;
  pointer-events: none;
  transform-origin: top left;
  transform: scale(0.544);
  animation: none;
}

.group:hover .phone-screen iframe {
  animation: invite-scroll 12s cubic-bezier(0.45, 0, 0.55, 1) 0.25s 1 forwards;
}

@keyframes invite-scroll {
  0%   { transform: scale(0.544) translateY(0); }
  100% { transform: scale(0.544) translateY(-2791px); }
}

/* === Print === */
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white !important; animation: none !important; }
    .glass, .glass-card { background: white !important; backdrop-filter: none !important; }
    .print-break { page-break-inside: avoid; }
}


/* ============================================================
   H-ENVITE — Fluid Animation System v2
   All new colours extracted from /static/images/logo.svg
   ============================================================ */

/* === Logo Colour Palette ================================== */
/* Primary: soft greens (dominant hue in logo)               */
/* Secondary: blue-lavender cool accents                     */
/* Warmth: amber-gold highlights                             */
:root {
    --logo-green:       #37b54c;   /* bright leaf green      */
    --logo-green-deep:  #1c8452;   /* rich forest green      */
    --logo-green-sage:  #9da942;   /* warm sage-olive        */
    --logo-blue:        #7c97cf;   /* soft cornflower blue   */
    --logo-lavender:    #838bb9;   /* muted blue-lavender    */
    --logo-purple:      #786afa;   /* soft violet            */
    --logo-gold:        #f5c153;   /* amber gold             */
    --logo-gold-warm:   #deb846;   /* antique gold           */
    --logo-dark:        #0d0719;   /* near-black             */
}

/* === Display Font (Quicksand) ============================= */
@font-face {
    font-family: 'Quicksand';
    src: local('Quicksand'),
         url('/static/fonts/Quicksand-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: local('Quicksand Medium'),
         url('/static/fonts/Quicksand-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: local('Quicksand SemiBold'),
         url('/static/fonts/Quicksand-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: local('Quicksand Bold'),
         url('/static/fonts/Quicksand-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: local('Quicksand Light'),
         url('/static/fonts/Quicksand-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* === Blur Fade-Up Keyframe ================================ */
/* Used by .animate-enter (load) and hero entrance           */
@keyframes blurFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
}

/* === Scroll Reveal ======================================== */
/* Start hidden; JS adds .revealed when element enters view  */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(6px);
    transition:
        opacity   0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        filter    0.60s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}
/* Grid stagger helpers */
.reveal-d1 { transition-delay: 0.05s; }
.reveal-d2 { transition-delay: 0.13s; }
.reveal-d3 { transition-delay: 0.22s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.44s; }
.reveal-d6 { transition-delay: 0.58s; }

/* === Hero Logo Canvas Tile ================================ */
/* Logo repeated as a rotated wallpaper pattern              */
.hero-logo-canvas {
    opacity: 0.055;
    transform: rotate(-18deg) scale(1.35);
    filter: saturate(2.5) contrast(0.9);
    transform-origin: center center;
    animation: canvasDrift 20s ease-in-out infinite;
    will-change: opacity;
}

@keyframes canvasDrift {
    0%,  100% { opacity: 0.048; }
    50%        { opacity: 0.068; }
}

/* === Hero Logo Ambient (legacy / kept for compatibility) == */
.hero-logo-ambient {
    width: 88vw;
    max-width: 980px;
    min-width: 420px;
    opacity: 0.06;
    filter: blur(2px) saturate(2.2);
    animation: ambientPulse 12s ease-in-out infinite;
    will-change: transform, opacity;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

@keyframes ambientPulse {
    0%,  100% { transform: scale(1.00) rotate(-1.5deg); opacity: 0.058; }
    35%        { transform: scale(1.07) rotate( 1.2deg); opacity: 0.076; }
    70%        { transform: scale(0.96) rotate(-0.6deg); opacity: 0.047; }
}

/* === Floating Orb Animation ============================== */
/* Background colour blobs drift in a slow organic path      */
@keyframes orbFloat {
    0%,  100% { transform: translate(  0px,   0px) scale(1.00); }
    20%        { transform: translate( 18px, -22px) scale(1.04); }
    40%        { transform: translate(-14px,  16px) scale(0.96); }
    60%        { transform: translate( 20px,  18px) scale(1.03); }
    80%        { transform: translate( -6px, -18px) scale(0.98); }
}

.orb-animated {
    animation: orbFloat var(--orb-dur, 15s) ease-in-out infinite;
    animation-delay: var(--orb-delay, 0s);
}

/* === Hero Glass — Premium Variant ======================== */
/* Deeper blur + saturate, stronger inset highlight,         */
/* subtle green-tinted outer glow from logo palette          */
.hero-glass {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(36px) saturate(1.5);
    -webkit-backdrop-filter: blur(36px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 2rem;
    box-shadow:
        0  0  0  1px rgba(255, 255, 255, 0.30),
        0  8px 48px rgba(28, 132, 82, 0.06),
        0 24px 80px rgba(180, 150, 150, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* === Reduced Motion ====================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-logo-canvas,
    .hero-logo-ambient,
    .orb-animated  { animation: none !important; }
    .animate-enter { animation: fadeIn 0.4s ease forwards !important; }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}
