/* ==========================================================================
   تابلوساز درخشان — Luxury Minimal Design System
   Warm ivory base · antique-gold accent · Morabba display + IranYekanX body
   RTL-first, shared across all public pages.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "IranYekanX";
    src: url("fonts/IranYekanX/IRANYekanXVF.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("fonts/Morabba/Morabba-Light.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("fonts/Morabba/Morabba-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("fonts/Morabba/Morabba-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("fonts/Morabba/Morabba-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "Morabba";
    src: url("fonts/Morabba/Morabba-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    /* surfaces */
    --bg: #f7f4ee;
    --bg-2: #f1ece2;
    --surface: #fffdf9;
    --surface-2: #faf6ee;
    --ink: #211d16;
    --ink-soft: #4a4339;
    --muted: #8c8475;
    --line: #e6ded0;
    --line-strong: #d8ccb7;

    /* gold accent family */
    --gold: #b8893b;
    --gold-deep: #936c28;
    --gold-soft: #d8b774;
    --gold-tint: #f3ead6;
    --gold-glow: rgba(184, 137, 59, 0.18);

    /* dark (hero / footer) */
    --dark: #1a1611;
    --dark-2: #221d16;
    --on-dark: #f3ece0;
    --on-dark-muted: rgba(243, 236, 224, 0.66);

    --danger: #b4452f;
    --success: #3f7d52;

    --radius: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 10px 30px rgba(33, 29, 22, 0.06);
    --shadow: 0 26px 60px rgba(33, 29, 22, 0.10);
    --maxw: 1180px;
    --gutter: clamp(16px, 4vw, 28px);

    --serif: "Morabba", "IranYekanX", Tahoma, serif;
    --sans: "IranYekanX", Tahoma, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.9;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

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

::selection {
    background: var(--gold-soft);
    color: var(--dark);
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--ink);
}

.display {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 6.4vw, 78px);
    line-height: 1.16;
}

.h-lg {
    font-size: clamp(28px, 4vw, 46px);
}

.lede {
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--ink-soft);
    line-height: 1.95;
    max-width: 56ch;
}

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

/* ---------- Layout ---------- */
.container {
    width: min(var(--maxw), 100% - (var(--gutter) * 2));
    margin-inline: auto;
}

.section {
    padding-block: clamp(64px, 9vw, 130px);
}

.section--tight {
    padding-block: clamp(44px, 6vw, 80px);
}

.section-head {
    max-width: 60ch;
    margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head--split {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* eyebrow / kicker */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 18px;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--gold);
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.section-head p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16px;
}

/* thin gold divider */
.rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
    border: 0;
}

/* ---------- Buttons ---------- */
.btn {
    --btn-pad: 14px 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: var(--btn-pad);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 14px 30px var(--gold-glow);
}

.btn-gold:hover {
    background: var(--gold-deep);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--dark);
    color: var(--on-dark);
}

.btn-dark:hover {
    background: var(--dark-2);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(243, 236, 224, 0.35);
    color: var(--on-dark);
    backdrop-filter: blur(6px);
}

.btn-outline-light:hover {
    border-color: var(--gold-soft);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    min-height: 42px;
    padding: 9px 18px;
    font-size: 14px;
}

/* text link with gold underline */
.link-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--gold-deep);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, gap 0.25s ease;
}

.link-gold:hover {
    border-color: var(--gold);
    gap: 12px;
}

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.site-header.on-hero {
    background: transparent;
    border-bottom-color: rgba(243, 236, 224, 0.14);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    color: inherit;
    white-space: nowrap;
    flex: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--serif);
    font-weight: 700;
    font-size: 20px;
    background: var(--gold-tint);
    flex: none;
}

.on-hero .brand-mark {
    background: rgba(184, 137, 59, 0.14);
    color: var(--gold-soft);
    border-color: rgba(216, 183, 116, 0.6);
}

.on-hero .brand {
    color: var(--on-dark);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--gold-deep);
}

.on-hero .nav-links a {
    color: var(--on-dark-muted);
}

.on-hero .nav-links a:hover,
.on-hero .nav-links a.is-active {
    color: #fff;
}

.nav-cta {
    border: 1px solid var(--line-strong);
}

.on-hero .nav-cta {
    border-color: rgba(216, 183, 116, 0.5);
}

/* ---------- Cards / work grid ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(14px, 2vw, 22px);
}

.work-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-2);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-card:hover img {
    transform: scale(1.05);
}

.work-card .veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(20, 16, 11, 0.78));
    opacity: 0.92;
    transition: opacity 0.4s ease;
}

.work-card .meta {
    position: absolute;
    inset-inline: 18px;
    bottom: 16px;
    color: #fff;
    z-index: 2;
}

.work-card .meta .tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 6px;
}

.work-card .meta h3 {
    color: #fff;
    font-size: 19px;
    font-weight: 600;
}

.work-card .meta p {
    margin-top: 4px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.74);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* empty state */
.empty {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 500;
}

/* ---------- Forms ---------- */
.field {
    display: block;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
}

.input,
.textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: #b3a997;
}

.input:focus,
.textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-glow);
    background: var(--surface);
}

.textarea {
    min-height: 150px;
    resize: vertical;
}

.form-note {
    display: none;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
}

.form-note.is-success {
    display: block;
    background: #eaf4ec;
    color: var(--success);
    border: 1px solid #cce4d3;
}

.form-note.is-error {
    display: block;
    background: #fbece8;
    color: var(--danger);
    border: 1px solid #f2cfc6;
}

.alert-error {
    padding: 13px 16px;
    border-radius: var(--radius);
    background: #fbece8;
    color: var(--danger);
    border: 1px solid #f2cfc6;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: var(--on-dark-muted);
    padding-block: clamp(40px, 6vw, 64px);
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer .brand {
    color: var(--on-dark);
}

.site-footer .brand-mark {
    background: rgba(184, 137, 59, 0.16);
    color: var(--gold-soft);
    border-color: rgba(216, 183, 116, 0.5);
}

.site-footer small {
    font-size: 13.5px;
}

/* ---------- Helpers ---------- */
.center {
    text-align: center;
}

.center .section-head,
.center .lede {
    margin-inline: auto;
}

.stack-sm > * + * {
    margin-top: 12px;
}

[hidden] {
    display: none !important;
}

/* ---------- Mobile nav ---------- */
/* Keep only the essential links (نمونه کارها / ورود کاربر) visible on small screens
   instead of hiding the whole nav. */
@media (max-width: 760px) {
    .nav-links {
        gap: 6px;
    }

    .nav-links li:not(.nav-keep) {
        display: none;
    }
}

/* On small phones (narrower than ~iPhone Pro Max) shrink the nav so the two
   essential links stay on a single line instead of wrapping. */
@media (max-width: 420px) {
    .nav {
        gap: 12px;
    }

    .brand {
        font-size: 18px;
        gap: 8px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 13.5px;
    }

    .nav-cta {
        padding-inline: 12px;
    }
}
