/* ---------------------------------------------
   سپدا — design tokens
--------------------------------------------- */
:root {
  --bg: #0a0f1c;
  --bg-panel: #101a2e;
  --bg-panel-2: #0d1526;
  --text: #e9ecf3;
  --muted: #8b93a7;
  --accent: #e8934a;      /* آذر — ember */
  --accent-dim: #b96f38;
  --teal: #2dd4bf;        /* used sparingly */
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.05);
  --radius: 14px;
  --serif-none: 1;
  --font: "Vazirmatn", "Tahoma", sans-serif;
  --max-w: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; margin: 0; line-height: 1.3; }
p { margin: 0; color: var(--muted); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { position: relative; padding: 96px 0; }

/* ---------------------------------------------
   background: sky + ember
--------------------------------------------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 120px 90px, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 220px 40px, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 320px 140px, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 60px 180px, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 400px 60px, rgba(255,255,255,.3), transparent);
  background-repeat: repeat;
  background-size: 420px 220px;
  opacity: .7;
}

.ember {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232,147,74,0.16) 0%, rgba(232,147,74,0) 60%);
  filter: blur(10px);
}

/* ---------------------------------------------
   nav
--------------------------------------------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 28, 0.72);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--accent);
}

.brand-full {
  font-size: .82rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: .95rem;
  color: var(--text);
  opacity: .85;
  transition: opacity .15s ease, color .15s ease;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 7px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------------------------------------------
   hero
--------------------------------------------- */
.hero {
  padding-top: 120px;
  padding-bottom: 140px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 780px;
}

.hero-kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 28px auto 0;
  max-width: 60ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------------------------------------
   buttons
--------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #1a0f04;
}

.btn-primary:hover { background: #f0a15f; transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-full { width: 100%; }

/* ---------------------------------------------
   about / services
--------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.about-lead h2 { font-size: 1.8rem; margin-bottom: 18px; }
.about-lead p { max-width: 46ch; }

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service {
  background: var(--bg-panel);
  padding: 28px;
}

.service h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
  color: var(--text);
}

.service p { font-size: .92rem; }

/* ---------------------------------------------
   section head (shared)
--------------------------------------------- */
.section-head {
  margin-bottom: 56px;
  text-align: right;
}

.section-head h2 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.section-head p { font-size: 1.02rem; }

/* ---------------------------------------------
   resume / works
--------------------------------------------- */
.works {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.work {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border-soft);
}

.work:last-child { border-bottom: none; padding-bottom: 0; }

.work-reverse { grid-template-columns: 0.9fr 1.1fr; }
.work-reverse .work-visual { order: -1; }

.work-tag {
  display: inline-block;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.work-text h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--text);
}

.work-text p { max-width: 52ch; }

.work-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(232,147,74,0.14), rgba(45,212,191,0.08)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
}

.works-note {
  margin-top: 40px;
  font-size: .82rem;
  color: var(--muted);
  opacity: .7;
}

/* ---------------------------------------------
   news
--------------------------------------------- */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
}

.news-item:last-child { border-bottom: 1px solid var(--border-soft); }

.news-item time {
  color: var(--accent);
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
}

.news-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.news-item p { font-size: .92rem; }

/* ---------------------------------------------
   contact
--------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.contact-info h2 { font-size: 1.8rem; margin-bottom: 16px; }
.contact-info p { max-width: 44ch; margin-bottom: 36px; }

.contact-list { display: flex; flex-direction: column; gap: 18px; }

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.contact-label {
  color: var(--muted);
  font-size: .85rem;
  min-width: 70px;
}

.contact-list a { color: var(--text); transition: color .15s ease; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: .88rem;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-status {
  font-size: .88rem;
  min-height: 1.2em;
  color: var(--teal);
}

/* ---------------------------------------------
   footer
--------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}

.footer-tag { color: var(--accent); font-weight: 600; }

/* ---------------------------------------------
   responsive
--------------------------------------------- */
@media (max-width: 860px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .work,
  .work-reverse {
    grid-template-columns: 1fr;
  }

  .work-reverse .work-visual { order: 0; }

  .work-visual { aspect-ratio: 16 / 9; }

  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }

  .nav-links.open { max-height: 320px; }

  .nav-links li { border-top: 1px solid var(--border-soft); }

  .nav-links a {
    display: block;
    padding: 16px 24px;
  }

  .brand-full { display: none; }

  .section { padding: 64px 0; }

  .hero { padding-top: 72px; padding-bottom: 80px; }
}
