/* =========================================================================
   NIK — Public design system (Phase 9.5 visual fidelity port)
   Source of truth: nik-website (2).html reference prototype. Its visual
   language, component styling and motion system are ported here into a
   shared, reusable layer; page files under pages/ only add page layout.
   Dark, cinematic, editorial, restrained. Never hardcode raw colors in
   page CSS — everything flows from these tokens.
   ========================================================================= */

/* ----------------------------------------------------------------------
   1. Tokens
   ---------------------------------------------------------------------- */

:root {
    /* Palette */
    --obsidian: #0b0b0d;
    --obsidian-2: #111114;
    --obsidian-3: #1a1a1f;
    --obsidian-4: #202024;
    --ivory: #f5f2ed;
    --ivory-dim: #eae3d6;
    --ivory-line: rgba(11, 11, 13, 0.12);
    --burgundy: #4a0717;
    --burgundy-light: #7a1b2e;
    --burgundy-glow: rgba(74, 7, 23, 0.55);
    --rose: #b9828f;
    --champagne: #c8b08a;
    --champagne-light: #e6d3a9;
    --champagne-deep: #a8895e;
    --champagne-dim: rgba(200, 176, 138, 0.5);

    /* Ivory at opacity steps (reference: w-92 / w-72 / w-56 / w-38 / w-18) */
    --w-92: rgba(245, 242, 237, 0.92);
    --w-72: rgba(245, 242, 237, 0.72);
    --w-56: rgba(245, 242, 237, 0.56);
    --w-38: rgba(245, 242, 237, 0.38);
    --w-18: rgba(245, 242, 237, 0.14);

    /* Semantic text aliases (kept for existing page CSS) */
    --text-primary: var(--w-92);
    --text-secondary: var(--w-72);
    --text-muted: var(--w-56);
    --text-faint: var(--w-38);

    /* Lines + surfaces */
    --line: rgba(245, 242, 237, 0.1);
    --line-strong: rgba(200, 176, 138, 0.38);
    --surface: rgba(245, 242, 237, 0.035);
    --surface-strong: rgba(245, 242, 237, 0.07);
    --surface-page: var(--obsidian);
    --surface-raised: var(--obsidian-2);
    --surface-card: var(--obsidian-3);
    --surface-header: rgba(11, 11, 13, 0.78);
    --border-subtle: var(--line);
    --border-strong: rgba(245, 242, 237, 0.16);
    --border-champagne: var(--line-strong);

    /* Typography families — swapped per locale below */
    --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --serif-style: italic; /* editorial statements are italic in English */

    /* Radii (reference: 26 / 16 / 10) */
    --radius-lg: 26px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-pill: 100px;

    /* Layout */
    --container-max: 1280px;
    --container-pad: clamp(20px, 5vw, 64px);
    --header-height: 84px;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2.5rem;
    --space-6: 4rem;
    --space-7: 6rem;
    --space-8: 9rem;
    --section-pad: clamp(90px, 11vw, 150px);

    /* Motion (reference premium easing) */
    --ease: cubic-bezier(0.19, 0.86, 0.24, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: var(--ease);
    --transition-fast: 350ms var(--ease);
    --transition-slow: 550ms var(--ease);

    /* Derived tints */
    --glow-champagne: rgba(200, 176, 138, 0.14);
    --sheen-ivory: color-mix(in srgb, var(--ivory) 7%, transparent);
    --facet-line: color-mix(in srgb, var(--ivory) 11%, transparent);
}

/* Persian: IRANSans (self-hosted, licensed — see assets/fonts/iransans/README.md)
   for headings, UI and body; Vazirmatn is the fallback until the files exist. */
html[lang="fa"] {
    --font-serif: "IRANSansX", "IRANSans", "Vazirmatn", system-ui, Tahoma, sans-serif;
    --font-sans: "IRANSansX", "IRANSans", "Vazirmatn", system-ui, Tahoma, sans-serif;
    --font-ui: "IRANSansX", "IRANSans", "Vazirmatn", system-ui, Tahoma, sans-serif;
    --serif-style: normal;
}

/* ----------------------------------------------------------------------
   2. Reset / base
   ---------------------------------------------------------------------- */

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

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

body {
    margin: 0;
    position: relative;
    background: var(--surface-page);
    color: var(--w-92);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Film-grain ambience: fixed SVG noise, extremely subtle, never blocks input. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.55;
    mix-blend-mode: overlay;
}

main {
    flex: 1;
    position: relative;
    z-index: 2;
}

img,
video {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    font: inherit;
    color: inherit;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

:focus-visible {
    outline: 2px solid var(--champagne);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--champagne);
    color: #1a1310;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------------------------------------------------
   3. Typography
   ---------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 var(--space-4);
    color: var(--ivory);
    text-wrap: balance;
}

html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="fa"] h4 {
    letter-spacing: 0;
    line-height: 1.35;
}

