/* Fonts loaded via <link> in HTML <head> for performance — see preconnect + stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a; --surface: #131313; --card: #1a1a1a; --border: #2a2a2a;
  --accent: #b8e64a; --accent-soft: rgba(184, 230, 74, 0.12);
  --accent2: #78c8c8; --accent2-soft: rgba(120, 200, 200, 0.12);
  --text: #e6e6e6; --muted: #808080; --tag-bg: #222222;
  --header-bg: rgba(10, 10, 10, 0.92);
  --card-hover-shadow: 0 12px 32px rgba(0,0,0,0.4);
  --dropdown-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] {
  --bg: #f0f0ec; --surface: #e2e2dc; --card: #fafaf8; --border: #c8c8c0;
  --accent: #6a8a20; --accent-soft: rgba(106, 138, 32, 0.1);
  --accent2: #488888; --accent2-soft: rgba(72, 136, 136, 0.1);
  --text: #1a1a1a; --muted: #686868; --tag-bg: #e8e8e2;
  --header-bg: rgba(240, 240, 236, 0.92);
  --card-hover-shadow: 0 12px 32px rgba(0,0,0,0.08);
  --dropdown-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; min-height: 100vh; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
  z-index: 1000; padding: 0.8rem 1.5rem; background: var(--accent); color: #0a0a0a;
  font-size: 0.85rem; font-weight: 600; text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-link:focus {
  position: fixed; left: 0; top: 0; width: auto; height: auto; overflow: visible;
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--border); padding: 0 2rem;
  position: sticky; top: 0; background: var(--header-bg);
  backdrop-filter: blur(12px); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1rem;
}
.logo {
  font-family: 'Playfair Display', serif; font-size: 1.5rem;
  letter-spacing: 0.15em; color: var(--accent); flex-shrink: 0; cursor: pointer;
  text-decoration: none;
}
.logo span {
  color: var(--text); font-size: 0.72rem; font-family: 'Inter', sans-serif;
  font-weight: 400; letter-spacing: 0.2em; display: block;
  text-transform: uppercase; margin-top: -4px;
}

nav {
  display: flex; align-items: center; gap: 1.5rem;
}
nav a {
  color: var(--muted); text-decoration: none; font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.04em; transition: color 0.2s;
  white-space: nowrap;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); border-bottom: 2px solid var(--accent2); padding-bottom: 2px; }

.header-right { display: flex; align-items: center; gap: 0.75rem; }
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 1rem; width: 200px;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { color: var(--muted); flex-shrink: 0; }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 0.875rem; width: 100%;
}
.search-box input::placeholder { color: var(--muted); }

/* Hide search box on non-sites pages */
body:not([data-page="sites"]) .search-box { display: none; }

/* ── THEME TOGGLE ── */
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 0.6rem;
  color: var(--text); cursor: pointer; transition: border-color 0.2s;
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 16px; height: 16px; }

/* ── LANG SELECTOR ── */
.lang-selector { position: relative; flex-shrink: 0; }
.lang-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 0.8rem;
  color: var(--text); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: border-color 0.2s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn svg { width: 12px; height: 12px; color: var(--muted); transition: transform 0.2s; }
