:root {
  --color-primary: #1C1917;
  --color-on-primary: #FFFFFF;
  --color-secondary: #44403C;
  --color-accent: #A16207;
  --color-accent-bright: #D4A017;
  --color-accent-soft: #F5E6C8;
  --color-background: #0F0E0C;
  --color-surface: #1A1816;
  --color-surface-2: #24201C;
  --color-foreground: #FAF7F2;
  --color-muted: #A8A29E;
  --color-border: rgba(212, 160, 23, 0.22);
  --color-glass: rgba(255, 255, 255, 0.06);
  --font-display: "Cormorant", "Times New Roman", serif;
  --font-body: "Vazirmatn", Tahoma, sans-serif;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --max: 1120px;
  --transition: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(161, 98, 7, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(68, 64, 60, 0.45), transparent 50%),
    linear-gradient(180deg, #141210 0%, var(--color-background) 40%, #120f0c 100%);
  color: var(--color-foreground);
  line-height: 1.9;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-bright);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: #F0D78C;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--color-accent-bright);
  color: #1C1917;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-foreground);
  line-height: 1;
}

.brand span {
  color: var(--color-accent-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-foreground);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 14, 12, 0.35) 0%, rgba(15, 14, 12, 0.72) 48%, rgba(15, 14, 12, 0.96) 100%),
    linear-gradient(90deg, rgba(15, 14, 12, 0.55), transparent 55%);
}

.hero-content {
  padding: 6.5rem 0 3.5rem;
  max-width: 720px;
}

.hero-kicker {
  display: inline-block;
  color: var(--color-accent-soft);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero h1 .fa {
  display: block;
  font-family: var(--font-body);
  font-size: 0.42em;
  font-weight: 600;
  color: var(--color-accent-bright);
  margin-top: 0.35rem;
  letter-spacing: 0;
}

.hero-lead {
  font-size: 1.08rem;
  color: #E7E5E4;
  margin: 0 0 1.75rem;
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.95rem 1.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #D4A017, #A16207);
  color: #1C1917;
  box-shadow: 0 10px 30px rgba(161, 98, 7, 0.35);
}

.btn-primary:hover {
  color: #0C0A09;
  box-shadow: 0 14px 34px rgba(212, 160, 23, 0.4);
}

.btn-secondary {
  background: var(--color-glass);
  border-color: var(--color-border);
  color: var(--color-foreground);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--color-accent-bright);
  color: #fff;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.section-lead {
  color: var(--color-muted);
  margin: 0 0 2rem;
  max-width: 42rem;
}

.glass-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.article-body {
  font-size: 1.02rem;
  color: #E7E5E4;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin: 2.6rem 0 1rem;
  color: #FFF8E7;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.7rem;
  color: var(--color-accent-soft);
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.3rem;
  padding-inline-start: 1.3rem;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figcaption {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin-top: 0.55rem;
  text-align: center;
}

.content-image {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  object-fit: cover;
  max-height: 520px;
}

.inline-cta {
  margin: 2.2rem 0;
  padding: 1.4rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(120deg, rgba(161, 98, 7, 0.22), rgba(36, 32, 28, 0.85));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.inline-cta p {
  margin: 0;
  color: #F5E6C8;
  font-weight: 500;
  max-width: 28rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition), border-color var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 160, 23, 0.45);
}

.post-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.post-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.post-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.55;
}

.post-card h3 a {
  color: var(--color-foreground);
}

.post-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
  flex: 1;
}

.post-meta {
  color: #78716C;
  font-size: 0.82rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--color-border);
  background: #0A0908;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.6rem;
}

.footer-brand span {
  color: var(--color-accent-bright);
}

.site-footer h4 {
  margin: 0 0 0.8rem;
  color: var(--color-accent-soft);
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--color-muted);
}

.site-footer a:hover {
  color: var(--color-foreground);
}

.footer-note {
  color: #78716C;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  background: var(--color-glass);
}

.social-row a:hover {
  border-color: var(--color-accent-bright);
  color: var(--color-accent-bright);
}

.social-row svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.page-hero {
  padding: 3.2rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.8rem;
  line-height: 1.2;
}

.breadcrumb {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-muted);
}

.rank-section {
  padding-top: 3.2rem;
}

.rank-intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.6rem;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(161, 98, 7, 0.18);
  color: var(--color-accent-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.rank-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.2rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.rank-card.is-top {
  border-color: rgba(212, 160, 23, 0.55);
  background:
    linear-gradient(120deg, rgba(212, 160, 23, 0.16), rgba(255, 255, 255, 0.03) 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.rank-pos {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #1C1917;
  background: linear-gradient(135deg, #F0D78C, #A16207);
  box-shadow: 0 8px 20px rgba(161, 98, 7, 0.35);
}

.rank-card:nth-child(n+4) .rank-pos {
  background: linear-gradient(135deg, #57534E, #292524);
  color: #FAF7F2;
  box-shadow: none;
}

.rank-main {
  min-width: 0;
}

.rank-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.45rem;
}

.rank-name {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-family: var(--font-display);
  line-height: 1.2;
}

.rank-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #F0D78C;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  line-height: 1;
}

.stars .score {
  margin-inline-start: 0.45rem;
  color: var(--color-foreground);
  font-size: 0.92rem;
  font-weight: 700;
}

.stars .count {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.rank-summary {
  margin: 0 0 0.9rem;
  color: #D6D3D1;
  font-size: 0.95rem;
}

.rank-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.rank-box {
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.rank-box h4 {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.rank-box.pros h4 {
  color: #86EFAC;
}

.rank-box.cons h4 {
  color: #FCA5A5;
}

.rank-box ul {
  margin: 0;
  padding-inline-start: 1.1rem;
}

.rank-box li {
  margin-bottom: 0.28rem;
  font-size: 0.88rem;
  color: #E7E5E4;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.chip {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.03);
}

.chip.hot {
  color: #F5E6C8;
  border-color: rgba(212, 160, 23, 0.45);
  background: rgba(161, 98, 7, 0.2);
}

.rank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.rank-actions .btn {
  padding: 0.75rem 1.2rem;
  font-size: 0.92rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  cursor: default;
}

/* Visible by default to avoid CLS; enhance only when JS marks .js on <html> */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal:not(.visible) {
  opacity: 0.01;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal:not(.visible),
  html.js .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .post-card:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .posts-grid,
  .footer-grid,
  .rank-cols {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 1rem;
    top: calc(100% + 0.4rem);
    flex-direction: column;
    align-items: stretch;
    background: rgba(20, 18, 16, 0.96);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.9rem;
  }

  .nav-links.open {
    display: flex;
  }

  .posts-grid,
  .footer-grid,
  .rank-cols {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 5rem;
  }

  .inline-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