h1,
.display-1 {
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    font-weight: 400;
}

h2,
.display-2,
h2.section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

/* Editorial / statement headings: italic Fraunces in EN, upright Vazirmatn in FA. */
.serif,
.statement {
    font-family: var(--font-serif);
    font-style: var(--serif-style);
    font-weight: 400;
}

html[lang="fa"] .serif,
html[lang="fa"] .statement {
    font-weight: 600;
}

p {
    margin: 0 0 var(--space-3);
    color: var(--w-72);
}

.lead,
.section-desc {
    color: var(--w-56);
    font-size: clamp(1rem, 1.25vw, 1.05rem);
    line-height: 1.85;
    font-weight: 300;
    max-width: 620px;
}

html[lang="fa"] .lead,
html[lang="fa"] .section-desc {
    font-weight: 400;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--champagne);
    margin-bottom: 20px;
}

html[lang="fa"] .eyebrow {
    letter-spacing: 0.08em; /* Persian script does not track like Latin */
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--champagne);
    display: inline-block;
    flex-shrink: 0;
}

/* Centered eyebrows close with a symmetric rule */
.eyebrow-center {
    justify-content: center;
}

.eyebrow-center::after {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--champagne);
    display: inline-block;
    flex-shrink: 0;
}

.section-heading > :last-child {
    margin-bottom: 0;
}

.section-heading .lead {
    margin-top: 18px;
}

.section-heading--center {
    text-align: center;
    margin-inline: auto;
}

.section-heading--center .lead {
    margin-inline: auto;
}

/* Ivory editorial break */
.on-ivory {
    background: var(--ivory);
    color: var(--obsidian);
}

.on-ivory h1,
.on-ivory h2,
.on-ivory h3,
.on-ivory h4 {
    color: var(--obsidian);
}

.on-ivory p,
.on-ivory .lead,
.on-ivory .section-desc {
    color: rgba(11, 11, 13, 0.62);
}

.on-ivory .eyebrow {
    color: var(--burgundy);
}

.on-ivory .eyebrow::before,
.on-ivory .eyebrow-center::after {
    background: var(--burgundy);
}

/* ----------------------------------------------------------------------
   4. Layout
   ---------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    position: relative;
    z-index: 2;
}

section {
    position: relative;
    z-index: 2;
}

.section,
.section-pad {
    padding-block: var(--section-pad);
}

.section-head {
    margin-bottom: 60px;
}

.page-shell {
    padding-block: calc(var(--header-height) + var(--space-7)) var(--space-8);
}

.raised {
    background: var(--obsidian-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* ----------------------------------------------------------------------
   5. Buttons (pill, champagne metallic primary, glass ghost)
   ---------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
    transition:
        transform 0.4s var(--ease),
        box-shadow 0.4s var(--ease),
        background 0.4s var(--ease),
        border-color 0.4s var(--ease),
        color 0.4s var(--ease);
}

.btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--champagne-light), var(--champagne) 55%, var(--champagne-deep));
    color: #1c1410;
    box-shadow: 0 10px 30px -10px rgba(200, 176, 138, 0.5);
}

.btn-primary:hover {
    box-shadow: 0 16px 38px -10px rgba(200, 176, 138, 0.65);
}

.btn-ghost,
.btn-outline {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--w-92);
}

.btn-ghost:hover,
.btn-outline:hover {
    background: var(--surface-strong);
    border-color: var(--champagne);
}

.on-ivory .btn-ghost,
.on-ivory .btn-outline {
    border-color: rgba(11, 11, 13, 0.22);
    color: var(--obsidian);
    background: rgba(11, 11, 13, 0.03);
}

.on-ivory .btn-ghost:hover,
.on-ivory .btn-outline:hover {
    border-color: var(--burgundy);
    background: rgba(11, 11, 13, 0.06);
}

.btn-sm {
    padding: 12px 22px;
    font-size: 0.78rem;
}

.btn-arrow {
    display: inline-block;
}

html[dir="rtl"] .btn-arrow,
html[dir="rtl"] .btn svg[data-arrow] {
    transform: scaleX(-1);
}

/* ----------------------------------------------------------------------
   6. Glass surface
   ---------------------------------------------------------------------- */