.lang-selector.open .lang-btn svg { transform: rotate(180deg); }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-width: 140px;
  box-shadow: var(--dropdown-shadow); z-index: 200;
}
.lang-selector.open .lang-dropdown { display: block; }
.lang-option {
  display: block; width: 100%; padding: 0.6rem 1rem; background: none;
  border: none; color: var(--muted); font-size: 0.82rem;
  text-align: left; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.lang-option:hover { background: var(--accent-soft); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }

/* ── VISION SELECTOR ── */
.vision-selector { position: relative; flex-shrink: 0; }
.vision-btn {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 0.6rem;
  color: var(--text); cursor: pointer; transition: border-color 0.2s;
}
.vision-btn:hover { border-color: var(--accent); }
.vision-btn svg { width: 16px; height: 16px; }
.vision-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-width: 140px;
  box-shadow: var(--dropdown-shadow); z-index: 200;
}
.vision-selector.open .vision-dropdown { display: block; }
.vision-option {
  display: block; width: 100%; padding: 0.6rem 1rem; background: none;
  border: none; color: var(--muted); font-size: 0.82rem;
  text-align: left; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.vision-option:hover { background: var(--accent-soft); color: var(--text); }
.vision-option.active { color: var(--accent); font-weight: 600; }

/* ── VISION MODE OVERRIDES ── */
[data-vision="protanopia"] {
  --accent: #68b8e0;
  --accent-soft: rgba(104, 184, 224, 0.12);
  --accent2: #a0c8e0;
  --accent2-soft: rgba(160, 200, 224, 0.12);
}
[data-vision="protanopia"][data-theme="light"] {
  --accent: #3a88b0;
  --accent-soft: rgba(58, 136, 176, 0.1);
  --accent2: #5a98b8;
  --accent2-soft: rgba(90, 152, 184, 0.1);
}
[data-vision="achromatopsia"] {
  --accent: #aaa;
  --accent-soft: rgba(170, 170, 170, 0.12);
  --accent2: #bbb;
  --accent2-soft: rgba(187, 187, 187, 0.12);
}
[data-vision="achromatopsia"][data-theme="light"] {
  --accent: #777;
  --accent-soft: rgba(119, 119, 119, 0.1);
  --accent2: #888;
  --accent2-soft: rgba(136, 136, 136, 0.1);
}

/* ── HERO ── */
.hero { text-align: center; padding: 5rem 2rem 3.5rem; border-bottom: 1px solid var(--border); }
.hero-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 1.2rem;
}
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.15; margin-bottom: 1rem; text-wrap: balance; }
.hero p { color: var(--muted); font-size: 1rem; font-weight: 400; max-width: 480px; margin: 0 auto; line-height: 1.7; }
.hero-stats {
  display: flex; justify-content: center; gap: 3rem; margin-top: 2rem;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 1.6rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-stat .label { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; letter-spacing: 0.05em; }

/* ── FILTER ── */
.filter-bar {
  display: flex; gap: 0.5rem; padding: 1.8rem 2rem;
  overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border);
}
.filter-bar::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 0.45rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: color 0.2s, border-color 0.2s, background-color 0.2s; white-space: nowrap;
}
.tab:hover { color: var(--text); border-color: #3a3a3a; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }

/* ── GRID ── */
.main { padding: 2.5rem 2rem 3rem; max-width: 1400px; margin: 0 auto; }
.section-label {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem; margin-bottom: 2rem;
}

/* ── CARD ── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.4rem 1.4rem 1.2rem; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.85rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(184,230,74,0.06) 40%, transparent 70%);
  opacity: 0; transition: opacity 0.3s; z-index: 0;
}
.card-head, .card-desc, .card-footer { position: relative; z-index: 1; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.card:hover::before { opacity: 1; }
.card-head { display: flex; align-items: center; gap: 0.9rem; }
.favicon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0; border: 1px solid var(--border);
}
.card-title { font-size: 0.97rem; font-weight: 600; line-height: 1.3; }
.card-url { font-size: 0.76rem; color: var(--muted); margin-top: 1px; }
.card-desc {
  font-size: 0.82rem; color: var(--muted); line-height: 1.65; font-weight: 400;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
  font-size: 0.73rem; padding: 0.25rem 0.6rem; border-radius: 999px;
  background: var(--tag-bg); color: var(--muted); font-weight: 500;
}
.arrow { color: var(--accent2); font-size: 0.85rem; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s; }
.card:hover .arrow { opacity: 1; transform: translateX(0); }
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); display: none; }
.empty.show { display: block; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeInUp 0.35s ease both; }

/* ── GUIDE SECTION ── */
.guide-section {
  border-top: 1px solid var(--border); padding: 4rem 2rem;
  max-width: 1000px; margin: 0 auto;
}
.guide-section h2 {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  text-align: center; margin-bottom: 0.6rem;
}
.guide-section > .sub {
  text-align: center; color: var(--muted); font-size: 0.9rem;
  font-weight: 300; margin-bottom: 3rem; line-height: 1.6;
}
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.guide-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.8rem; transition: border-color 0.2s;
}
.guide-card:hover { border-color: #3a3a3a; }
.guide-card h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.guide-card h3 .icon { font-size: 1.3rem; }
.guide-card p {
  color: var(--muted); font-size: 0.84rem; line-height: 1.75; font-weight: 400;
}
.guide-card .tip {
  margin-top: 1rem; padding: 0.8rem 1rem; background: var(--accent-soft);
  border-radius: 8px; font-size: 0.78rem; color: var(--accent);
  font-weight: 500; line-height: 1.6;
}

/* ── ABOUT ── */
.about-section {
  border-top: 1px solid var(--border); padding: 4rem 2rem;
  max-width: 720px; margin: 0 auto;
}
.about-section h2 {
  font-family: 'Playfair Display', serif; font-size: 1.6rem;
  text-align: center; margin-bottom: 0.6rem;
}
.about-section > .sub {
  text-align: center; color: var(--muted); font-size: 0.88rem;
  font-weight: 300; line-height: 1.7; margin-bottom: 2rem;
}
/* ── ABOUT BLOCKS ── */
.about-block {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.8rem; margin-bottom: 1.5rem;
}
.about-block h3 {
  font-size: 1.05rem; font-weight: 600; color: var(--accent); margin-bottom: 0.8rem;
}
.about-block p {
  color: var(--muted); font-size: 0.86rem; line-height: 1.75; font-weight: 400;
}
.about-block ul {
  list-style: none; padding: 0;
}
.about-block ul li {
  color: var(--muted); font-size: 0.86rem; line-height: 1.75; font-weight: 400;
  padding: 0.3rem 0; padding-left: 1.2rem; position: relative;
}
.about-block ul li::before {
  content: ''; position: absolute; left: 0; top: 0.75rem;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.about-values {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2rem;
}
.about-value {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.4rem; text-align: center;
}
.about-value .icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.about-value h4 { font-size: 0.88rem; margin-bottom: 0.4rem; }
.about-value p { font-size: 0.78rem; color: var(--muted); font-weight: 400; line-height: 1.65; }

/* ── ADS ── */
.ad-slot { max-width: 1400px; margin: 0 auto; padding: 1.5rem 2rem; text-align: center; }
.ad-slot ins { display: block; }

/* ── SUBMIT FORM ── */
.submit-section { border-top: 1px solid var(--border); padding: 4rem 2rem; max-width: 640px; margin: 0 auto; }
.submit-section h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.5rem; }
.submit-section .sub { color: var(--muted); font-size: 0.85rem; font-weight: 300; line-height: 1.6; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-bottom: 0.4rem; letter-spacing: 0.04em; }
.form-group label .req { color: var(--accent2); margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.7rem 1rem; color: var(--text);
  font-size: 0.88rem; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder, .form-group textarea::placeholder { color: #585858; }
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder { color: #888888; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}
.form-group select option { background: var(--card); color: var(--text); }
.submit-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 0.5rem; padding: 0.75rem 2rem; background: var(--accent);
  color: #0a0a0a; border: none; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.submit-btn:hover { background: #c8f060; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(184, 230, 74, 0.3); color: #0a0a0a; }
.form-success { display: none; text-align: center; padding: 2.5rem 1rem; }
.form-success.show { display: block; }
.form-success .check { font-size: 2.5rem; margin-bottom: 1rem; }
.form-success h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.form-success p { color: var(--muted); font-size: 0.85rem; }

/* ── DISQUS ── */
.comments-section { border-top: 1px solid var(--border); padding: 4rem 2rem; max-width: 800px; margin: 0 auto; }
.comments-section h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.5rem; }
.comments-section .sub { color: var(--muted); font-size: 0.85rem; font-weight: 300; line-height: 1.6; margin-bottom: 2rem; }
#disqus_thread { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; }

/* ── BLOG ── */
.blog-section {
  border-top: 1px solid var(--border); padding: 4rem 2rem;
  max-width: 800px; margin: 0 auto;
}
.blog-section h2 {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  text-align: center; margin-bottom: 0.6rem;
}
.blog-section > .sub {
  text-align: center; color: var(--muted); font-size: 0.9rem;
  font-weight: 300; margin-bottom: 3rem; line-height: 1.6;
}
.blog-grid {
  display: grid; gap: 1.5rem; margin-bottom: 3rem;
}
.blog-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.8rem; transition: border-color 0.2s; cursor: pointer;
  text-decoration: none; color: inherit; display: block;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--card-hover-shadow); }
.blog-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.blog-card .blog-date { font-size: 0.75rem; color: var(--accent2); margin-bottom: 0.6rem; }
.blog-card p { color: var(--muted); font-size: 0.84rem; line-height: 1.75; font-weight: 400; }
.blog-card .blog-read-more { color: var(--accent); font-size: 0.82rem; font-weight: 500; margin-top: 0.8rem; display: inline-block; }

.blog-article {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 2.5rem; margin-bottom: 2rem;
}
.blog-article h2 {
  font-family: 'Playfair Display', serif; font-size: 1.5rem;
  color: var(--accent); margin-bottom: 0.4rem; text-align: left;
}
.blog-article .blog-date { font-size: 0.78rem; color: var(--accent2); margin-bottom: 1.5rem; }
.blog-article h3 { font-size: 1rem; font-weight: 600; margin: 1.8rem 0 0.6rem; color: var(--text); }
.blog-article p { color: var(--muted); font-size: 0.86rem; line-height: 1.8; font-weight: 400; margin-bottom: 0.8rem; }
.blog-article ul, .blog-article ol { color: var(--muted); font-size: 0.86rem; line-height: 1.8; padding-left: 1.5rem; margin-bottom: 0.8rem; }
.blog-back {
  display: inline-block; color: var(--accent2); font-size: 0.82rem;
  font-weight: 500; cursor: pointer; margin-bottom: 2rem;
  text-decoration: none; transition: color 0.2s;
}
.blog-back:hover { color: var(--accent); }

/* ── GUIDELINES ── */
.guidelines-block {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem 1.8rem; margin-bottom: 2rem;
}
.guidelines-block h3 {
  font-size: 0.95rem; font-weight: 600; color: var(--accent); margin-bottom: 0.8rem;
}
.guidelines-block ul { list-style: none; padding: 0; }
.guidelines-block ul li {
  color: var(--muted); font-size: 0.84rem; line-height: 1.75; font-weight: 400;
  padding: 0.25rem 0; padding-left: 1.2rem; position: relative;
}
.guidelines-block ul li::before {
  content: ''; position: absolute; left: 0; top: 0.7rem;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent2);
}

