/* Kohzadi — cool premium construction theme */
:root {
  --bg-deep: #041018;
  --bg-ice: #f0f9ff;
  --bg-white: #ffffff;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --cyan-glow: #22d3ee;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(125, 211, 252, 0.22);
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: "Vazirmatn", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-900);
  background: var(--bg-white);
  direction: rtl;
  text-align: right;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

.page-shell {
  overflow-x: clip;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.75rem);
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease-out), backdrop-filter 0.35s;
}
.site-header.is-scrolled {
  background: rgba(4, 16, 24, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--glass-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-400), var(--cyan-glow));
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--bg-deep);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.nav-toggle {
  display: none;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sky-500), var(--cyan-glow));
  color: var(--bg-deep);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(34, 211, 238, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.06) translateZ(0);
  -webkit-transform: scale(1.06) translateZ(0);
  transform-origin: center center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(4, 16, 24, 0.88) 0%, rgba(4, 16, 24, 0.45) 42%, rgba(2, 132, 199, 0.2) 100%),
    linear-gradient(to top, rgba(4, 16, 24, 0.8), transparent 55%);
  z-index: 1;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: end;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sky-300);
  margin-bottom: 1rem;
}
.hero-kicker::before {
  content: "";
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-glow), transparent);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #fff, var(--sky-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  max-width: 36ch;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Glass — identical Chrome + Safari (layered blur + highlight) */
.glass-surface {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 42%,
    rgba(56, 189, 248, 0.1) 100%
  );
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.glass-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 15% 0%, rgba(125, 211, 252, 0.4), transparent 52%);
  pointer-events: none;
  z-index: 0;
}
.glass-surface::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 0;
}
.glass-surface > * {
  position: relative;
  z-index: 1;
}

.hero-panel {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.hero-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.hero-panel dt {
  font-size: 0.75rem;
  color: var(--sky-300);
  margin-bottom: 0.25rem;
}
.hero-panel dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}
.scroll-hint span {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--sky-400), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ——— Marquee ——— */
.marquee {
  background: var(--bg-deep);
  color: var(--sky-300);
  padding: 0.85rem 0;
  overflow: hidden;
  border-block: 1px solid var(--glass-border);
  max-width: 100%;
  contain: layout paint;
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { width: 100%; flex-wrap: wrap; justify-content: center; }
}
.marquee-track span { white-space: nowrap; opacity: 0.85; }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* ——— Sections ——— */
.section { padding: clamp(4rem, 10vw, 6.5rem) 0; }
.section--ice { background: var(--bg-ice); }
.section-head { margin-bottom: 2.5rem; max-width: 560px; }
.section-head .eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sky-600);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--slate-500); line-height: 1.75; }

.reveal { opacity: 0; transform: translateY(36px); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-white);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--sky-400);
  box-shadow: 0 20px 50px -20px rgba(14, 165, 233, 0.35);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-ice), #fff);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--sky-600);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--slate-500); font-size: 0.92rem; line-height: 1.65; }

/* ——— Swiper projects ——— */
.projects-slider {
  padding-bottom: 3.5rem;
  overflow: hidden;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
}
.projects-swiper.swiper {
  overflow: hidden !important;
  width: 100%;
  max-width: 100%;
  padding: 1rem 0 3rem;
}
.projects-swiper .swiper-slide {
  width: min(360px, 86vw);
  height: auto;
}
.project-slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-deep);
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-slide img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.project-slide:hover img { transform: scale(1.05); }
.project-slide figcaption {
  padding: 1.25rem 1.35rem 1.5rem;
}
.project-slide h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.project-slide p { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.65); }
.swiper-pagination-bullet { background: var(--sky-400); opacity: 0.35; }
.swiper-pagination-bullet-active { opacity: 1; background: var(--cyan-glow); }
.swiper-button-prev, .swiper-button-next {
  color: var(--sky-600) !important;
  width: 44px !important;
  height: 44px !important;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
@media (max-width: 640px) {
  .swiper-button-prev, .swiper-button-next { display: none !important; }
}
.swiper-button-prev::after, .swiper-button-next::after { font-size: 1rem !important; }

/* ——— Process horizontal scroll ——— */
.process-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
  overscroll-behavior-x: contain;
}
.process-step {
  flex: 0 0 min(280px, 80vw);
  scroll-snap-align: start;
  background: var(--bg-white);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}
.process-step strong {
  display: block;
  font-size: 2rem;
  color: var(--sky-400);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.cta-band {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--bg-deep) 0%, #0c4a6e 50%, var(--sky-600) 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 70%);
  top: -100px;
  left: -100px;
  pointer-events: none;
}
.cta-band h2 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.cta-band p { margin: 0; opacity: 0.85; }

.site-footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(2, 1fr);
  gap: 2rem;
}
.footer-grid h3 { color: #fff; font-size: 0.95rem; margin: 0 0 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--sky-300); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Inner pages */
.page-hero { padding: calc(var(--header-h) + 2rem) 0 2rem; background: var(--bg-ice); }
.page-hero h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.breadcrumb { font-size: 0.85rem; color: var(--slate-500); margin-bottom: 0.75rem; }
.inner-page .site-header { background: rgba(4, 16, 24, 0.9); }
.prose { max-width: 680px; color: var(--slate-700); line-height: 1.85; }

/* Admin (unchanged shell) */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f8fafc; }
.admin-sidebar { background: #fff; border-left: 1px solid #e2e8f0; padding: 1.25rem; }
.admin-nav a { display: block; padding: 0.55rem 0.75rem; border-radius: 8px; color: #475569; }
.admin-nav a.active { background: var(--bg-ice); color: var(--sky-600); }
.admin-main { padding: 1.5rem 2rem; }
.admin-card { background: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.badge { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.75rem; background: #dcfce7; color: #166534; }

@media (max-width: 900px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(4, 16, 24, 0.55) 0%, rgba(4, 16, 24, 0.82) 50%, rgba(4, 16, 24, 0.92) 100%);
  }
  .projects-slider {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-panel { order: 0; max-width: 100%; }
  .hero-copy { order: 0; }
  .hero-lead { max-width: none; }
  .hero h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset-inline: 0;
    top: var(--header-h);
    background: rgba(4, 16, 24, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 1rem;
    transform: translateY(-120%);
    transition: transform 0.35s var(--ease-out);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
}