.glass {
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.5s var(--ease);
}

.card:hover {
    border-color: var(--line-strong);
    background: var(--surface-strong);
}

/* Tags / chips */
.tag,
.chip,
.fidelity-chip,
.deliverable-chip {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    font-size: 0.78rem;
    color: var(--w-72);
    background: var(--surface);
    transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.chip--soft {
    border-color: var(--line);
    color: var(--w-56);
    padding: 6px 14px;
    font-size: 0.76rem;
}

.chip:hover,
.tag:hover,
.fidelity-chip:hover,
.deliverable-chip:hover {
    border-color: var(--champagne);
    color: var(--champagne-light);
}

/* ----------------------------------------------------------------------
   7. Reveal system (progressive: hidden only once motion.js tags <html>)
   ---------------------------------------------------------------------- */

html.js-reveal .reveal,
html.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

html.js-reveal .reveal.in,
html.js-reveal [data-reveal].in {
    opacity: 1;
    transform: translateY(0);
}

html.js-reveal .reveal-d1.in { transition-delay: 0.08s; }
html.js-reveal .reveal-d2.in { transition-delay: 0.16s; }
html.js-reveal .reveal-d3.in { transition-delay: 0.24s; }
html.js-reveal .reveal-d4.in { transition-delay: 0.32s; }
html.js-reveal .reveal-d5.in { transition-delay: 0.4s; }

/* ----------------------------------------------------------------------
   8. Scroll progress + custom cursor (fine pointer only)
   ---------------------------------------------------------------------- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--burgundy-light), var(--champagne));
    z-index: 300;
    transition: width 0.08s linear;
    pointer-events: none;
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 250;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
    display: none;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring {
    display: flex;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--champagne);
}

.cursor-ring {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    align-items: center;
    justify-content: center;
    transition:
        width 0.3s var(--ease),
        height 0.3s var(--ease),
        border-color 0.3s var(--ease),
        background 0.3s var(--ease);
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--champagne-light);
    background: rgba(11, 11, 13, 0.15);
}

html[lang="fa"] .cursor-ring {
    letter-spacing: 0.02em;
}

.cursor-ring span {
    opacity: 0;
    transition: opacity 0.25s;
}

.cursor-ring.show-label {
    width: 76px;
    height: 76px;
    background: rgba(11, 11, 13, 0.55);
    border-color: var(--champagne);
}

.cursor-ring.show-label span {
    opacity: 1;
}

body.has-cursor,
body.has-cursor * {
    cursor: none !important;
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}

/* ----------------------------------------------------------------------
   9. Header
   ---------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    border-bottom: 1px solid transparent;
    transition:
        background 0.5s var(--ease),
        border-color 0.5s var(--ease),
        padding 0.5s var(--ease);
}

.site-header.is-scrolled {
    background: var(--surface-header);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--line);
    padding-top: 16px;
    padding-bottom: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    color: var(--ivory);
}

.brand .nik-mark {
    width: 28px;
    height: auto;
    flex-shrink: 0;
}

.brand small {
    display: block;
    font-size: 0.54rem;
    letter-spacing: 0.3em;
    color: var(--champagne);
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 2px;
    font-family: var(--font-ui);
}

html[lang="fa"] .brand small {
    letter-spacing: 0.1em;
}

.brand .site-brand-logo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 160px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 38px;
}

.site-nav a {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--w-56);
    position: relative;
    padding: 4px 0;
    letter-spacing: 0.01em;
    transition: color 0.35s;
}

.site-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--champagne);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}

html[dir="rtl"] .site-nav a::after {
    transform-origin: right;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--w-92);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

.site-nav a.is-active::after {
    opacity: 0.6;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Header CTA: on Home it appears once the hero has scrolled past (motion.js);
   inner pages show it immediately. */
.header-cta[data-header-cta="home"] {
    display: none;
}

.header-cta[data-header-cta="home"].is-visible {
    display: inline-flex;
}

/* Language switch: segmented pill */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--line);
}

