600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #f4f5f2;
    --bg-elevated: #ffffff;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-soft: #eceeea;
    --text: #101316;
    --muted: #687078;
    --line: rgba(16, 19, 22, 0.10);
    --line-strong: rgba(16, 19, 22, 0.18);
    --accent: #f16a24;
    --accent-strong: #cf4e0b;
    --accent-soft: rgba(241, 106, 36, 0.11);
    --steel: #76808a;
    --steel-light: #c7cdd2;
    --success: #2f9b68;
    --header-bg: rgba(247, 248, 245, 0.82);
    --shadow-sm: 0 10px 30px rgba(15, 20, 25, 0.06);
    --shadow-md: 0 22px 60px rgba(15, 20, 25, 0.10);
    --shadow-lg: 0 35px 90px rgba(15, 20, 25, 0.15);
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 32px;
    --radius-xl: 44px;
    --container: 1220px;
    --section-space: clamp(104px, 9vw, 148px);
    --content-gap: clamp(28px, 3vw, 48px);
}

[data-theme="dark"] {
    --bg: #090b0d;
    --bg-elevated: #0e1114;
    --surface: rgba(18, 22, 26, 0.88);
    --surface-solid: #12161a;
    --surface-soft: #171c21;
    --text: #f4f6f7;
    --muted: #9ba5ae;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #ff792f;
    --accent-strong: #ff8d4d;
    --accent-soft: rgba(255, 121, 47, 0.12);
    --steel: #a9b1b8;
    --steel-light: #5f6870;
    --header-bg: rgba(9, 11, 13, 0.82);
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.20);
    --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 35px 90px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 10% 0%, rgba(241, 106, 36, 0.08), transparent 30%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 56%, var(--bg) 100%);
    color: var(--text);
    font-family: "Readex Pro", Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.9;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body.lang-en {
    direction: ltr;
    font-family: "Outfit", Arial, sans-serif;
    line-height: 1.75;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Readex Pro", Tahoma, Arial, sans-serif;
    font-weight: 700;
    text-wrap: balance;
}

body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en h4,
body.lang-en h5,
body.lang-en h6 {
    font-family: "Outfit", Arial, sans-serif;
    letter-spacing: -0.025em;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

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

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

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: min(var(--container), 92%);
    margin-inline: auto;
}

.en-only {
    display: none;
}

.lang-en .fa-only {
    display: none !important;
}

.lang-en .en-only {
    display: initial;
}

body:not(.lang-en) .fa-only {
    display: initial;
}

body:not(.lang-en) .en-only {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    background: var(--header-bg);
    backdrop-filter: blur(22px) saturate(160%);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
    border-color: var(--line);
    box-shadow: 0 8px 30px rgba(13, 18, 22, 0.06);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    font-family: "Outfit", Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand img {
    width: 50px;
    height: 50px;
    padding: 5px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-family: "Readex Pro", Tahoma, Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
}

.lang-en .brand small {
    font-family: "Outfit", Arial, sans-serif;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-solid) 76%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-links a {
    position: relative;
    padding: 9px 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--surface-solid);
    box-shadow: 0 6px 18px rgba(12, 16, 20, 0.06);
}

.nav-links a:hover {
    transform: translateY(-1px);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn,
.pill-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: var(--surface-solid);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 20, 25, 0.04);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.icon-btn {
    width: 44px;
    padding: 0;
}

.pill-btn,
.btn {
    padding: 10px 18px;
}

.icon-btn:hover,
.pill-btn:hover,
.btn:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.pill-btn.accent,
.btn.primary {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(241, 106, 36, 0.22);
}

.pill-btn.accent:hover,
.btn.primary:hover {
    box-shadow: 0 18px 36px rgba(241, 106, 36, 0.28);
}

.btn.ghost {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.menu-btn {
    display: none;
    font-size: 20px;
}

.mobile-menu {
    display: none;
    width: min(var(--container), 92%);
    margin: 0 auto 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-solid);
    box-shadow: var(--shadow-md);
}

.mobile-menu.open {
    display: grid;
    gap: 4px;
}

.mobile-menu a {
    padding: 11px 13px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 650;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--surface-soft);
    color: var(--text);
}

section {
    position: relative;
    padding: var(--section-space) 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--content-gap);
    margin-bottom: clamp(46px, 5vw, 72px);
}

