/* ==========================================================================
   Folder Prettifier — Minimal Editorial Design System
   Typography: Newsreader (Serif) + Plus Jakarta Sans (Sans-serif)
   ========================================================================== */

/* ---------- FONTS ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("fonts/PublicSans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- DESIGN TOKENS ---------- */
:root {
  --font-serif: "Newsreader", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Public Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-w: 1340px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Default: DARK (matches most users' system preference; light overrides below) */
  --bg-body: #12100E;
  --bg-surface: #1B1815;
  --bg-subtle: #24211D;

  --text-main: #F5F2EB;
  --text-muted: #A8A29E;
  --text-subtle: #78716C;

  --border-light: rgba(245, 242, 235, 0.08);
  --border-medium: rgba(245, 242, 235, 0.16);

  --accent-color: #F59E0B;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-ink: #0F172A;

  --mess-text: #F87171;
  --mess-bg: rgba(248, 113, 113, 0.1);
  --clean-text: #34D399;
  --clean-bg: rgba(52, 211, 153, 0.1);
}

@media (prefers-color-scheme: light) {
  --bg-body: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F2EDE4;

  --text-main: #1C1917;
  --text-muted: #57534E;
  --text-subtle: #78716C;

  --border-light: rgba(28, 25, 23, 0.08);
  --border-medium: rgba(28, 25, 23, 0.16);

  --accent-color: #B45309;
  --accent-soft: rgba(180, 83, 9, 0.1);
  --accent-ink: #FFFFFF;

  --mess-text: #DC2626;
  --mess-bg: rgba(220, 38, 38, 0.06);
  --clean-text: #059669;
  --clean-bg: rgba(5, 150, 105, 0.06);
}

/* ---------- BASE RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  background-color: var(--bg-body);
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent-color);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

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

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--text-main);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.02em;
}

em {
  font-style: italic;
  font-family: var(--font-serif);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-subtle);
  border-radius: 4px;
  color: var(--text-main);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.text-center {
  text-align: center;
}

/* ---------- HEADER / NAV ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-body) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 72px;
}

.header-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.brand-icon {
  border-radius: 6px;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-main);
}

.nav {
  display: flex;
  gap: 28px;
}

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

.nav a:hover {
  color: var(--text-main);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-link {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-link svg {
  width: 20px;
  height: 20px;
}

.icon-link:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  opacity: 1;
  transform: scale(1.05);
}


/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-lg {
  height: 54px;
  padding: 0 28px;
  font-size: 1rem;
}

.btn-xl {
  height: 60px;
  padding: 0 36px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-body);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-main);
}

.btn-meta {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.8;
}

/* ---------- HERO SECTION ---------- */
.hero {
  padding: 90px 0 70px 0;
  text-align: center;
}

.hero-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
}

.hero-headline {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--text-main);
  line-height: 1.06;
}

.hero-lead {
  font-size: clamp(1rem, 1.1vw, 1.22rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
}

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

.hero-meta-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-subtle);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--clean-text);
  stroke: var(--clean-text);
}

/* ---------- AT A GLANCE: COMPARISON CARD ---------- */
.overview-section {
  padding: 40px 0 80px 0;
}

.at-glance-header {
  margin-bottom: 44px;
}

.at-glance-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.comparison-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
}

.comparison-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

/* Before column */
.col-before,
.col-after {
  padding: 36px;
}

.col-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 24px;
}

.col-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-bad {
  background: var(--mess-text);
}

.dot-good {
  background: var(--clean-text);
}

.file-rows {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.file-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}

.file-rows li:last-child {
  border-bottom: none;
}

.fr-name {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  padding: 0;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.fr-name.bad {
  color: var(--mess-text);
}

.fr-name.good {
  color: var(--text-main);
}

.fr-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mess-text);
  opacity: 0.9;
  white-space: nowrap;
  flex-shrink: 0;
}

.file-row-folder {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.folder-row-label {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-color);
  letter-spacing: 0.01em;
}

/* Divider */
.col-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
  width: 72px;
  gap: 0;
  background: var(--bg-body);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.divider-line {
  flex: 1;
  width: 1px;
  background: var(--border-medium);
}

.divider-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 16px 0;
  color: var(--accent-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-color) 25%, transparent);
}

.divider-badge svg {
  width: 16px;
  height: 16px;
}



/* ---------- FEATURES GRID ---------- */
.features-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
}

.section-head {
  margin-bottom: 48px;
  max-width: 600px;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-medium);
}

.feature-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent-color);
  display: block;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 1.18rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ---------- HOW IT WORKS ---------- */
.how-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-item {
  display: flex;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  align-items: flex-start;
}

.step-badge {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent-color);
  line-height: 1;
  min-width: 40px;
}

.step-heading {
  font-size: 1.25rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-text {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- DOWNLOAD SECTION ---------- */
.download-section {
  padding: 90px 0;
  border-top: 1px solid var(--border-light);
}

.download-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.box-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  display: block;
  margin-bottom: 10px;
}

.box-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.box-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.download-cta-row {
  margin-bottom: 24px;
}

.download-details {
  font-size: 0.88rem;
  color: var(--text-subtle);
  margin-bottom: 20px;
}

.download-alt-row {
  margin-top: 16px;
}

.dl-alt-link {
  font-size: 0.82rem;
  color: var(--text-subtle);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.dl-alt-link:hover {
  color: var(--text-main);
  opacity: 1;
}

.dot-sep {
  margin: 0 8px;
}

.checksum-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  max-width: 100%;
  overflow-x: auto;
}

.checksum-label {
  font-weight: 600;
  color: var(--text-subtle);
}

.checksum-val {
  font-family: var(--font-mono);
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 340px;
}

.copy-link {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.footer-right {
  display: flex;
  gap: 20px;
}

.footer-right a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-right a:hover {
  color: var(--text-main);
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 900px) {
  .comparison-columns {
    grid-template-columns: 1fr;
  }

  .col-divider {
    flex-direction: row;
    width: auto;
    height: 56px;
    padding: 0 36px;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
  }

  .divider-line {
    flex: 1;
    height: 1px;
    width: auto;
  }

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

  .header-actions .btn {
    display: none;
  }
}

@media (max-width: 600px) {
  .nav {
    display: none;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}