/* ═══════════════════════════════════════════════════════════
   Pavăl Dent — Premium Design System 2026
   Magenta #733775 · Charcoal #1A1A2E · Cream #FAF7F5
   Bodoni Moda (display) · Inter (body) · JetBrains Mono (tech)
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens (inspired by Stripe, Vercel, Apple, Superhuman) ── */
:root {
    /* Timing */
    --t-fast:    200ms;
    --t-base:    300ms;
    --t-medium:  400ms;
    --t-slow:    500ms;
    --t-overlay: 800ms;
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out:    cubic-bezier(0.33, 1, 0.68, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Purple-tinted shadow system (Stripe pattern) */
    --shadow-xs:  rgba(115,55,117,0.06) 0px 2px 4px;
    --shadow-sm:  rgba(115,55,117,0.08) 0px 3px 8px;
    --shadow-md:  rgba(115,55,117,0.12) 0px 8px 24px, rgba(0,0,0,0.04) 0px 2px 6px;
    --shadow-lg:  rgba(115,55,117,0.15) 0px 20px 40px -15px, rgba(0,0,0,0.08) 0px 10px 20px -10px;
    --shadow-xl:  rgba(115,55,117,0.18) 0px 30px 50px -20px, rgba(0,0,0,0.10) 0px 15px 30px -15px;
    --shadow-glow: 0px 0px 0px 1px rgba(115,55,117,0.08), rgba(115,55,117,0.12) 0px 8px 24px;

    /* Spacing (8px grid) */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
    --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;
}

/* ── Base ─────────────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; position: relative; width: 100%; font-feature-settings: "ss01","cv01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Typography System (Stripe/Apple inspired) ──────────────── */
.font-heading {
    font-optical-sizing: auto;
    letter-spacing: -0.01em;
    font-variant-ligatures: no-common-ligatures;
    font-feature-settings: "liga" 0, "clig" 0, "kern" 1;
}

/* Display: hero headlines — tight tracking like Stripe */
.text-display {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.025em;
    line-height: 1.08;
    font-weight: 700;
}
.text-display * { line-height: inherit; }

/* Progressive letter-spacing per heading size */
h1 { letter-spacing: -0.03em; line-height: 1.08; }
h2 { letter-spacing: -0.02em; line-height: 1.1; }
h3 { letter-spacing: -0.015em; line-height: 1.15; }
h4 { letter-spacing: -0.01em; line-height: 1.2; }

/* Body — generous line-height (Apple/Superhuman) */
p { line-height: 1.5; }
li { line-height: 1.5; }

/* Monospace labels */
.label-tech {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .fab-pulse::before,.fab-pulse::after { display: none !important; }
    .hero-title .word { opacity: 1 !important; transform: none !important; }
}

/* ── Focus / Selection / Scrollbar ────────────────────────── */
*:focus-visible { outline: 2px solid #733775; outline-offset: 3px; border-radius: 4px; }
*:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(115,55,117,0.15); color: #1A1A2E; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(115,55,117,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(115,55,117,0.45); }


/* ══════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════ */

.nav-header { background: transparent; transition: background var(--t-slow) var(--ease-spring), box-shadow var(--t-slow) var(--ease-spring), backdrop-filter var(--t-slow) var(--ease-spring); }
.nav-border-b { position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: rgba(26,26,46,0); transition: background var(--t-slow) var(--ease-spring); }

/* Scrolled — frosted glass on white */
.nav-header.nav-scrolled { background: rgba(255,255,255,0.92); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.03); }
.nav-header.nav-scrolled .nav-border-b { background: rgba(0,0,0,0.06); }

/* Logo: default shows dark, white hidden. Overlay inverts. */
.logo-link { transition: filter var(--t-medium) var(--ease-spring); }
.logo-link:hover { filter: brightness(1.08); }
.logo-white { opacity: 0; transition: opacity var(--t-slow) var(--ease-spring); }
.logo-default { transition: opacity var(--t-slow) var(--ease-spring); }
.nav-open .logo-white { opacity: 1; }
.nav-open .logo-default { opacity: 0; }

/* Nav links */
.nav-link { position: relative; color: #1A1A2E; transition: color var(--t-base) var(--ease-spring); cursor: pointer; }
.nav-link:hover { color: #733775; }

/* Hero-dark mode: white text before scroll */
.nav-hero-dark .nav-link { color: rgba(255,255,255,0.85); }
.nav-hero-dark .nav-link:hover { color: #A668A8; }
.nav-hero-dark .nav-link.is-active { color: #A668A8; }
.nav-hero-dark .nav-dot { background: #A668A8; }
.nav-hero-dark .ham-line { background: #fff; }
.nav-hero-dark .logo-default { filter: brightness(0) invert(1); }
/* When scrolled, override hero-dark back to normal */
.nav-hero-dark.nav-scrolled .nav-link { color: #1A1A2E; }
.nav-hero-dark.nav-scrolled .nav-link:hover { color: #733775; }
.nav-hero-dark.nav-scrolled .nav-link.is-active { color: #733775; }
.nav-hero-dark.nav-scrolled .nav-dot { background: #733775; }
.nav-hero-dark.nav-scrolled .ham-line { background: #1A1A2E; }
.nav-hero-dark.nav-scrolled .logo-default { filter: none; }
.nav-link.is-active { color: #733775; }
.nav-dot { position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: #733775; transform: translateX(-50%) scale(1); animation: dotIn 400ms var(--ease-spring) forwards; }
@keyframes dotIn { from { transform: translateX(-50%) scale(0); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.nav-open .nav-link { color: #fff; }
.nav-open .nav-link.is-active { color: #733775; }

/* CTA — purple with shadow depth */
.nav-cta { transition: all 0.3s var(--ease-smooth); box-shadow: var(--shadow-md); }
.nav-cta-bg { position: absolute; inset: 0; border-radius: inherit; background: #733775; z-index: 1; }
.nav-cta-shimmer { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.15) 50%, transparent 65%); transform: translateX(-110%); z-index: 2; }
.nav-cta:hover .nav-cta-shimmer { transform: translateX(110%); transition: transform 600ms var(--ease-out); }
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); background: #5C2C5E; }
.nav-cta:active { transform: translateY(0); }

/* Hamburger — 2 lines */
.ham-box { width: 24px; height: 14px; position: relative; }
.ham-line { position: absolute; left: 0; height: 2px; background: #1A1A2E; border-radius: 2px; transition: all var(--t-slow) var(--ease-spring); }
.ham-top { top: 0; width: 100%; }
.ham-bottom { bottom: 0; width: 55%; }
.nav-open .ham-line { background: #fff; }
.nav-open .ham-top { top: 50%; width: 100%; transform: translateY(-50%) rotate(45deg); }
.nav-open .ham-bottom { bottom: 50%; width: 100%; transform: translateY(50%) rotate(-45deg); }

/* Overlay */
.nav-overlay { position: fixed; inset: 0; z-index: 55; pointer-events: none; visibility: hidden; }
.nav-overlay-bg { position: absolute; inset: 0; background: #1A1A2E; clip-path: circle(0% at calc(100% - 42px) 44px); transition: clip-path var(--t-overlay) var(--ease-spring); }
.nav-open .nav-overlay { pointer-events: auto; visibility: visible; }
.nav-open .nav-overlay-bg { clip-path: circle(150% at calc(100% - 42px) 44px); }
.overlay-item { opacity: 0; transform: translateY(30px); transition: opacity 600ms var(--ease-spring), transform 600ms var(--ease-spring); transition-delay: calc(var(--i, 0) * 60ms + 200ms); }
.nav-open .overlay-item { opacity: 1; transform: translateY(0); }
.overlay-side { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-spring), transform 600ms var(--ease-spring); transition-delay: calc(var(--i, 5) * 60ms + 200ms); }
.nav-open .overlay-side { opacity: 1; transform: translateY(0); }
.magnetic-hover { transition: transform var(--t-base) var(--ease-spring); }


/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */

.hero-mesh { background: radial-gradient(ellipse 70% 50% at 20% 20%, rgba(115,55,117,0.05) 0%, transparent 60%), radial-gradient(ellipse 50% 60% at 80% 80%, rgba(26,26,46,0.03) 0%, transparent 60%), radial-gradient(ellipse 80% 40% at 50% 0%, rgba(115,55,117,0.02) 0%, transparent 50%), #FFFFFF; position: relative; overflow: hidden; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; animation: orbFloat 20s ease-in-out infinite; pointer-events: none; }
.hero-orb-1 { width: 500px; height: 500px; background: rgba(115,55,117,0.08); top: -10%; left: -10%; }
.hero-orb-2 { width: 400px; height: 400px; background: rgba(107,114,128,0.06); bottom: -15%; right: -5%; animation-delay: -7s; }
.hero-orb-3 { width: 300px; height: 300px; background: rgba(115,55,117,0.04); top: 40%; right: 20%; animation-delay: -14s; }
@keyframes orbFloat { 0%,100% { transform: translate(0,0) scale(1); } 25% { transform: translate(30px,-20px) scale(1.05); } 50% { transform: translate(-20px,30px) scale(0.95); } 75% { transform: translate(20px,20px) scale(1.02); } }

.grain-overlay { position: relative; }
.grain-overlay::after { content: ''; position: absolute; inset: 0; opacity: 0.025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); pointer-events: none; z-index: 1; }

/* Title word-by-word */
.hero-title .word { display: inline-block; opacity: 0; transform: translateY(40px) rotateX(-15deg); transition: all 800ms var(--ease-spring); }
.hero-title.revealed .word { opacity: 1; transform: translateY(0) rotateX(0); }
.hero-title .word:nth-child(1) { transition-delay: 0.1s; }
.hero-title .word:nth-child(2) { transition-delay: 0.18s; }
.hero-title .word:nth-child(3) { transition-delay: 0.26s; }
.hero-title .word:nth-child(4) { transition-delay: 0.34s; }
.hero-title .word:nth-child(5) { transition-delay: 0.42s; }

/* Magenta gradient text */
.text-gradient-magenta { background: linear-gradient(135deg, #A668A8 0%, #733775 40%, #5C2C5E 70%, #A668A8 100%); background-size: 200% 200%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: magentaShift 6s ease-in-out infinite; }
@keyframes magentaShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-subtitle { opacity: 0; transform: translateY(20px); transition: all 800ms var(--ease-spring) 0.6s; }
.hero-subtitle.revealed { opacity: 1; transform: translateY(0); }
.hero-buttons { opacity: 0; transform: translateY(20px); transition: all 800ms var(--ease-spring) 0.8s; }
.hero-buttons.revealed { opacity: 1; transform: translateY(0); }
.hero-image-wrap { opacity: 0; transform: scale(0.92) translateY(20px); transition: all 1200ms var(--ease-spring) 0.4s; }
.hero-image-wrap.revealed { opacity: 1; transform: scale(1) translateY(0); }


/* ══════════════════════════════════════════════════════════
   CARDS, BUTTONS, COMPONENTS
   ══════════════════════════════════════════════════════════ */

/* Cards — purple-tinted shadows (Stripe), 6-8px radius (conservative) */
.card-subtle {
    border-radius: 8px;
    box-shadow: var(--shadow-glow);
    border: none;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}
.card-subtle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.card-glass { background: rgba(255,255,255,0.8); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: none; box-shadow: var(--shadow-sm); border-radius: 8px; }
.card-glass-dark { background: rgba(26,26,46,0.6); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }

/* Buttons — shadow depth, 6px radius (Stripe/Tesla) */
.btn-magenta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 14px 28px;
    background: #733775; color: #fff;
    font-weight: 600; font-size: 0.9375rem;
    border-radius: 6px; border: none; cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-md);
    position: relative; overflow: hidden;
}
.btn-magenta::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.15) 50%, transparent 65%); transform: translateX(-110%); transition: none; }
.btn-magenta:hover::before { transform: translateX(110%); transition: transform 600ms var(--ease-out); }
.btn-magenta:hover { background: #5C2C5E; transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.btn-magenta:active { transform: translateY(0); }

.btn-outline-dark {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 12px 26px;
    background: transparent; color: #1A1A2E;
    font-weight: 600; font-size: 0.9375rem;
    border-radius: 6px; border: 2px solid rgba(26,26,46,0.15);
    cursor: pointer; transition: all 0.3s var(--ease-smooth);
}
.btn-outline-dark:hover { background: #1A1A2E; color: #fff; border-color: #1A1A2E; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline-white {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 12px 26px;
    background: transparent; color: #fff;
    font-weight: 600; font-size: 0.9375rem;
    border-radius: 6px; border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer; transition: all 0.3s var(--ease-smooth);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }


/* ══════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════ */

@keyframes float { 0%,100% { transform: translateY(0) rotate(0deg); } 33% { transform: translateY(-10px) rotate(0.5deg); } 66% { transform: translateY(-5px) rotate(-0.3deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-33.33%); } }
@keyframes marqueeReverse { 0% { transform: translateX(-33.33%); } 100% { transform: translateX(0); } }
.marquee-track { animation: marquee 25s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.animate-float { animation: float 8s ease-in-out infinite; }
.counter-value { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }


/* ══════════════════════════════════════════════════════════
   PATTERNS & DECORATIVE
   ══════════════════════════════════════════════════════════ */

.line-pattern { background-image: repeating-linear-gradient(90deg, rgba(115,55,117,0.04) 0px, rgba(115,55,117,0.04) 1px, transparent 1px, transparent 80px); }
.hero-gradient { background: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(115,55,117,0.04) 0%, transparent 60%), radial-gradient(ellipse 60% 60% at 80% 100%, rgba(26,26,46,0.03) 0%, transparent 60%), #FFFFFF; }
.hero-dark { background: radial-gradient(ellipse 70% 50% at 30% 20%, rgba(115,55,117,0.12) 0%, transparent 60%), linear-gradient(to bottom, #1A1A2E, #2D2D42); }

.process-step { position: relative; }
.process-step::after { content: ''; position: absolute; top: 2rem; right: -50%; width: 100%; height: 1px; background: linear-gradient(90deg, #733775 0%, rgba(229,224,219,0.3) 100%); }
.process-step:last-child::after { display: none; }

.testimonial-card { position: relative; overflow: hidden; }
.testimonial-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(to bottom, #733775, transparent); }


/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */

/* Form fields — purple focus ring (Stripe pattern) */
.form-field {
    width: 100%; padding: 12px 16px;
    min-height: 44px;
    border: 1px solid rgba(115,55,117,0.15); border-radius: 6px;
    background: white; color: #1A1A2E; font-size: 0.9375rem;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-xs);
}
textarea.form-field { min-height: 88px; }

/* Mobile word-break for long Romanian text */
@media (max-width: 480px) {
    .hyphenate-mobile,
    main p,
    main h1,
    main h2,
    main h3,
    main h4 {
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
        -webkit-hyphens: auto;
    }
}
.form-field:focus {
    outline: none; border-color: #733775;
    box-shadow: 0 0 0 3px rgba(115,55,117,0.1), var(--shadow-xs);
}
.form-field::placeholder { color: #94A3B8; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #1A1A2E; margin-bottom: 0.375rem; }
.form-label .req { color: #733775; }


/* ══════════════════════════════════════════════════════════
   FAQ, PROSE, MISC
   ══════════════════════════════════════════════════════════ */

details > summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }
details[open] > summary .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 300ms var(--ease-spring); }

.prose-dental { color: #1A1A2E; max-width: 65ch; line-height: 1.75; }
.prose-dental h2 { font-family: 'Bodoni Moda', serif; font-size: 1.75rem; font-weight: 600; color: #1A1A2E; margin-top: 2.5rem; margin-bottom: 1rem; }
.prose-dental p { margin-bottom: 1rem; color: #6B7280; }
.prose-dental a { color: #733775; text-decoration: underline; text-underline-offset: 3px; }
.prose-dental a:hover { color: #5C2C5E; }
.prose-dental ul { margin: 1rem 0 1.25rem 1.5rem; list-style: disc; }
.prose-dental li { margin-bottom: 0.5rem; color: #6B7280; }

.badge-magenta { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: rgba(115,55,117,0.06); color: #5C2C5E; font-size: 0.75rem; font-weight: 600; border-radius: 9999px; }

.fab-pulse { position: fixed; }
.fab-pulse::before,.fab-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: pulse-ring 2.5s ease-out infinite; }
.fab-pulse::after { animation-delay: 1.25s; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { scrollbar-width: none; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Before/After comparison slider */
.ba-slider .ba-before img { min-width: 0; width: auto; height: 100%; }
.ba-handle { transform: translateX(-50%); cursor: ew-resize; }
.ba-handle > div:first-child { pointer-events: none; }

/* Section dividers — gradient (Apple pattern) */
.section-divider {
    height: 1px; border: none;
    background: linear-gradient(to right, rgba(115,55,117,0), rgba(115,55,117,0.15), rgba(115,55,117,0));
    margin: 0;
}

.img-frame { border: 3px solid #FFFFFF; box-shadow: var(--shadow-md); border-radius: 8px; }

/* ═══ Mobile drawer — elegant slide-in ═══ */
.mobile-drawer {
    box-shadow: -24px 0 48px -12px rgba(0,0,0,0.25);
    will-change: transform;
}
.mobile-drawer-overlay { will-change: opacity; }

/* Hamburger X transform when drawer open */
#nav-toggle.is-open .ham-top    { transform: rotate(45deg) translateY(4px); }
#nav-toggle.is-open .ham-bottom { transform: rotate(-45deg) translateY(-4px); }

/* Drawer submenu max-height animation */
.drawer-submenu { transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1); }

/* Nav dropdown — ensure above page content */
.nav-dropdown-panel {
    pointer-events: none;
    z-index: 100;
}
.group:hover .nav-dropdown-panel,
.nav-dropdown-wrap:hover .nav-dropdown-panel { pointer-events: auto; }

/* ═══ Image hover zoom — 6 Corners style (wrapper + scale) ═══ */
.img-zoom-wrap { overflow: hidden; }
.img-zoom-wrap img { transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1); }
.img-zoom-wrap:hover img,
.group:hover .img-zoom { transform: scale(1.1); }

/* Service card top/bottom line expand on hover */
.service-card-head { position: relative; }
.service-card-head::before,
.service-card-head::after {
    content: ''; position: absolute; left: 0; right: 0; height: 1px;
    background: rgba(115, 55, 117, 0.3);
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card-head::before { top: 0; }
.service-card-head::after  { bottom: 0; }
@media (hover: hover) {
    .service-card:hover .service-card-head::before { transform: translateY(-0.5rem); }
    .service-card:hover .service-card-head::after  { transform: translateY(0.5rem); }
}

/* ═══ Gallery floating effect — subtle continuous bob + hover lift ═══ */
@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.gallery-item {
    animation: floatUp 6s ease-in-out infinite;
    will-change: transform;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 500ms ease;
}
.gallery-item:nth-child(4n+1) { animation-duration: 6.0s; animation-delay: 0s; }
.gallery-item:nth-child(4n+2) { animation-duration: 7.5s; animation-delay: -1.5s; }
.gallery-item:nth-child(4n+3) { animation-duration: 6.8s; animation-delay: -2.8s; }
.gallery-item:nth-child(4n+4) { animation-duration: 8.2s; animation-delay: -0.7s; }

@media (hover: hover) {
    .gallery-item:hover {
        transform: translateY(-8px) scale(1.02);
        animation-play-state: paused;
        z-index: 10;
    }
    .gallery-item:hover > div {
        box-shadow: rgba(115,55,117,0.35) 0px 30px 60px -20px, rgba(0,0,0,0.15) 0px 10px 25px -10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item { animation: none !important; }
}

/* ═══ Webflow-inspired enhancements ═══════════════════════════ */

/* Expanding line frame — services cards hover (like 6 Corners Dental) */
.frame-line-wrap { position: relative; overflow: hidden; }
.frame-line-wrap::before,
.frame-line-wrap::after {
    content: ''; position: absolute; left: 0; right: 0; height: 1px;
    background: rgba(115,55,117,0.25); transition: transform var(--t-medium) var(--ease-spring);
    pointer-events: none; z-index: 2;
}
.frame-line-wrap::before { top: 0; }
.frame-line-wrap::after  { bottom: 0; }
.frame-line-wrap:hover::before { transform: translateY(-0.5rem); }
.frame-line-wrap:hover::after  { transform: translateY(0.5rem); }

/* Polygon / triangle decorative float shapes */
.deco-polygon {
    position: absolute; pointer-events: none; opacity: 0.5;
    filter: drop-shadow(0 8px 24px rgba(115,55,117,0.12));
    animation: deco-float 10s ease-in-out infinite;
}
.deco-polygon.is-2 { animation-delay: -3s; animation-duration: 14s; }
.deco-polygon.is-3 { animation-delay: -6s; animation-duration: 12s; }
.deco-polygon.is-4 { animation-delay: -9s; animation-duration: 16s; }

@keyframes deco-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(6px, -14px) rotate(8deg); }
}

/* Hero reveal — auto-play on load (Webflow-style, no scroll trigger) */
@keyframes heroRiseIn {
    0%   { opacity: 0; transform: translateY(56px) scale(0.96); filter: blur(6px); }
    40%  { opacity: 0.8; filter: blur(2px); }
    100% { opacity: 1; transform: translateY(0) scale(1);       filter: blur(0); }
}
@keyframes heroImageIn {
    0%   { opacity: 0; transform: scale(1.12); clip-path: inset(20% 10% 20% 10% round 16px); }
    100% { opacity: 1; transform: scale(1);    clip-path: inset(0 0 0 0 round 0); }
}
.hero-rise {
    opacity: 0;
    transform: translateY(56px) scale(0.96);
    filter: blur(6px);
    animation: heroRiseIn 1.4s var(--ease-spring) forwards;
    animation-delay: 400ms;
}
.hero-rise[data-delay="1"] { animation-delay: 600ms; }
.hero-rise[data-delay="2"] { animation-delay: 800ms; }
.hero-rise[data-delay="3"] { animation-delay: 1000ms; }
.hero-rise[data-delay="4"] { animation-delay: 1200ms; }
.hero-rise[data-delay="5"] { animation-delay: 1400ms; }
.hero-image-in {
    opacity: 0;
    animation: heroImageIn 1.6s var(--ease-spring) 200ms forwards;
}

@media (prefers-reduced-motion: reduce) {
    .hero-rise, .hero-image-in { opacity: 1 !important; animation: none !important; transform: none !important; filter: none !important; clip-path: none !important; }
}

/* Header line divider — above/below h2 decoration */
.header-divider {
    display: block; width: 3rem; height: 2px;
    background: linear-gradient(90deg, transparent, var(--pa-magenta, #733775), transparent);
    margin: 1rem auto; opacity: 0.4;
}

@media print { .no-print { display: none !important; } body { background: white; color: black; } }