/* ── PROCESS STEPS ── */
.process-steps {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem; margin-bottom: 2rem;
}
.process-step {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.4rem; text-align: center;
}
.process-step .icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.process-step h4 { font-size: 0.88rem; margin-bottom: 0.4rem; }
.process-step p { font-size: 0.78rem; color: var(--muted); font-weight: 400; line-height: 1.65; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border); padding: 2.5rem 2rem;
  max-width: 1000px; margin: 0 auto;
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.footer-brand .f-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--accent); letter-spacing: 0.1em; }
.footer-brand p { color: var(--muted); font-size: 0.78rem; font-weight: 400; margin-top: 0.4rem; line-height: 1.6; max-width: 280px; }
.footer-links { display: flex; gap: 2.5rem; }
.footer-col h4 { font-size: 0.76rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.footer-col a { display: block; color: var(--text); text-decoration: none; font-size: 0.82rem; font-weight: 400; margin-bottom: 0.4rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; font-size: 0.78rem; color: var(--muted); }

/* ── CATEGORY CARDS (index landing) ── */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem; max-width: 1000px; margin: 0 auto; padding: 3rem 2rem;
}
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.6rem; text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 1rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.cat-card .cat-icon { font-size: 1.8rem; }
.cat-card .cat-name { font-size: 0.95rem; font-weight: 600; }
.cat-card .cat-count { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.cat-card .cat-arrow { margin-left: auto; color: var(--accent2); font-size: 1rem; opacity: 0; transition: opacity 0.2s; }
.cat-card:hover .cat-arrow { opacity: 1; }

/* ── BRANDS PAGE ── */
.brands-section {
  border-top: 1px solid var(--border); padding: 4rem 2rem;
  max-width: 1000px; margin: 0 auto;
}
.brands-section h2 {
  font-family: 'Playfair Display', serif; font-size: 1.8rem;
  text-align: center; margin-bottom: 0.6rem;
}
.brands-section > .sub {
  text-align: center; color: var(--muted); font-size: 0.9rem;
  font-weight: 300; margin-bottom: 2.5rem; line-height: 1.6;
}
.brand-search-wrap {
  max-width: 480px; margin: 0 auto 2rem; position: relative;
}
.brand-search-input {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.85rem 1.2rem 0.85rem 2.8rem;
  color: var(--text); font-size: 0.95rem; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s; outline: none;
}
.brand-search-input:focus { border-color: var(--accent); }
.brand-search-input::placeholder { color: #585858; }
[data-theme="light"] .brand-search-input::placeholder { color: #888888; }
.brand-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.brand-autocomplete {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  max-height: 240px; overflow-y: auto; z-index: 50;
  box-shadow: var(--dropdown-shadow);
}
.brand-autocomplete.show { display: block; }
.brand-autocomplete-item {
  padding: 0.6rem 1.2rem; cursor: pointer; font-size: 0.88rem;
  color: var(--muted); transition: background-color 0.15s, color 0.15s;
}
.brand-autocomplete-item:hover,
.brand-autocomplete-item.active { background: var(--accent-soft); color: var(--text); }
.brand-chips {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin-bottom: 2.5rem;
}
.brand-chip {
  padding: 0.4rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 0.8rem;
  font-weight: 500; cursor: pointer; transition: color 0.2s, border-color 0.2s, background-color 0.2s; white-space: nowrap;
}
.brand-chip:hover { color: var(--text); border-color: #3a3a3a; }
.brand-chip.active { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.brand-result-label {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.brand-result-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem; margin-bottom: 2rem;
}
.brand-empty {
  text-align: center; padding: 3rem 2rem; color: var(--muted);
  font-size: 0.9rem; font-weight: 300; display: none;
}
.brand-empty.show { display: block; }

/* ── HOMEPAGE ENHANCEMENTS ── */

/* Hero — radial gradient glow background */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute;
  width: 600px; height: 600px; top: -200px; left: -100px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: 0.8; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  width: 500px; height: 500px; bottom: -150px; right: -100px;
  background: radial-gradient(circle, var(--accent2-soft) 0%, transparent 70%);
  opacity: 0.6; pointer-events: none;
}

/* Hero title — accent gradient text */
.hero h1 {
  background: linear-gradient(135deg, var(--accent) 0%, var(--text) 40%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero content z-index — above glow pseudo-elements */
.hero-eyebrow, .hero h1, .hero p, .hero-stats, .hero-cta {
  position: relative; z-index: 1;
}

/* Hero eyebrow — decorative gold line above */
.hero-eyebrow::before {
  content: ''; display: block;
  width: 40px; height: 2px;
  background: var(--accent);
  margin: 0 auto 1rem;
}

/* Hero CTA button */
.hero-cta {
  display: inline-flex; margin-top: 2.5rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0a0a; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none; letter-spacing: 0.02em;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(184, 230, 74, 0.3);
  position: relative; z-index: 1;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(184, 230, 74, 0.4);
}

/* Hero stats — dividers + glow */
.hero-stat { position: relative; }
.hero-stat + .hero-stat::before {
  content: ''; position: absolute;
  left: -1.5rem; top: 50%; transform: translateY(-50%);
  width: 1px; height: 32px;
  background: var(--border);
}
.hero-stat .num { text-shadow: 0 0 30px var(--accent-soft); }

/* Category section label */
.category-label {
  text-align: center; padding-top: 3rem; margin-bottom: 0;
  max-width: 1000px; margin-left: auto; margin-right: auto;
}
body[data-page="home"] .category-grid { padding-top: 1rem; }

/* Category card — icon background + gradient hover border */
.cat-card { position: relative; overflow: hidden; }
.cat-card .cat-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: 14px;
  transition: background-color 0.3s, transform 0.3s;
}
.cat-card:hover .cat-icon {
  background: var(--accent);
  transform: scale(1.05);
}
.cat-card::after {
  content: ''; position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.3s;
}
.cat-card:hover::after { opacity: 1; }
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

/* Hero sequential fade-in animations */
.hero-eyebrow { animation: fadeInUp 0.6s ease both; animation-delay: 0.1s; }
.hero h1 { animation: fadeInUp 0.6s ease both; animation-delay: 0.25s; }
.hero p:not(.hero-eyebrow) { animation: fadeInUp 0.6s ease both; animation-delay: 0.4s; }
.hero-stats { animation: fadeInUp 0.6s ease both; animation-delay: 0.55s; }
.hero-cta { animation: fadeInUp 0.6s ease both; animation-delay: 0.7s; }
.cat-card { animation: fadeInUp 0.4s ease both; }

/* Footer gradient divider — homepage only */
body[data-page="home"] footer { border-top: none; position: relative; }
body[data-page="home"] footer::before {
  content: ''; position: absolute;
  top: 0; left: 2rem; right: 2rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
}

/* ── FOCUS STYLES ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search-box input:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible,
.brand-search-input:focus-visible {
  outline: none;
}
.search-box:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── HAMBURGER MENU ── */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text); padding: 0.3rem; flex-shrink: 0;
}
.hamburger svg { width: 22px; height: 22px; display: block; }
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  overscroll-behavior: contain;
}
.mobile-nav.open { display: flex; justify-content: flex-end; }
.mobile-nav-panel {
  width: 260px; background: var(--surface); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  border-left: 1px solid var(--border); height: 100%;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.mobile-nav-close {
  align-self: flex-end; background: none; border: none;
  color: var(--text); cursor: pointer; font-size: 1.5rem; padding: 0.3rem;
}
.mobile-nav-panel a {
  color: var(--text); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; padding: 0.7rem 0.5rem; border-radius: 8px;
  transition: background-color 0.15s;
}
.mobile-nav-panel a:hover { background: var(--accent-soft); }
.mobile-nav-panel a.active { color: var(--accent); }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .search-box { width: 100%; }
  header { flex-wrap: wrap; height: auto; padding: 1rem; gap: 0.8rem; }
  .header-right { width: 100%; }
  .search-box { flex: 1; }
  .hero { padding: 3rem 1.2rem 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .main { padding: 2rem 1.2rem 3rem; }
  .guide-section, .about-section, .submit-section, .comments-section, .blog-section { padding: 3rem 1.2rem; }
  .blog-article { padding: 1.5rem; }
  .footer-top { flex-direction: column; }
  .category-grid { padding: 2rem 1.2rem; }
  .brands-section { padding: 3rem 1.2rem; }
}
