/* ============================================================
   3am Files — Custom Stylesheet v1.1
   Light editorial theme. Inter font throughout. No emoji icons.
   ============================================================ */

:root {
  --amf-bg:         #f8f6f2;
  --amf-surface:    #f0edf8;
  --amf-surface-2:  #ffffff;
  --amf-border:     #e2ddf0;
  --amf-text:       #1a1a2e;
  --amf-muted:      #6b6880;
  --amf-purple:     #6d28d9;
  --amf-purple-dk:  #5b21b6;
  --amf-purple-lt:  #ede9fe;
  --amf-teal:       #0e7490;
  --amf-teal-lt:    #e0f2fe;
  --amf-amber:      #d97706;
  --amf-amber-bg:   #fffbeb;
  --amf-green:      #15803d;
  --amf-green-bg:   #f0fdf4;
  --amf-font:       'Inter', 'Helvetica Neue', Arial, sans-serif;
  --amf-radius:     8px;
  --amf-radius-lg:  14px;
  --amf-shadow:     0 2px 12px rgba(109,40,217,0.07);
  --amf-shadow-md:  0 4px 24px rgba(109,40,217,0.11);
}

:root {
  --theme-palette-color-1: #6d28d9;
  --theme-palette-color-2: #5b21b6;
  --theme-palette-color-3: #1a1a2e;
  --theme-palette-color-4: #6b6880;
  --theme-palette-color-5: #e2ddf0;
  --theme-palette-color-6: #f0edf8;
  --theme-palette-color-7: #f8f6f2;
  --theme-palette-color-8: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--amf-bg);
  color: var(--amf-text);
  font-family: var(--amf-font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--amf-font);
  font-weight: 800;
  color: var(--amf-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--amf-teal); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--amf-purple); }
img { max-width: 100%; height: auto; }

.amf-container        { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.amf-container--narrow{ max-width: 800px;  margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.amf-header {
  background: var(--amf-surface-2);
  border-bottom: 1px solid var(--amf-border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 8px rgba(26,26,46,0.06);
}
.amf-header__inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px; height: 68px;
}

.amf-logo { display: flex; align-items: center; text-decoration: none; }
.amf-logo__img { height: 38px; width: auto; display: block; }

/* Primary nav */
.amf-nav { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.amf-nav > li { position: relative; }
.amf-nav > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 13px; font-size: 13px; font-weight: 600;
  color: var(--amf-text); letter-spacing: 0.01em;
  border-radius: var(--amf-radius);
  transition: background 0.15s, color 0.15s;
}
.amf-nav > li > a:hover { background: var(--amf-purple-lt); color: var(--amf-purple); }
.amf-nav > li > a .arrow { font-size: 9px; opacity: 0.4; transition: transform 0.2s; }
.amf-nav > li:hover > a .arrow { transform: rotate(180deg); }

/* Dropdown */
.amf-dropdown {
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--amf-surface-2);
  border: 1px solid var(--amf-border);
  border-radius: var(--amf-radius-lg);
  box-shadow: var(--amf-shadow-md);
  padding: 14px; min-width: 200px; display: none; z-index: 500;
}
.amf-nav > li:hover .amf-dropdown { display: block; }
.amf-dropdown a {
  display: block; padding: 8px 12px;
  font-size: 13px; font-weight: 500; color: var(--amf-text);
  border-radius: 6px; transition: background 0.12s, color 0.12s;
}
.amf-dropdown a:hover { background: var(--amf-purple-lt); color: var(--amf-purple); }
.amf-dropdown-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--amf-muted);
  padding: 4px 12px 2px; margin-top: 8px;
}
.amf-dropdown-title:first-child { margin-top: 0; }