.lang-switch a {
    color: var(--w-38);
    font-family: "Inter", var(--font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: all 0.35s var(--ease);
}

.lang-switch a.is-active {
    background: var(--champagne);
    color: #201609;
}

.lang-switch a:not(.is-active):hover {
    color: var(--w-92);
}

/* Burger */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle .bar {
    width: 16px;
    height: 1.5px;
    background: var(--w-92);
    display: block;
    transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* Full-screen mobile navigation */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(9, 7, 7, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-14px);
    transition:
        opacity 0.45s var(--ease),
        transform 0.45s var(--ease),
        visibility 0s linear 0.45s;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.mobile-nav a:not(.btn) {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--w-92);
    transition: color 0.3s;
}

.mobile-nav a:not(.btn):hover,
.mobile-nav a.is-active {
    color: var(--champagne-light);
}

.mobile-nav .btn {
    margin-top: 12px;
}

.mobile-nav .lang-switch {
    margin-top: 12px;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .site-nav,
    .site-header .header-cta {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }
}

/* ----------------------------------------------------------------------
   10. NIK mark
   ---------------------------------------------------------------------- */

.nik-mark {
    display: block;
    width: 40px;
    height: auto;
}

/* ----------------------------------------------------------------------
   11. World plate — signature layered material visual
   ---------------------------------------------------------------------- */

.world-plate {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--obsidian-2);
    transform-style: preserve-3d;
    perspective: 900px;
    transition: transform 0.55s var(--ease), border-color 0.55s var(--ease);
}

.world-plate.is-tilting {
    transition: border-color 0.55s var(--ease);
}

.wp-layer {
    position: absolute;
    inset: -12%;
    transition: transform 0.1s linear;
    will-change: transform;
    pointer-events: none;
}

.wp-bg {
    inset: -18%;
}

.wp-bloom {
    mix-blend-mode: screen;
    opacity: 0.85;
}

.wp-facets {
    opacity: 0.55;
    mix-blend-mode: overlay;
}

.wp-facets svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wp-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wp-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 90px 20px rgba(0, 0, 0, 0.55);
}

/* Real photography stays primary: the image layer sits above the material
   layers, the grain/vignette/label still frame it. */
.wp-image {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.wp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.world-plate:hover .wp-image img {
    transform: scale(1.04);
}

.wp-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 22px 24px;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(9, 7, 7, 0.86) 0%, rgba(9, 7, 7, 0.1) 60%, transparent 100%);
}

.wp-label .cat {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--champagne-light);
    margin-bottom: 6px;
}

html[lang="fa"] .wp-label .cat {
    letter-spacing: 0.04em;
}

.wp-label .wp-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: var(--serif-style);
    font-size: 1.1rem;
    color: var(--ivory);
    margin: 0;
    line-height: 1.3;
}

html[lang="fa"] .wp-label .wp-title {
    font-weight: 600;
}

.wp-index {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px;
    z-index: 3;
    font-family: var(--font-serif);
    font-style: var(--serif-style);
    color: var(--champagne-dim);
    font-size: 0.85rem;
    pointer-events: none;
}

.wp-mark {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.55;
}

.wp-mark .nik-mark {
    width: 44px;
}

