/* Base palette — overridden by tenant theme_colors in index.blade.php */
:root {
    --background-color: #fff8f6;
    --bg-light: #fdeef2;
    --bg-gray: #f7e4ea;
    --text-dark: #3d2c33;
    --text-muted: #8a6d75;
    --text-color: #c45c7a;
    --text-light: #fffaf9;
    --primary: #c45c7a;
    --primary-dark: #8e3d56;
    --secondary: #3d6b5a;

    --t3-bg: var(--background-color);
    --t3-bg-elevated: var(--bg-light);
    --t3-surface: color-mix(in srgb, var(--primary) 6%, white);
    --t3-surface-hover: color-mix(in srgb, var(--primary) 10%, white);
    --t3-border: color-mix(in srgb, var(--primary) 18%, transparent);
    --t3-text: var(--text-dark);
    --t3-text-muted: var(--text-muted);
    --t3-accent: var(--primary);
    --t3-accent-2: var(--primary-dark);
    --t3-accent-glow: color-mix(in srgb, var(--primary) 28%, transparent);
    --t3-accent-soft: color-mix(in srgb, var(--primary) 12%, transparent);
    --t3-accent-border: color-mix(in srgb, var(--primary) 25%, transparent);
    --t3-accent-border-strong: color-mix(in srgb, var(--primary) 40%, transparent);
    --t3-accent-solid: color-mix(in srgb, var(--primary) 90%, transparent);
    --t3-leaf: var(--secondary);
    --t3-leaf-soft: color-mix(in srgb, var(--secondary) 15%, transparent);
    --t3-text-on-accent: var(--text-light);
    --t3-overlay: color-mix(in srgb, var(--background-color) 92%, transparent);
    --t3-overlay-strong: color-mix(in srgb, var(--background-color) 85%, transparent);
    --t3-overlay-nav: color-mix(in srgb, var(--bg-light) 98%, transparent);
    --t3-gradient-end: color-mix(in srgb, var(--primary-dark) 75%, transparent);
    --t3-card-gradient: linear-gradient(160deg, color-mix(in srgb, var(--bg-light) 90%, white) 0%, var(--bg-gray) 100%);
    --t3-shadow-color: color-mix(in srgb, var(--primary-dark) 20%, transparent);
    --t3-backdrop: color-mix(in srgb, var(--primary-dark) 25%, transparent);
    --t3-footer-fade: color-mix(in srgb, var(--primary) 8%, transparent);
    --t3-radius: 24px;
    --t3-radius-sm: 16px;
    --t3-radius-petal: 60% 40% 55% 45% / 48% 52% 48% 52%;
    --t3-shadow: 0 16px 48px var(--t3-shadow-color);
    --t3-font: 'Vazirmatn', Tahoma, sans-serif;
    --t3-header-h: 76px;
    --t3-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --t3-container-pad: 1rem;
    --t3-touch-min: 44px;
    --t3-safe-top: env(safe-area-inset-top, 0px);
    --t3-safe-bottom: env(safe-area-inset-bottom, 0px);
    --t3-safe-left: env(safe-area-inset-left, 0px);
    --t3-safe-right: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.theme3-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--t3-font);
    background: var(--t3-bg);
    color: var(--t3-text);
    line-height: 1.7;
    overflow-x: hidden;
    padding-bottom: var(--t3-safe-bottom);
    -webkit-tap-highlight-color: transparent;
}

body.t3-nav-open {
    overflow: hidden;
    touch-action: none;
}

.theme3-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--t3-header-h));
}

.container {
    width: min(1180px, calc(100% - (var(--t3-container-pad) * 2) - var(--t3-safe-left) - var(--t3-safe-right)));
    margin-inline: auto;
    padding-inline: max(var(--t3-safe-left), 0px) max(var(--t3-safe-right), 0px);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* Rose petal background */
.rose-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.rose-petal {
    position: absolute;
    border-radius: var(--t3-radius-petal);
    background: linear-gradient(145deg, color-mix(in srgb, var(--t3-accent) 35%, white), color-mix(in srgb, var(--t3-accent) 15%, white));
    opacity: 0.35;
    animation: petal-float 16s ease-in-out infinite alternate;
}

.rose-petal--1 { width: 180px; height: 140px; top: 8%; right: 5%; transform: rotate(25deg); }
.rose-petal--2 { width: 120px; height: 95px; top: 55%; right: 15%; animation-delay: -4s; transform: rotate(-15deg); opacity: 0.25; }
.rose-petal--3 { width: 150px; height: 115px; bottom: 10%; left: 8%; animation-delay: -8s; transform: rotate(40deg); }
.rose-petal--4 { width: 90px; height: 70px; top: 25%; left: 20%; animation-delay: -2s; opacity: 0.2; }
.rose-petal--5 { width: 200px; height: 155px; bottom: 25%; right: 30%; animation-delay: -11s; opacity: 0.18; }

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
    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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes petal-float {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(12px, -18px) rotate(8deg); }
}

.t3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--t3-touch-min);
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--t3-transition);
}

.t3-btn--primary {
    background: linear-gradient(135deg, var(--t3-accent), var(--t3-accent-2));
    color: var(--t3-text-on-accent);
    box-shadow: 0 8px 28px var(--t3-accent-glow);
}

.t3-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px var(--t3-accent-glow);
}

.t3-btn--ghost {
    background: white;
    border-color: var(--t3-accent-border);
    color: var(--t3-accent-2);
}

.t3-btn--ghost:hover {
    background: var(--t3-accent-soft);
}

.t3-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--t3-bg);
    transition: opacity 0.5s, visibility 0.5s;
}

.t3-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.t3-loader__cup {
    position: relative;
    width: 56px;
    height: 64px;
}

.t3-loader__cup::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 44px;
    height: 48px;
    margin-left: -22px;
    border-radius: 4px 4px 14px 14px;
    background: linear-gradient(180deg, var(--t3-accent-soft), white);
    border: 2px solid var(--t3-accent-border);
}

.t3-loader__steam {
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 16px;
    margin-left: -4px;
    background: var(--t3-accent);
    border-radius: 999px;
    opacity: 0.4;
    animation: steam-rise 1.2s ease-in-out infinite;
}

.t3-loader__rose {
    position: absolute;
    top: -6px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: var(--t3-radius-petal);
    background: var(--t3-accent);
    transform: rotate(35deg);
    animation: petal-pulse 1.4s ease infinite;
}

@keyframes steam-rise {
    0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.3; }
    50% { transform: translateY(-8px) scaleX(1.2); opacity: 0.6; }
}

@keyframes petal-pulse {
    0%, 100% { transform: rotate(35deg) scale(1); }
    50% { transform: rotate(35deg) scale(1.15); }
}

.t3-section-head {
    margin-bottom: 2rem;
    text-align: center;
}

.t3-section-head h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--t3-accent-2);
}

.t3-section-head p {
    margin: 0;
    color: var(--t3-text-muted);
}

@media (max-width: 992px) {
    :root {
        --t3-radius: 20px;
        --t3-container-pad: 0.875rem;
    }
}

@media (max-width: 768px) {
    :root {
        --t3-header-h: 64px;
        --t3-container-pad: 0.75rem;
    }

    .t3-btn {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    :root {
        --t3-header-h: 60px;
        --t3-container-pad: 0.625rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .rose-petal { animation: none; }
}