/* Header right */
.amf-header__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.amf-search-btn {
  background: none; border: 1px solid var(--amf-border);
  border-radius: var(--amf-radius); padding: 8px 14px;
  font-size: 13px; color: var(--amf-muted); cursor: pointer;
  font-family: var(--amf-font); transition: border-color 0.15s, color 0.15s;
}
.amf-search-btn:hover { border-color: var(--amf-purple); color: var(--amf-purple); }
.amf-random-btn {
  background: var(--amf-purple); color: #fff; border: none;
  border-radius: var(--amf-radius); padding: 8px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s; font-family: var(--amf-font);
}
.amf-random-btn:hover { background: var(--amf-purple-dk); color: #fff; }
.amf-nav-toggle {
  display: none; background: none;
  border: 1px solid var(--amf-border); border-radius: var(--amf-radius);
  padding: 8px 12px; cursor: pointer; color: var(--amf-text); font-size: 18px;
}

/* Search overlay */
.amf-search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,26,46,0.5); z-index: 2000;
  align-items: flex-start; justify-content: center; padding-top: 120px;
}
.amf-search-overlay.active { display: flex; }
.amf-search-box {
  background: var(--amf-surface-2); border-radius: var(--amf-radius-lg);
  padding: 28px; width: 100%; max-width: 600px; box-shadow: var(--amf-shadow-md);
}
.amf-search-box form { display: flex; gap: 10px; }
.amf-search-box input[type="search"] {
  flex: 1; border: 1px solid var(--amf-border); border-radius: var(--amf-radius);
  padding: 12px 16px; font-size: 16px; font-family: var(--amf-font);
  background: var(--amf-bg); color: var(--amf-text); outline: none;
}
.amf-search-box input[type="search"]:focus { border-color: var(--amf-purple); }
.amf-search-box button[type="submit"] {
  background: var(--amf-purple); color: #fff; border: none;
  border-radius: var(--amf-radius); padding: 12px 20px;
  font-size: 15px; cursor: pointer; font-family: var(--amf-font); font-weight: 600;
}

/* ── HOMEPAGE ── */
.amf-hero { background: var(--amf-surface-2); border-bottom: 1px solid var(--amf-border); }
.amf-hero__inner { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; }
.amf-hero__image { position: relative; overflow: hidden; }
.amf-hero__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amf-hero__image-placeholder {
  width: 100%; height: 100%; min-height: 420px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1a4e 100%);
}
.amf-hero__content {
  padding: 60px 56px; display: flex; flex-direction: column; justify-content: center;
}
.amf-hero__tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--amf-purple); margin-bottom: 14px;
}
.amf-hero__title {
  font-size: 34px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--amf-text); line-height: 1.15; margin-bottom: 18px;
}
.amf-hero__title a { color: var(--amf-text); }
.amf-hero__title a:hover { color: var(--amf-purple); }
.amf-hero__excerpt { font-size: 15px; color: var(--amf-muted); line-height: 1.7; margin-bottom: 28px; }

.amf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amf-purple); color: #fff;
  padding: 12px 24px; border-radius: var(--amf-radius);
  font-size: 14px; font-weight: 600; font-family: var(--amf-font);
  text-decoration: none; transition: background 0.15s; align-self: flex-start;
}
.amf-btn:hover { background: var(--amf-purple-dk); color: #fff; }

.amf-section { padding: 60px 0; }
.amf-section--grey { background: var(--amf-surface); }
.amf-section-header { margin-bottom: 28px; }
.amf-section-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.amf-section-sub { font-size: 14px; color: var(--amf-muted); margin: 0; }
.amf-section-link {
  font-size: 13px; font-weight: 600; color: var(--amf-teal);
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
}
.amf-section-link:hover { color: var(--amf-purple); }

/* Category grid — no icons, number accent */
.amf-cat-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; }
.amf-cat-card {
  background: var(--amf-surface-2); border: 1px solid var(--amf-border);
  border-radius: var(--amf-radius); padding: 18px 14px;
  text-decoration: none; display: flex; flex-direction: column;
  align-items: center; text-align: center;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  position: relative; overflow: hidden;
}
.amf-cat-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--amf-purple); transform: scaleX(0);
  transition: transform 0.18s; transform-origin: left;
}
.amf-cat-card:hover { border-color: var(--amf-purple); box-shadow: var(--amf-shadow); transform: translateY(-2px); }
.amf-cat-card:hover::before { transform: scaleX(1); }
.amf-cat-card__num {
  font-size: 26px; font-weight: 900; color: var(--amf-purple);
  line-height: 1; margin-bottom: 8px; letter-spacing: -0.03em;
}
.amf-cat-card__name {
  font-size: 12px; font-weight: 700; color: var(--amf-text);
  line-height: 1.3; margin-bottom: 5px; letter-spacing: -0.01em;
}
.amf-cat-card__count { font-size: 11px; color: var(--amf-muted); }

