/* Amlak Web Pro v2 — Portfolio Landing
   Identity: جسور / گرم / مینیمال
   Palette: Rich Amber-primary, Deep Slate-secondary, Warm off-white */

:root {
  --primary: #b45309;
  --primary-dark: #92400e;
  --primary-light: #d97706;
  --secondary: #1e293b;
  --accent: #ea580c;
  --accent-soft: #fb923c;
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-alt: #f5f3ef;
  --text: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --nav-h: 4rem;
  --r: 0.5rem;
  --rx: 1rem;
  --shadow-sm: 0 1px 2px rgb(28 25 23 / 0.05);
  --shadow: 0 2px 8px rgb(28 25 23 / 0.06);
  --shadow-lg: 0 8px 24px rgb(28 25 23 / 0.08);
  --glow: 0 0 0 3px rgb(180 83 9 / 0.15);
}

.dark {
  --bg: #0c0a09;
  --surface: #1c1917;
  --surface-alt: #292524;
  --text: #fafaf9;
  --muted: #a8a29e;
  --border: #44403c;
  --border-strong: #57534e;
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #fbbf24;
  --accent: #fb923c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s, color 0.4s;
}

.page-shell {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---- Typography ---- */
.hero-title, .sec-head h2, .card h3 {
  letter-spacing: -0.02em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-weight: 600; border-radius: var(--r); border: 2px solid transparent;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none; white-space: nowrap;
}
.btn svg { width: 1.1rem; height: 1.1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }

.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgb(13 148 136 / 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(13 148 136 / 0.25);
  text-decoration: none;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent; border-color: var(--border-strong); color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgb(13 148 136 / 0.04);
  text-decoration: none;
}

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.btn-icon:hover { color: var(--text); border-color: var(--border-strong); }
.btn-icon svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-moon { display: none; }
.dark .theme-toggle .icon-sun { display: none; }
.dark .theme-toggle .icon-moon { display: block; }

/* ---- Navbar ---- */
.navbar {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  background: rgb(250 249 247 / 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.dark .navbar { background: rgb(12 10 9 / 0.85); }
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.logo-icon {
  width: 2.2rem; height: 2.2rem; background: var(--primary); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.logo-icon svg { width: 1.1rem; height: 1.1rem; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-size: 0.95rem; color: var(--text); font-weight: 800; }
.logo-text small { font-size: 0.65rem; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  text-decoration: none; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; right: 0; width: 0; height: 2px;
  background: var(--primary); transition: width 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.mobile-menu-btn { display: none; }
.mobile-menu {
  display: none; flex-direction: column; gap: 0.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 0.5rem 0; }

/* ---- Hero ---- */
.hero {
  position: relative; min-height: 90vh; display: flex; align-items: center;
  padding-top: var(--nav-h); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--bg) 0%, var(--surface-alt) 50%, var(--bg) 100%);
}
.dark .hero-gradient { background: linear-gradient(160deg, #0c0a09, #1c1917 50%, #0c0a09); }

/* Geometric pattern — signature element */
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.035; pointer-events: none;
  background-image: 
    repeating-linear-gradient(45deg, var(--text) 0, var(--text) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(-45deg, var(--text) 0, var(--text) 1px, transparent 1px, transparent 24px);
}
.dark .hero-pattern { opacity: 0.025; }

.hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25;
  animation: float 12s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.o1 { width: 400px; height: 400px; background: var(--primary); top: -10%; right: -5%; }
.o2 { width: 300px; height: 300px; background: var(--accent); bottom: 0%; left: -8%; animation-delay: -4s; }
.o3 { width: 200px; height: 200px; background: var(--secondary); top: 40%; left: 30%; opacity: 0.08; animation-delay: -7s; }

.hero-inner {
  position: relative; z-index: 1; text-align: center;
  max-width: 42rem; margin-inline: auto; padding-block: 3rem;
}

.pill {
  display: inline-block; padding: 0.3rem 0.85rem; margin-bottom: 1.5rem;
  font-size: 0.72rem; font-weight: 600; color: var(--primary);
  background: rgb(180 83 9 / 0.06); border: 1px solid rgb(180 83 9 / 0.12);
  border-radius: 999px; letter-spacing: 0.02em;
}
.dark .pill { color: var(--primary-light); }

.hero-title {
  font-size: clamp(2.1rem, 5.5vw, 3.2rem); font-weight: 900;
  line-height: 1.2; margin-bottom: 1.25rem; letter-spacing: -0.03em;
}
.hero-title .hl {
  color: var(--primary);
  position: relative;
  display: inline;
}
.hero-title .hl::after {
  content: ''; position: absolute; bottom: 2px; right: 0; left: 0;
  height: 8px; background: rgb(180 83 9 / 0.1); border-radius: 4px;
  z-index: -1;
}

.hero-lead {
  font-size: 1rem; color: var(--muted); max-width: 34rem;
  margin-inline: auto; margin-bottom: 2rem; line-height: 1.8;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 3rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
  max-width: 34rem; margin-inline: auto;
}
.hstat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 0.75rem 0.5rem; transition: all 0.2s;
}
.hstat:hover { border-color: var(--primary); box-shadow: var(--glow); }
.hstat b { display: block; font-size: 0.9rem; color: var(--primary); font-weight: 700; }
.hstat span { font-size: 0.68rem; color: var(--muted); }

/* ---- Sections ---- */
.section { padding-block: clamp(4rem, 8vw, 6rem); }
.section.alt { background: var(--surface-alt); }

.sec-head { text-align: center; margin-bottom: 3rem; }
.tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 0.5rem;
  padding: 0.25rem 0.65rem; background: rgb(180 83 9 / 0.05);
  border: 1px solid rgb(180 83 9 / 0.1); border-radius: var(--r);
}
.sec-head h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 900; margin-bottom: 0.5rem; }
.sec-head p { color: var(--muted); font-size: 0.95rem; max-width: 30rem; margin-inline: auto; }

/* ---- Feature cards — Asymmetric grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cards-grid .card:nth-child(1) { grid-column: span 2; }
.cards-grid .card:nth-child(5) { grid-column: span 2; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.75rem; transition: all 0.25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 4px; height: 0; background: var(--primary);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card:hover::before { height: 100%; }

.card-icon {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.85rem;
}
.card-icon svg { width: 1.35rem; height: 1.35rem; stroke-width: 1.5; }
.ci-amber { color: #b45309; }
.ci-stone { color: #57534e; }
.ci-orange { color: #ea580c; }
.ci-emerald { color: #059669; }
.ci-rose { color: #e11d48; }

.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.card p { font-size: 0.82rem; color: var(--muted); line-height: 1.75; }

/* ---- Highlights ---- */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.hl-item {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.15rem 1.25rem;
  transition: all 0.2s;
}
.hl-item:hover { border-color: var(--primary); }
.hl-num {
  font-size: 1.25rem; font-weight: 900; line-height: 1;
  color: var(--primary); opacity: 0.35; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.hl-item h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.2rem; }
.hl-item p { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ---- Tech ---- */
.tech-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem;
}
.tech-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
}
.tech-col h4 { font-size: 0.85rem; font-weight: 700; color: var(--primary); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span {
  font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.65rem;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text); transition: all 0.2s;
}
.chips span:hover { border-color: var(--primary); color: var(--primary); }

.arch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 1.5rem; border: 1px dashed var(--border); border-radius: var(--r);
  background: var(--surface-alt);
}
.arch-node {
  padding: 0.75rem 1.15rem; border-radius: var(--r); font-weight: 700; font-size: 0.85rem;
  background: var(--surface); border: 1px solid var(--border);
}
.arch-node.accent { background: rgb(180 83 9 / 0.06); border-color: rgb(180 83 9 / 0.15); color: var(--primary); }
.arch-line { font-size: 0.78rem; font-weight: 600; color: var(--muted); }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border); padding-block: 1.75rem;
  background: var(--surface);
}
.footer-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: 0.82rem; color: var(--muted);
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

/* ---- FAB ---- */
.fab {
  position: fixed; z-index: 90; display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.9rem; border-radius: var(--r); color: #fff; font-weight: 700;
  font-size: 0.8rem; box-shadow: var(--shadow-lg); text-decoration: none;
  transition: all 0.2s;
}
.fab svg { width: 1.1rem; height: 1.1rem; }
.fab-gh { bottom: 1.25rem; left: 1.25rem; background: var(--secondary); }
.fab-gh:hover { transform: translateY(-2px); text-decoration: none; }
.fab-live {
  bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--primary);
}
.fab-live:hover { transform: translateX(-50%) translateY(-2px); text-decoration: none; }

/* ---- Animations ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-sm { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .tech-row { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid .card:nth-child(1),
  .cards-grid .card:nth-child(5) { grid-column: span 1; }
  .fab span { display: none; }
  .fab { padding: 0.75rem; border-radius: var(--r); }
  .fab-live { bottom: 4.5rem; left: 1.25rem; transform: none; }
  .fab-live:hover { transform: translateY(-2px); }
  .arch { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .orb { animation: none; }
}
