/* ==========================================================================
   Home (v3) — calm engineering look: navy + paper, blueprint hero, hairlines.
   ========================================================================== */
.h-home { --n9: #101c2b; --n8: #17263a; --paper: #f4f2ee; --beige: #ebe8e1; --line: #d7d3c9; --ink: #14202e; --mut: #5d6670; background: var(--paper); color: var(--ink); }
.h-home a { text-decoration: none; }
.h-home img { max-width: none; }

/* Header over the hero */
.home .c-header, .home .c-header.is-scrolled { position: fixed; inset-inline: 0; background: transparent; box-shadow: none; }
.home .c-header__top { background: transparent; border: 0; transition: background 200ms; }
.home .c-header.is-scrolled .c-header__top { background: rgb(16 28 43 / 92%); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
@media (min-width: 1025px) {
	.home .c-nav { height: 46px; align-self: center; padding-inline: var(--s-2); border: 1px solid rgb(255 255 255 / 22%); border-radius: 6px; }
	.home .c-nav > li > a { padding-inline: var(--s-3); }
}

/* Type + bits */
.h-eyebrow { display: flex; align-items: center; gap: 0.75rem; margin: 0; color: var(--mut); font-size: var(--fs-xs); font-weight: 600; }
.h-eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--c-accent); }
.h-h2 { margin: 0.4rem 0 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 700; line-height: 1.25; }
.h-sec { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.h-sec--beige { background: var(--beige); }
.h-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-block-end: 2.5rem; }
.h-more { font-weight: 700; font-size: var(--fs-sm); border-block-end: 2px solid currentColor; padding-block-end: 2px; }
.h-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.75rem; border: 1px solid transparent; border-radius: 4px; font-size: 0.9375rem; font-weight: 700; transition: background 200ms, color 200ms, border-color 200ms; }
.h-btn--red { background: var(--c-accent); color: #fff; }
.h-btn--red:hover { background: var(--c-brand-yellow); color: #111; }
.h-btn--line { border-color: rgb(255 255 255 / 45%); color: #fff; }
.h-btn--line:hover { background: #fff; color: var(--n9); }
.h-btn--yellow { background: var(--c-brand-yellow); color: #111; }
.h-btn--yellow:hover { background: #fff; }
.h-btn:focus-visible, .h-row:focus-visible, .h-pj:focus-visible { outline: 3px solid var(--c-brand-yellow); outline-offset: 3px; }

/* Hero */
.h-hero { position: relative; min-height: max(720px, 92svh); overflow: hidden; background: var(--n9); color: #fff; isolation: isolate; }
.h-hero__in { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 3rem; align-items: start; padding-block: clamp(8rem, 13vw, 11rem) 0; }
.h-hero__eyebrow { margin: 0 0 1.25rem; color: #9db8dc; font-size: var(--fs-xs); font-weight: 600; }
.h-hero__title { margin: 0; font-size: clamp(2.5rem, 1rem + 5.2vw, 5.25rem); font-weight: 700; line-height: 1.2; color: #fff; }
.h-hero__title span { display: block; color: var(--c-brand-yellow); }
.h-hero__side { padding-block-start: 2.5rem; }
.h-hero__side p { margin: 0 0 1.5rem; color: #b9c7dc; font-size: var(--fs-md); line-height: 2; }
.h-hero__btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.h-art { position: absolute; inset-inline: 0; bottom: 0; z-index: -1; width: 100%; height: 62%; }
.h-flow { animation: hflow 2.4s linear infinite; }
.h-hero__labels { position: absolute; inset-inline: 0; bottom: 1.25rem; display: flex; justify-content: space-between; color: #9db8dc; font-size: 11px; }

/* Capabilities list */
.h-rows { border-block-start: 1px solid var(--line); }
.h-row { display: grid; grid-template-columns: 56px 1.1fr 1.5fr 140px 40px; align-items: center; gap: 1.5rem; padding: 1.7rem 1rem; border-block-end: 1px solid var(--line); color: var(--ink); transition: background 200ms, color 200ms; }
.h-row b { font-size: 12px; color: var(--mut); font-weight: 600; }
.h-row h3 { margin: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem); font-weight: 600; }
.h-row p { margin: 0; color: var(--mut); line-height: 1.9; }
.h-row em { font-style: normal; font-size: 11px; color: var(--mut); }
.h-row i { font-style: normal; font-size: 1.25rem; transition: transform 200ms; }
.h-row:hover { background: var(--n9); color: #fff; }
.h-row:hover :is(p, em, b) { color: #b9c7dc; }
.h-row:hover i { color: var(--c-brand-yellow); transform: translateX(-4px); }
[dir="ltr"] .h-row:hover i { transform: translateX(4px); }

/* Stats band */
.h-stats { background: var(--n9); color: #fff; }
.h-stats__grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.h-stat { padding: 3.5rem 1.5rem 3.5rem 0; }
.h-stat b { display: block; color: var(--c-brand-yellow); font-size: clamp(2.25rem, 1.5rem + 2.4vw, 3.5rem); font-weight: 700; line-height: 1.1; }
.h-stat span { color: #b9c7dc; }

/* Projects */
.h-pjs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.75rem; }
.h-pjs__side { display: grid; gap: 1.75rem; align-content: start; }
.h-pj { display: block; color: var(--ink); }
.h-pj__img { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 3px; background: #cfcbc0; }
.h-pj--big .h-pj__img { aspect-ratio: 4 / 3; }
.h-pj__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.h-pj:hover .h-pj__img img { transform: scale(1.04); }
.h-pj__meta { display: block; margin-block-start: 0.9rem; color: var(--mut); font-size: 11px; }
.h-pj__title { display: block; margin-block-start: 0.25rem; font-size: 1.25rem; font-weight: 600; }
.h-pj--big .h-pj__title { font-size: 1.5rem; }

/* Process */
.h-steps { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 1.75rem; }
.h-step { position: relative; padding-block-start: 1.5rem; border-block-start: 1px solid #b8b4a8; }
.h-step::before { content: ""; position: absolute; top: -4px; inset-inline-start: 0; width: 7px; height: 7px; background: var(--c-accent); }
.h-step b { font-size: 12px; color: var(--mut); font-weight: 600; }
.h-step h3 { margin: 0.5rem 0; font-size: 1.375rem; font-weight: 600; }
.h-step p { margin: 0; color: var(--mut); line-height: 1.9; }

/* Fields (CSS-only tabs) */
.h-tabs { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 2.5rem; align-items: start; }
.h-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.h-tabs__list { display: grid; gap: 0.5rem; grid-column: 1; }
.h-tabs__list label { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; background: var(--beige); border-radius: 4px; font-weight: 600; cursor: pointer; transition: background 200ms, color 200ms; }
.h-tabs__list label span { font-size: 12px; color: var(--mut); }
.h-tabs__panels { grid-column: 2; grid-row: 1; }
.h-panel { display: none; }
.h-panel img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.h-panel h3 { margin: 1.5rem 0 0.5rem; font-size: 1.75rem; font-weight: 600; }
.h-panel p { margin: 0 0 1rem; max-width: 60ch; color: var(--mut); line-height: 2; }
#h-t1:checked ~ .h-tabs__panels .h-p1, #h-t2:checked ~ .h-tabs__panels .h-p2, #h-t3:checked ~ .h-tabs__panels .h-p3 { display: block; }
#h-t1:checked ~ .h-tabs__list label[for="h-t1"], #h-t2:checked ~ .h-tabs__list label[for="h-t2"], #h-t3:checked ~ .h-tabs__list label[for="h-t3"] { background: var(--n9); color: #fff; }
#h-t1:checked ~ .h-tabs__list label[for="h-t1"] span, #h-t2:checked ~ .h-tabs__list label[for="h-t2"] span, #h-t3:checked ~ .h-tabs__list label[for="h-t3"] span { color: var(--c-brand-yellow); }
.h-tabs > input:focus-visible ~ .h-tabs__list { outline: 3px solid var(--c-brand-yellow); outline-offset: 4px; }

/* Why us */
.h-why { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.h-why__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.h-why__list { margin-block-start: 2rem; border-block-start: 1px solid var(--line); }
.h-why__item { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; padding-block: 1.4rem; border-block-end: 1px solid var(--line); }
.h-why__item b { font-size: 12px; color: var(--mut); }
.h-why__item h3 { margin: 0 0 0.3rem; font-size: 1.25rem; font-weight: 600; }
.h-why__item p { margin: 0; color: var(--mut); line-height: 1.9; }

/* Call to action */
.h-cta { background: var(--n8); color: #fff; }
.h-cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.h-cta h2 { margin: 0.75rem 0 0.5rem; font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); font-weight: 700; }
.h-cta p { margin: 0; color: #b9c7dc; font-size: var(--fs-md); }
.h-cta .h-eyebrow { color: #9db8dc; }

/* Footer: oversized ghost wordmark */
.c-site-footer { position: relative; overflow: hidden; }
.c-site-footer__main { position: relative; }
.c-site-footer__main::after { content: "NIMAVARAN"; position: absolute; inset-inline: 0; bottom: -0.3em; z-index: 0; text-align: center; color: rgb(255 255 255 / 4%); font-size: clamp(4rem, 15vw, 14rem); font-weight: 900; line-height: 1; pointer-events: none; }
.c-site-footer__main > * { position: relative; z-index: 1; }

@keyframes hflow { to { stroke-dashoffset: -64; } }

@media (max-width: 1024px) {
	.h-hero__in { grid-template-columns: 1fr; gap: 1.5rem; }
	.h-hero__side { padding-block-start: 0; }
	.h-row { grid-template-columns: 44px 1fr 40px; }
	.h-row p, .h-row em { display: none; }
	.h-pjs, .h-why { grid-template-columns: 1fr; }
	.h-pj__img, .h-pj--big .h-pj__img { aspect-ratio: 16 / 10; }
	.h-steps { grid-template-columns: repeat(2, 1fr); }
	.h-tabs { grid-template-columns: 1fr; }
	.h-tabs__panels { grid-column: 1; grid-row: auto; }
}
@media (max-width: 520px) {
	.h-steps { grid-template-columns: 1fr; }
	.h-hero__btns .h-btn { width: 100%; }
	.h-stat { padding: 2rem 0.5rem 2rem 0; }
	.h-stat b { font-size: 1.75rem; }
	.h-stat span { font-size: 0.875rem; }
	.h-hero__labels span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.h-flow { animation: none; }
	.h-pj__img img, .h-row i { transition: none; }
}

/* v3.1 refinements ------------------------------------------------------- */
/* Letter-spacing breaks Persian joins, so it is only used for Latin text. */
.h-row em, .h-hero__labels { letter-spacing: 0.14em; }
.c-site-footer__main::after { letter-spacing: -0.02em; }
:lang(en) :is(.h-eyebrow, .h-hero__eyebrow, .h-row b, .h-pj__meta, .h-step b, .h-why__item b) { letter-spacing: 0.1em; }

/* Larger, calmer type for Persian reading */
.h-eyebrow { font-size: 1rem; }
.h-hero__eyebrow { font-size: 1.0625rem; }
.h-hero__side p { font-size: 1.125rem; }
.h-row b, .h-step b, .h-why__item b { font-size: 1rem; }
.h-row h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); }
.h-row p, .h-step p, .h-why__item p, .h-panel p { font-size: 1.0625rem; }
.h-pj__meta { font-size: 0.9375rem; }
.h-step h3 { font-size: 1.5rem; }
.h-why__item h3 { font-size: 1.375rem; }
.h-tabs__list label { font-size: 1.0625rem; }
.h-stat span { font-size: 1.0625rem; }
.h-pjs { align-items: start; }

/* v3.3: real-content helpers */
.h-btn--navy { background: var(--n9); color: #fff; }
.h-btn--navy:hover { background: var(--c-accent); }
.h-prose { margin-block-start: 1.25rem; color: var(--mut); font-size: 1.0625rem; line-height: 2; }
.h-prose p { margin: 0 0 1rem; }