/* Article grid */
.amf-article-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.amf-card {
  background: var(--amf-surface-2); border: 1px solid var(--amf-border);
  border-radius: var(--amf-radius-lg); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column;
}
.amf-card:hover { box-shadow: var(--amf-shadow-md); transform: translateY(-3px); }
.amf-card__image { position: relative; padding-top: 55%; overflow: hidden; background: var(--amf-surface); }
.amf-card__image img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.3s;
}
.amf-card:hover .amf-card__image img { transform: scale(1.04); }
.amf-card__image-placeholder {
  position: absolute; inset: 0; background: linear-gradient(135deg, var(--amf-surface), var(--amf-purple-lt));
}
.amf-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.amf-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.amf-cat-tag {
  display: inline-block; background: var(--amf-purple-lt); color: var(--amf-purple);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 8px; border-radius: 20px;
}
.amf-cat-tag:hover { background: var(--amf-purple); color: #fff; }
.amf-read-time { font-size: 11px; color: var(--amf-muted); }
.amf-card__title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; margin: 0 0 auto; }
.amf-card__title a { color: var(--amf-text); }
.amf-card__title a:hover { color: var(--amf-purple); }

/* Collections */
.amf-collection { margin-bottom: 36px; }
.amf-collection:last-child { margin-bottom: 0; }
.amf-collection__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--amf-border);
}
.amf-collection__title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--amf-text); margin: 0; }
.amf-collection__strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.amf-strip-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--amf-surface-2); border: 1px solid var(--amf-border);
  border-radius: var(--amf-radius); padding: 12px 14px;
  text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.amf-strip-card:hover { border-color: var(--amf-purple); box-shadow: var(--amf-shadow); }
.amf-strip-card__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amf-purple); flex-shrink: 0;
}
.amf-strip-card__title { font-size: 13px; font-weight: 600; color: var(--amf-text); line-height: 1.3; }

/* ── ARTICLE PAGE ── */
.amf-article-wrap { padding: 52px 0 80px; }
.amf-breadcrumb {
  font-size: 12px; color: var(--amf-muted); margin-bottom: 28px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.amf-breadcrumb a { color: var(--amf-muted); }
.amf-breadcrumb a:hover { color: var(--amf-purple); }
.amf-breadcrumb .sep { opacity: 0.4; }
.amf-article-header { margin-bottom: 28px; }
.amf-article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.amf-article-title {
  font-size: 36px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--amf-text); line-height: 1.12; margin: 0 0 24px;
}
.amf-article-featured-image { border-radius: var(--amf-radius-lg); overflow: hidden; margin-bottom: 36px; }
.amf-article-featured-image img { width: 100%; height: 360px; object-fit: cover; display: block; }

/* Badges */
.amf-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 20px;
}
.amf-badge--high       { background: var(--amf-green-bg); color: var(--amf-green); }
.amf-badge--medium     { background: var(--amf-teal-lt);  color: var(--amf-teal); }
.amf-badge--unverified { background: var(--amf-amber-bg); color: var(--amf-amber); }

/* Disclaimer */
.amf-disclaimer {
  background: var(--amf-amber-bg); border-left: 4px solid var(--amf-amber);
  border-radius: 0 var(--amf-radius) var(--amf-radius) 0;
  padding: 16px 20px; margin: 28px 0; font-size: 14px; color: #78350f; line-height: 1.7;
}
.amf-disclaimer strong {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 5px; color: var(--amf-amber);
}

/* Article body */
.amf-article-body { font-size: 18px; line-height: 1.85; color: var(--amf-text); }
.amf-article-body p { margin: 0 0 1.4em; }
.amf-article-body h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  margin: 2em 0 0.6em; padding-top: 0.4em; border-top: 1px solid var(--amf-border);
}
.amf-article-body h3 { font-size: 18px; font-weight: 700; margin: 1.6em 0 0.5em; }
.amf-article-body ul, .amf-article-body ol { margin: 0 0 1.4em 1.4em; }
.amf-article-body li { margin-bottom: 0.4em; }
.amf-article-body blockquote {
  border-left: 4px solid var(--amf-purple); background: var(--amf-purple-lt);
  margin: 2em 0; padding: 16px 20px; border-radius: 0 var(--amf-radius) var(--amf-radius) 0;
  font-size: 16px; font-style: italic;
}

/* Tags */
.amf-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 32px 0; padding-top: 22px; border-top: 1px solid var(--amf-border);
}
.amf-tag {
  background: var(--amf-surface); border: 1px solid var(--amf-border);
  color: var(--amf-muted); font-size: 12px; padding: 5px 12px; border-radius: 20px;
  transition: border-color 0.15s, color 0.15s;
}
.amf-tag:hover { border-color: var(--amf-purple); color: var(--amf-purple); }

/* Related */
.amf-related { margin-top: 56px; padding-top: 36px; border-top: 2px solid var(--amf-border); }
.amf-related__title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 22px; }