.section-head > div {
    max-width: 760px;
}

.section-head h2,
.page-hero h1 {
    font-family: "Readex Pro", Tahoma, Arial, sans-serif;
    margin: 12px 0 0;
    font-size: clamp(34px, 4.2vw, 60px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-head p {
    max-width: 600px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-family: "Outfit", Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 112px 0 82px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, var(--surface-solid), transparent 60%),
        radial-gradient(circle at 84% 15%, var(--accent-soft), transparent 28%),
        linear-gradient(180deg, var(--surface-soft), var(--bg));
}

.page-hero::after {
    content: "IDC";
    position: absolute;
    inset-inline-end: 3%;
    bottom: -54px;
    color: transparent;
    font-family: "Outfit", Arial, sans-serif;
    font-size: clamp(120px, 22vw, 320px);
    font-weight: 900;
    line-height: 1;
    -webkit-text-stroke: 1px var(--line);
    opacity: 0.45;
    pointer-events: none;
}

.page-hero p {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--muted);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.show {
    opacity: 1;
    transform: none;
}

.site-footer {
    position: relative;
    overflow: hidden;
    padding: 72px 0 28px;
    border-top: 1px solid var(--line);
    background: #0b0d10;
    color: #f5f6f7;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(241, 106, 36, 0.18), transparent 28%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
    pointer-events: none;
}

.footer-grid,
.footer-bottom {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 1fr;
    gap: 54px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-grid p {
    margin: 8px 0;
    color: #9ca6ae;
    font-size: 13px;
}

.footer-grid a:hover {
    color: #ffffff;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.socials a {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #c7cdd2;
    font-size: 12px;
    transition: 0.2s ease;
}

.socials a:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.footer-bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #75808a;
    font-family: "Outfit", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
}

@media (max-width: 1060px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    :root {
        --radius-lg: 24px;
        --radius-xl: 28px;
    }

    .nav {
        min-height: 72px;
    }

    .brand img {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .brand {
        font-size: 12px;
    }

    .brand small {
        display: none;
    }

    .pill-btn.accent {
        display: none;
    }

    section {
        padding: 78px 0;
    }

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

    .page-hero {
        padding: 86px 0 62px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

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


/* =========================================================
   V5 — CLEAN PREMIUM SYSTEM
   ========================================================= */

:root {
    --page-bg: #f8f9fb;
    --surface: #ffffff;
    --surface-soft: #f1f4f6;
    --text-main: #1e252c;
    --text-soft: #707b85;
    --line-soft: #e3e7eb;

    --accent: #df661d;
    --accent-strong: #c9540d;
    --accent-soft: #fff1e7;

    --shadow-soft: 0 14px 36px rgba(28, 37, 45, 0.07);
    --shadow-card: 0 22px 56px rgba(28, 37, 45, 0.10);

    --content-width: 1180px;
    --content-gutter: 28px;

    --font-fa: "Estedad", Tahoma, Arial, sans-serif;
    --font-en: "DM Sans", Arial, sans-serif;
}

[data-theme="dark"] {
    --page-bg: #101419;
    --surface: #171d23;
    --surface-soft: #1d252d;
    --text-main: #f4f6f8;
    --text-soft: #a6b0b8;
    --line-soft: #2d3740;
    --accent-soft: rgba(223, 102, 29, 0.12);
}

html[lang="fa"] body {
    font-family: var(--font-fa);
}

html[lang="en"] body,
body.lang-en {
    font-family: var(--font-en);
}

body {
    background: var(--page-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-soft);
}

/* Safe content width: nothing sticks to viewport edges */
.wrap,
.container,
.section-container,
.nav-inner,
.footer-inner {
    width: min(var(--content-width), calc(100% - (var(--content-gutter) * 2)));
    margin-inline: auto;
}

/* Fallback for sections whose inner wrappers differ */
section > .wrap,
section > .container,
header > .wrap,
footer > .wrap {
    width: min(var(--content-width), calc(100% - (var(--content-gutter) * 2)));
    margin-inline: auto;
}

section {
    padding-block: clamp(86px, 8vw, 118px);
}

.section-head {
    margin-bottom: clamp(34px, 4vw, 52px);
}

.section-head p {
    max-width: 650px;
    line-height: 2;
}

.card,
.info-card,
.machine-card,
.contact-card,
.form-card,
.gallery-item,
.article-card,
.zone,
.qc,
.qc-item {
    border: 1px solid var(--line-soft);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.btn,
.cta {
    border-radius: 14px;
}

.btn.primary,
.cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 26px rgba(201, 84, 13, 0.18);
}

.btn.primary:hover,
.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(201, 84, 13, 0.23);
}

@media (max-width: 900px) {
    :root {
        --content-gutter: 22px;
    }
}

@media (max-width: 560px) {
    :root {
        --content-gutter: 16px;
    }

    section {
        padding-block: 72px;
    }
}


/* ===== UNIFIED TECH PAGES ===== */
.tech-page {
    background:
        radial-gradient(circle at 12% 10%, rgba(255,106,26,.07), transparent 28%),
        linear-gradient(180deg, var(--bg), var(--bg-elevated));
}

.tech-subhero {
    position: relative;
    overflow: hidden;
    padding: 138px 0 92px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.58)),
        radial-gradient(circle at 78% 32%, rgba(255,106,26,.12), transparent 30%);
}

[data-theme="dark"] .tech-subhero {
    background:
        linear-gradient(135deg, rgba(8,12,16,.94), rgba(13,20,26,.84)),
        radial-gradient(circle at 78% 32%, rgba(255,106,26,.14), transparent 30%);
}

.tech-subhero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .36;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.tech-subhero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    inset-inline-end: -180px;
    top: -190px;
    border: 1px solid rgba(255,106,26,.24);
    box-shadow: 0 0 0 54px rgba(255,106,26,.035), 0 0 0 108px rgba(255,106,26,.02);
}

