/*
 * nzc-base — foundations of the public website: reset, type, atmosphere, spring motion tokens.
 * Colours and shapes come from the active theme (see ThemeCompiler); nothing here is theme specific.
 * Direction is RTL first and every rule uses logical properties.
 */
:root {
    --nzc-font-body: 'YekanBakhFa', 'YekanBakh', 'Vazirmatn', sans-serif;
    --nzc-font-display: 'Abar', 'YekanBakhFa', 'Vazirmatn', sans-serif;

    /* Spring easings. nzc-motion.js replaces these with real physics curves (CSS linear());
       the cubic-bezier values below are the graceful fallback. */
    --nzc-ease-soft: cubic-bezier(.22, 1, .36, 1);
    --nzc-ease-snappy: cubic-bezier(.2, 1.2, .3, 1);
    --nzc-ease-bouncy: cubic-bezier(.34, 1.56, .64, 1);
    --nzc-dur-soft: 640ms;
    --nzc-dur-snappy: 460ms;
    --nzc-dur-bouncy: 720ms;
    --nzc-ease-out: cubic-bezier(.16, 1, .3, 1);

    --nzc-container: 1200px;
    --nzc-gutter: clamp(1rem, 3vw, 1.75rem);

    /* Textures (data URIs, no requests) */
    --nzc-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    --nzc-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23000' stroke-width='1'%3E%3Crect x='14' y='14' width='44' height='44'/%3E%3Crect x='14' y='14' width='44' height='44' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100vh; background: var(--nzc-bg); color: var(--nzc-text);
    font-family: var(--nzc-font-body); font-size: 1rem; line-height: 1.85; font-feature-settings: 'ss01';
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    transition: background-color .5s var(--nzc-ease-out), color .5s var(--nzc-ease-out);
}
button, input, select, textarea, optgroup, option { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--nzc-font-display); font-weight: 800; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--nzc-primary); outline-offset: 3px; border-radius: var(--nzc-r-s); }
::selection { background: rgba(var(--nzc-glow), .35); }

[hidden] { display: none !important; }

.nzc-container { width: min(var(--nzc-container), 100% - var(--nzc-gutter) * 2); margin-inline: auto; }
.nzc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nzc-num { font-family: var(--nzc-font-display); font-variant-numeric: tabular-nums; }
.nzc-muted { color: var(--nzc-text-2); }
.nzc-ltr { direction: ltr; unicode-bidi: isolate; }

/* Atmosphere: a soft fixed backdrop behind everything. Each theme decides how much of it shows. */
.nzc-atmo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.nzc-atmo::before, .nzc-atmo::after { content: ''; position: absolute; inset: -20%; }
.nzc-atmo::before {
    background:
        radial-gradient(38% 34% at 82% 8%, rgba(var(--nzc-glow), .16), transparent 70%),
        radial-gradient(30% 30% at 8% 92%, rgba(var(--nzc-glow), .09), transparent 70%);
}
.nzc-atmo::after { background: var(--nzc-grain); opacity: .05; mix-blend-mode: overlay; inset: 0; }
[data-nzc-theme="bazar"] .nzc-atmo::after { opacity: .16; mix-blend-mode: multiply; }
[data-nzc-theme="bazar"][data-nzc-mode="dark"] .nzc-atmo::after { opacity: .08; mix-blend-mode: overlay; }

/* Geometric star lattice used as a quiet ornament (hero, empty states) */
.nzc-lattice { position: absolute; inset: 0; pointer-events: none; background: var(--nzc-star) center / 72px 72px; opacity: var(--nzc-pattern, 0);
    -webkit-mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent 78%); mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent 78%); }
.nzc-lattice { filter: invert(var(--nzc-lattice-invert, 0)); }
[data-nzc-mode="dark"] { --nzc-lattice-invert: 1; }

/* Scroll / mount reveal: rise + fade, staggered by --i */
[data-nzc-reveal] { opacity: 0; transform: translateY(18px); }
[data-nzc-reveal].is-in {
    opacity: 1; transform: none;
    transition: opacity .6s var(--nzc-ease-out) calc(var(--i, 0) * 70ms), transform var(--nzc-dur-soft) var(--nzc-ease-soft) calc(var(--i, 0) * 70ms);
}
/* listing cards get a touch more life: a small pop (scale) on top of the rise, springier easing */
.nzc-ticket[data-nzc-reveal] { transform: translateY(18px) scale(.96); }
.nzc-ticket[data-nzc-reveal].is-in { transition-timing-function: var(--nzc-ease-out), var(--nzc-ease-bouncy); }
.nzc-no-motion [data-nzc-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    [data-nzc-reveal] { opacity: 1; transform: none; }
}

/* Reduced motion / no-JS-animation state: reveal targets appear instantly */
.nzc-no-motion [data-nzc-reveal] { transition: none !important; }