/* ── ARCHIVE ── */
.amf-archive-header { background: var(--amf-surface-2); border-bottom: 1px solid var(--amf-border); padding: 48px 0 36px; }
.amf-archive-header__title { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.amf-archive-header__desc { font-size: 15px; color: var(--amf-muted); max-width: 580px; margin: 0 0 10px; line-height: 1.7; }
.amf-archive-header__count { font-size: 13px; color: var(--amf-purple); font-weight: 600; }
.amf-archive-body { padding: 44px 0 68px; }
.amf-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.amf-filter-bar label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amf-muted); }
.amf-filter-btn {
  background: var(--amf-surface-2); border: 1px solid var(--amf-border);
  border-radius: 20px; padding: 6px 14px; font-size: 12.5px;
  color: var(--amf-muted); cursor: pointer; font-family: var(--amf-font);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.amf-filter-btn:hover, .amf-filter-btn.active {
  border-color: var(--amf-purple); color: var(--amf-purple); background: var(--amf-purple-lt);
}

/* Pagination */
.amf-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.amf-pagination a, .amf-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--amf-radius);
  border: 1px solid var(--amf-border); font-size: 14px; font-weight: 600;
  color: var(--amf-text); text-decoration: none; transition: all 0.15s;
}
.amf-pagination a:hover { border-color: var(--amf-purple); color: var(--amf-purple); background: var(--amf-purple-lt); }
.amf-pagination .current { background: var(--amf-purple); border-color: var(--amf-purple); color: #fff; }

/* ── FOOTER ── */
.amf-footer { background: var(--amf-surface); border-top: 1px solid var(--amf-border); padding: 48px 0 28px; }
.amf-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.amf-footer__tagline { font-size: 14px; color: var(--amf-muted); line-height: 1.7; margin: 14px 0 0; }
.amf-footer__col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 14px; }
.amf-footer__links { list-style: none; margin: 0; padding: 0; }
.amf-footer__links li { margin-bottom: 8px; }
.amf-footer__links a { font-size: 13.5px; color: var(--amf-muted); transition: color 0.15s; }
.amf-footer__links a:hover { color: var(--amf-purple); }
.amf-footer__bottom {
  padding-top: 22px; border-top: 1px solid var(--amf-border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.amf-footer__copy { font-size: 12px; color: var(--amf-muted); margin: 0; }
.amf-footer__count { font-size: 12px; color: var(--amf-purple); font-weight: 600; }

/* ── UTILITIES ── */
.u-text-muted  { color: var(--amf-muted); }
.u-text-purple { color: var(--amf-purple); }
.u-mt-0 { margin-top: 0; }
.u-mb-0 { margin-bottom: 0; }
.u-flex-center { display: flex; align-items: center; justify-content: space-between; }

/* ── MOBILE NAV ── */
.amf-mobile-nav {
  display: none; position: fixed; inset: 0; background: var(--amf-surface-2);
  z-index: 3000; overflow-y: auto; padding: 24px;
}
.amf-mobile-nav.active { display: block; }
.amf-mobile-nav__close { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.amf-mobile-nav__close button {
  background: none; border: 1px solid var(--amf-border); border-radius: var(--amf-radius);
  padding: 8px 14px; font-size: 18px; cursor: pointer; color: var(--amf-text);
}
.amf-mobile-nav a {
  display: block; padding: 14px 0; font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--amf-text); border-bottom: 1px solid var(--amf-border);
}
.amf-mobile-nav a:hover { color: var(--amf-purple); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .amf-cat-grid { grid-template-columns: repeat(4,1fr); }
  .amf-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .amf-hero__inner { grid-template-columns: 1fr; }
  .amf-hero__image { display: none; }
  .amf-hero__content { padding: 44px 28px; }
  .amf-article-grid { grid-template-columns: repeat(2,1fr); }
  .amf-collection__strip { grid-template-columns: repeat(2,1fr); }
  .amf-cat-grid { grid-template-columns: repeat(3,1fr); }
  .amf-nav { display: none; }
  .amf-nav-toggle { display: flex; }
  .amf-article-title { font-size: 28px; }
}
@media (max-width: 640px) {
  .amf-cat-grid { grid-template-columns: repeat(2,1fr); }
  .amf-article-grid { grid-template-columns: 1fr; }
  .amf-collection__strip { grid-template-columns: 1fr; }
  .amf-footer__grid { grid-template-columns: 1fr; }
  .amf-hero__content { padding: 32px 16px; }
  .amf-hero__title { font-size: 26px; }
  .amf-container, .amf-container--narrow { padding: 0 16px; }
}