.tech-subhero .container {
    position: relative;
    z-index: 2;
}

.tech-subhero h1 {
    max-width: 900px;
    margin: 22px 0 20px;
    font-size: clamp(48px, 6vw, 84px);
    line-height: 1.06;
    letter-spacing: -.05em;
}

.tech-subhero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 2.05;
}

.tech-page-section {
    padding: clamp(94px, 9vw, 138px) 0;
}

.tech-section-head {
    display: grid;
    grid-template-columns: minmax(0,.85fr) minmax(280px,.42fr);
    gap: clamp(34px, 6vw, 84px);
    align-items: end;
    margin-bottom: clamp(42px, 6vw, 72px);
}

.tech-section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.12;
    letter-spacing: -.045em;
}

.tech-section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 2;
}

.tech-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}

.tech-grid-bg {
    background-image:
        linear-gradient(rgba(16,19,22,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,19,22,.05) 1px, transparent 1px);
    background-size: 36px 36px;
}

[data-theme="dark"] .tech-grid-bg {
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
}

.tech-index {
    color: var(--accent);
    font: 700 11px/1 "DM Sans", sans-serif;
    letter-spacing: .16em;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-solid);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 820px) {
    .tech-section-head {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tech-subhero {
        padding: 122px 0 74px;
    }
}


/* ===== FOOTER READABILITY FIX ===== */

.site-footer {
    position: relative;
    overflow: hidden;
    padding: 74px 0 28px;
    color: #e9eef2;
    background: radial-gradient(circle at 12% 0%, rgba(255, 106, 26, 0.12), transparent 26%), linear-gradient(180deg, #111920 0%, #0b1117 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 1fr;
    gap: clamp(36px, 6vw, 84px);
    align-items: start;
}

.footer-grid > div {
    min-width: 0;
}

.site-footer h3 {
    margin: 0 0 20px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.site-footer p {
    margin: 0 0 12px;
    color: #b9c3cb;
    font-size: 13.5px;
    line-height: 2;
}

.site-footer a {
    color: #cdd5dc;
    text-decoration: none;
    transition: color 0.22s ease, transform 0.22s ease;
}

.site-footer a:hover {
    color: #ff8a49;
}

.site-footer .socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.site-footer .socials a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #dce3e8;
    background: rgba(255, 255, 255, 0.035);
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.site-footer .socials a:hover {
    border-color: rgba(255, 106, 26, 0.38);
    color: #ffffff;
    background: rgba(255, 106, 26, 0.10);
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 22px;
    color: #7f8b95;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

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

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .site-footer {
        padding-top: 56px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-grid > div:first-child {
        grid-column: auto;
    }

    .footer-bottom {
        margin-top: 34px;
    }
}