/* Material themes (reference values) */
.plate-obsidian .wp-bg { background: radial-gradient(circle at 32% 28%, #2a2a30, #0b0b0d 68%); }
.plate-obsidian .wp-bloom { background: radial-gradient(circle at 65% 70%, rgba(200, 176, 138, 0.28), transparent 60%); }
.plate-gold .wp-bg { background: radial-gradient(circle at 30% 25%, #5a4a2e, #0b0b0d 70%); }
.plate-gold .wp-bloom { background: radial-gradient(circle at 70% 30%, rgba(230, 211, 169, 0.4), transparent 55%); }
.plate-burgundy .wp-bg { background: radial-gradient(circle at 40% 70%, #5c0f22, #0b0b0d 70%); }
.plate-burgundy .wp-bloom { background: radial-gradient(circle at 30% 20%, rgba(122, 27, 46, 0.5), transparent 60%); }
.plate-glass .wp-bg { background: radial-gradient(circle at 60% 35%, #3a3a42, #0b0b0d 70%); }
.plate-glass .wp-bloom { background: radial-gradient(circle at 40% 60%, rgba(245, 242, 237, 0.22), transparent 55%); }
.plate-liquid .wp-bg { background: radial-gradient(circle at 45% 55%, #463526, #0b0b0d 72%); }
.plate-liquid .wp-bloom { background: radial-gradient(circle at 60% 45%, rgba(200, 176, 138, 0.32), transparent 58%); }
.plate-smoke .wp-bg { background: radial-gradient(circle at 55% 40%, #28242a, #0b0b0d 70%); }
.plate-smoke .wp-bloom { background: radial-gradient(circle at 35% 65%, rgba(185, 130, 143, 0.28), transparent 60%); }
.plate-dust .wp-bg { background: radial-gradient(circle at 35% 60%, #3d372c, #0b0b0d 72%); }
.plate-dust .wp-bloom { background: radial-gradient(circle at 65% 35%, rgba(230, 211, 169, 0.26), transparent 58%); }
.plate-rose .wp-bg { background: radial-gradient(circle at 50% 30%, #4a2c33, #0b0b0d 70%); }
.plate-rose .wp-bloom { background: radial-gradient(circle at 40% 65%, rgba(185, 130, 143, 0.34), transparent 58%); }

/* Legacy .mv-* aliases (older markup) map onto the plate backgrounds */
.mv-obsidian { background: radial-gradient(circle at 32% 28%, #2a2a30, #0b0b0d 68%); }
.mv-gold { background: radial-gradient(circle at 30% 25%, #5a4a2e, #0b0b0d 70%); }
.mv-burgundy { background: radial-gradient(circle at 40% 70%, #5c0f22, #0b0b0d 70%); }
.mv-glass { background: radial-gradient(circle at 60% 35%, #3a3a42, #0b0b0d 70%); }
.mv-liquid { background: radial-gradient(circle at 45% 55%, #463526, #0b0b0d 72%); }
.mv-smoke { background: radial-gradient(circle at 55% 40%, #28242a, #0b0b0d 70%); }
.mv-rose { background: radial-gradient(circle at 50% 30%, #4a2c33, #0b0b0d 70%); }

/* ----------------------------------------------------------------------
   12. Project card (world plate, 4:5)
   ---------------------------------------------------------------------- */

.work-card {
    display: block;
    aspect-ratio: 4 / 5;
    color: inherit;
}

.work-card.world-plate {
    cursor: pointer;
}

.work-card:hover,
.work-card:focus-visible {
    transform: translateY(-8px);
    border-color: var(--line-strong);
}

.work-card.is-tilting:hover {
    /* tilt writes its own transform; keep the lift via inner layers */
    border-color: var(--line-strong);
}

/* ----------------------------------------------------------------------
   13. Service card (glass)
   ---------------------------------------------------------------------- */

.service-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 38px 30px;
    position: relative;
    color: inherit;
    transition: transform 0.5s var(--ease), border-color 0.5s, background 0.5s;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-8px);
    border-color: var(--line-strong);
    background: var(--surface-strong);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(200, 176, 138, 0.22), rgba(200, 176, 138, 0.03));
    border: 1px solid var(--line-strong);
    margin-bottom: 24px;
    color: var(--champagne);
}

.service-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.service-card h3 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    font-style: normal;
    margin-bottom: 12px;
}

.service-card p.desc {
    color: var(--w-56);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 300;
}

.service-includes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    list-style: none;
}

.service-includes > li {
    font-size: 0.72rem;
    color: var(--w-38);
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    display: inline-block;
}

.service-outcome {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--champagne-light);
    font-style: var(--serif-style);
    font-family: var(--font-serif);
}

html[lang="fa"] .service-outcome {
    letter-spacing: 0;
}

/* ----------------------------------------------------------------------
   14. Article card (world plate 16:11 + editorial meta)
   ---------------------------------------------------------------------- */

.article-card {
    display: block;
    color: inherit;
    cursor: pointer;
}

.article-card .world-plate {
    aspect-ratio: 16 / 11;
    margin-bottom: 20px;
}

.article-card:hover .world-plate,
.article-card:focus-visible .world-plate {
    transform: translateY(-6px);
}

.j-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--champagne);
    font-weight: 600;
}

html[lang="fa"] .j-meta {
    letter-spacing: 0.02em;
}

.j-meta .dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--w-38);
}

.j-meta .read-time {
    color: var(--w-38);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.article-card h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: var(--serif-style);
    font-size: 1.25rem;
    color: var(--ivory);
    margin-bottom: 10px;
    line-height: 1.4;
}

html[lang="fa"] .article-card h3 {
    font-weight: 600;
}

.article-card p.excerpt {
    color: var(--w-56);
    font-size: 0.88rem;
    line-height: 1.75;
    font-weight: 300;
    margin: 0;
}

/* ----------------------------------------------------------------------
   15. Filter pills
   ---------------------------------------------------------------------- */

.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 44px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 11px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--w-56);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.35s var(--ease);
}

.filter-pill.is-active,
.filter-pill:hover {
    border-color: var(--champagne);
    color: var(--w-92);
    background: var(--surface-strong);
}

/* ----------------------------------------------------------------------
   16. Flow (Belief) nodes
   ---------------------------------------------------------------------- */

.flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 64px;
    list-style: none;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 26px;
    position: relative;
}

.flow-node .dot {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
}

.flow-node .dot svg {
    width: 24px;
    height: 24px;
    stroke: var(--champagne);
}

.flow-node:hover .dot {
    border-color: var(--champagne);
    background: var(--surface-strong);
    transform: translateY(-4px);
}

.flow-node .lbl {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--w-56);
    font-weight: 600;
}

html[lang="fa"] .flow-node .lbl {
    letter-spacing: 0.02em;
}

.flow-arrow {
    width: 44px;
    height: 1px;
    background: var(--line-strong);
    position: relative;
    margin: 0 -2px;
}

.flow-arrow::after {
    content: "›";
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-56%);
    color: var(--champagne);
    font-size: 1rem;
}

html[dir="rtl"] .flow-arrow {
    transform: scaleX(-1);
}

@media (max-width: 720px) {
    .flow {
        gap: 14px 0;
        flex-direction: column;
    }

    .flow-arrow {
        width: 1px;
        height: 30px;
        margin: 6px 0;
    }

    .flow-arrow::after {
        content: "⌄";
        right: auto;
        left: 50%;
        transform: translate(-50%, -56%);
    }

    html[dir="rtl"] .flow-arrow {
        transform: none;
    }
}

/* ----------------------------------------------------------------------
   17. Marquee
   ---------------------------------------------------------------------- */

.marquee-wrap {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--obsidian-2);
    overflow: hidden;
    padding: 22px 0;
    position: relative;
    z-index: 2;
}

.marquee {
    display: flex;
    gap: 48px;
    white-space: nowrap;
    width: max-content;
    animation: scroll-x 34s linear infinite;
}

html[dir="rtl"] .marquee {
    animation-direction: reverse;
}

.marquee .grp {
    display: flex;
    align-items: center;
    gap: 48px;
    font-family: var(--font-serif);
    font-style: var(--serif-style);
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--w-56);
    list-style: none;
}

.marquee .grp i {
    color: var(--champagne);
    font-style: normal;
    font-size: 0.8rem;
}

@keyframes scroll-x {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

html[dir="rtl"] .marquee {
    animation-name: scroll-x-rtl;
}

@keyframes scroll-x-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee {
        animation: none;
    }
}

/* ----------------------------------------------------------------------
   18. Final invitation / CTA band (shared by inner pages)
   ---------------------------------------------------------------------- */

.invite {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: var(--obsidian-2);
    border-top: 1px solid var(--line);
    padding-block: var(--section-pad);
}

.invite::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(55% 65% at 50% 108%, var(--glow-champagne), transparent 72%);
}

.invite-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 720px;
    margin-inline: auto;
}

.invite-inner .nik-mark {
    width: 40px;
    margin-bottom: 34px;
    opacity: 0.9;
}

.invite-inner h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: var(--serif-style);
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    color: var(--ivory);
}

html[lang="fa"] .invite-inner h2 {
    font-weight: 600;
}

.invite-inner .lead {
    margin: 20px auto 44px;
    text-align: center;
}

/* ----------------------------------------------------------------------
   19. Footer
   ---------------------------------------------------------------------- */

.site-footer {
    position: relative;
    z-index: 2;
    padding: 70px 0 36px;
    border-top: 1px solid var(--line);
    margin-top: auto;
    background: var(--obsidian);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
    gap: 40px;
    padding-bottom: 44px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.footer-tag {
    color: var(--w-56);
    font-size: 0.9rem;
    max-width: 32ch;
    line-height: 1.85;
    margin-top: 16px;
    font-weight: 300;
}

.footer-col h4 {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--champagne);
    margin-bottom: 20px;
    font-weight: 600;
    font-style: normal;
}

html[lang="fa"] .footer-col h4 {
    letter-spacing: 0.04em;
}

.footer-col ul {
    list-style: none;
}

.footer-col a,
.footer-col .item {
    display: block;
    color: var(--w-56);
    font-size: 0.88rem;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--w-92);
}

.social-row {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    transition: all 0.4s var(--ease);
}

.social-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--w-92);
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--champagne);
    border-color: var(--champagne);
    transform: translateY(-4px);
}

.social-btn:hover svg {
    stroke: #1c1310;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--w-38);
}

.footer-phrase {
    font-family: var(--font-serif);
    font-style: var(--serif-style);
    color: var(--w-56);
}

/* ----------------------------------------------------------------------
   20. Utilities
   ---------------------------------------------------------------------- */

.text-center {
    text-align: center;
}

.muted {
    color: var(--w-56);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    inset-inline-start: var(--space-3);
    z-index: 400;
    background: var(--champagne);
    color: #1c1410;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
}

.skip-link:focus {
    top: var(--space-3);
}

/* Directional back links used on detail pages */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-5);
    font-family: var(--font-ui);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--w-56);
    transition: color 0.3s;
}

html[lang="fa"] .back-link {
    letter-spacing: 0.02em;
}

.back-link:hover {
    color: var(--champagne-light);
}

html[dir="rtl"] .back-link .btn-arrow {
    transform: scaleX(-1);
}

/* Outlined editorial numerals (why / process) */
.num-outline {
    font-family: var(--font-serif);
    font-style: var(--serif-style);
    font-weight: 400;
    color: transparent;
    -webkit-text-stroke: 1px var(--champagne-dim);
    line-height: 1;
}

/* Branded error pages */
.error-shell {
    text-align: center;
}

.error-inner {
    max-width: 640px;
    padding-block: var(--space-7);
}

.error-motif {
    color: var(--champagne);
    margin-bottom: var(--space-4);
}

.error-title {
    margin-bottom: var(--space-3);
}

.error-lead {
    margin-inline: auto;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

/* Legacy brand logo class (Settings logo) */
.site-brand-logo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 160px;
}

/* ----------------------------------------------------------------------
   21. Responsive
   ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .site-nav {
        gap: 26px;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 74px;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 460px) {
    .brand small {
        display: none;
    }

    .header-actions {
        gap: 10px;
    }

    .lang-switch a {
        padding: 7px 10px;
    }
}
