/* Photography Gear Guide — main stylesheet */
:root {
  --bg: #0d0e10;
  --bg-2: #14161a;
  --bg-3: #1b1e23;
  --line: #2a2e35;
  --text: #e8e6e1;
  --text-2: #a9adb5;
  --text-3: #7b808a;
  --accent: #f5a524;
  --accent-2: #ffc766;
  --accent-ink: #1a1204;
  --good: #5cc98a;
  --warn: #f07a5a;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --readw: 760px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; color: #fff; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.25rem; margin: 1.8em 0 .5em; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
strong { color: #fff; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 16, .88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo span em { font-style: normal; color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.main-nav li { margin: 0; position: relative; }
.main-nav a, .main-nav .nav-drop-btn {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2);
  text-decoration: none; font-size: .94rem; font-weight: 500; background: none; border: 0; font-family: inherit; cursor: pointer; line-height: 1.5;
}
.main-nav a:hover, .main-nav .nav-drop-btn:hover { color: #fff; background: var(--bg-3); }
.main-nav a[aria-current="page"], .main-nav .is-active > .nav-drop-btn { color: var(--accent); }
.nav-drop-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-left: 8px; vertical-align: 3px; }
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow); display: none !important; flex-direction: column; align-items: stretch !important;
}
.has-sub:hover .submenu, .has-sub.open .submenu, .has-sub:focus-within .submenu { display: flex !important; }
.submenu a { padding: 9px 12px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: fixed; inset: 68px 0 0 0; background: var(--bg); padding: 16px; overflow-y: auto; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a, .main-nav .nav-drop-btn { font-size: 1.05rem; padding: 12px 14px; width: 100%; text-align: left; }
  .submenu { position: static; display: flex !important; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; }
  .nav-drop-btn::after { display: none; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: .98rem; border: 1px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: #fff; background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--text-3); color: #fff; }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,14,16,.96) 0%, rgba(13,14,16,.82) 40%, rgba(13,14,16,.25) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero-inner { position: relative; padding: 110px 0 100px; max-width: 640px; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.hero p.lead { font-size: 1.18rem; color: var(--text-2); margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 720px) {
  .hero-inner { padding: 72px 0 64px; }
  .hero-media::after { background: linear-gradient(0deg, rgba(13,14,16,.97) 20%, rgba(13,14,16,.7) 100%); }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--text-2); }

.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: #4a4f58; transform: translateY(-3px); color: var(--text); }
.card-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-3); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-tag { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.card h3 { margin: 8px 0 8px; font-size: 1.22rem; }
.card p { color: var(--text-2); font-size: .96rem; margin: 0 0 14px; }
.card .more { margin-top: auto; color: var(--accent-2); font-weight: 600; font-size: .92rem; }

.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--accent); display: block; margin-bottom: 6px; }
.step h3 { margin: 0 0 6px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* ---------- Page hero (articles) ---------- */
.page-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero .hero-media::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(13,14,16,.78) 45%, rgba(13,14,16,.55) 100%); }
.page-hero-inner { position: relative; padding: 64px 0 48px; max-width: 820px; }
.page-hero .lead { font-size: 1.14rem; color: var(--text-2); margin: 0; }
.page-hero.no-img { background: var(--bg-2); }

.breadcrumb { font-size: .86rem; color: var(--text-3); margin-bottom: 18px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--text-3); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.meta { font-size: .88rem; color: var(--text-3); margin-top: 16px; }

/* ---------- Article layout ---------- */
.article-wrap { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); padding: 48px 0 80px; }
@media (min-width: 1080px) { .article-wrap { grid-template-columns: minmax(0, var(--readw)) 280px; justify-content: space-between; } }
.article { min-width: 0; }
.article > h2:first-child { margin-top: 0; }
.article img.inline { border-radius: var(--radius); border: 1px solid var(--line); margin: 1.6em 0 .6em; }
.article figure { margin: 1.8em 0; }
.article figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.article figcaption { font-size: .86rem; color: var(--text-3); margin-top: 8px; }

.toc { position: sticky; top: 92px; align-self: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; font-size: .92rem; }
.toc-title { font-family: var(--font-display); font-weight: 700; color: #fff; margin: 0 0 10px; font-size: .98rem; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: 6px; color: var(--text-3); }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--accent); }
@media (max-width: 1079px) {
  .toc { position: static; order: -1; }
  .toc details summary { cursor: pointer; }
}

/* Callouts */
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--bg-2); border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.6em 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { font-family: var(--font-display); font-weight: 700; color: #fff; display: block; margin-bottom: 4px; }
.callout.tip { border-left-color: var(--good); }
.callout.warn { border-left-color: var(--warn); }

.keypoints { background: linear-gradient(135deg, rgba(245,165,36,.10), rgba(245,165,36,.02)); border: 1px solid rgba(245,165,36,.35); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 2em; }
.keypoints h2 { margin: 0 0 10px; font-size: 1.15rem; }
.keypoints ul { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-3); color: #fff; font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.015); }

/* Info grid (lens types, brands) */
.info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 1.6em 0; }
.info-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.info-box h3, .info-box h4 { margin: 0 0 6px; font-size: 1.06rem; }
.info-box p { margin: 0; color: var(--text-2); font-size: .94rem; }
.info-box .pill { margin-bottom: 8px; }

.pill { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(245,165,36,.14); color: var(--accent-2); }
.pill.grey { background: var(--bg-3); color: var(--text-2); }

.proscons { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.2em 0 1.6em; }
.proscons > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }
.proscons h4 { margin: 0 0 6px; font-size: .95rem; }
.proscons .pros h4 { color: var(--good); }
.proscons .cons h4 { color: var(--warn); }
.proscons ul { margin: 0; font-size: .94rem; }

/* Brand card */
.brand { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 24px; margin: 1.4em 0; }
.brand h3 { margin: 0 0 4px; font-size: 1.35rem; }
.brand .brand-meta { font-size: .88rem; color: var(--text-3); margin-bottom: 12px; }
.brand p:last-child { margin-bottom: 0; }
.brand dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 12px 0 0; font-size: .94rem; }
.brand dt { color: var(--text-3); }
.brand dd { margin: 0; }
@media (max-width: 520px) { .brand dl { grid-template-columns: 1fr; } .brand dt { margin-top: 6px; } }

/* Events */
.month-block { margin: 2em 0; }
.event { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 20px 22px; margin: 14px 0; }
.event h3 { margin: 0 0 4px; font-size: 1.18rem; }
.event .event-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.event p { margin: 0; color: var(--text-2); font-size: .96rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0 1.6em; }
.filter-btn { background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer; }
.filter-btn:hover { color: #fff; }
.filter-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* Glossary */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.6em; }
.az a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 600; }
.az a:hover { border-color: var(--accent); color: var(--accent); }
.glossary-search { width: 100%; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: #fff; font: inherit; margin-bottom: 16px; }
.glossary-search:focus { outline: none; border-color: var(--accent); }
dl.glossary dt { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.08rem; margin-top: 1.2em; }
dl.glossary dd { margin: 4px 0 0; color: var(--text-2); }
.letter-head { font-size: 1.6rem; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); margin: 10px 0; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: #fff; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; color: var(--text-2); }
.faq details > div p:last-child { margin: 0; }

/* Exposure calculator */
.tool { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 1.8em 0; }
.tool h3 { margin-top: 0; }
.tool-row { display: grid; grid-template-columns: 110px 1fr 80px; gap: 12px; align-items: center; margin: 12px 0; }
.tool-row label { color: var(--text-2); font-size: .94rem; }
.tool-row output { font-family: var(--font-display); font-weight: 700; color: #fff; text-align: right; }
.tool input[type="range"] { width: 100%; accent-color: var(--accent); }
.tool-result { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); font-size: .95rem; color: var(--text-2); }
.tool-result strong { color: var(--accent-2); }
@media (max-width: 520px) { .tool-row { grid-template-columns: 1fr 70px; } .tool-row label { grid-column: 1 / -1; margin-bottom: -8px; } }

/* Related */
.related { border-top: 1px solid var(--line); padding: 56px 0 72px; }
.related h2 { margin-top: 0; }

/* Plain pages (legal, about) */
.prose { max-width: var(--readw); padding: 48px 0 80px; }
.prose h2 { font-size: 1.4rem; }

.contact-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 1.4em 0; }

/* ---------- Footer ---------- */
.site-footer { background: #090a0b; border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: .94rem; color: var(--text-2); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.site-footer h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-about p { margin: 12px 0 0; max-width: 360px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--text-3); }

/* Back to top */
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s ease; cursor: pointer; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* 404 */
.notfound { text-align: center; padding: 120px 0; }
.notfound .big { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 9rem); color: var(--accent); line-height: 1; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Utilities */
[hidden] { display: none !important; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .9em; background: var(--bg-3); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; color: var(--accent-2); word-break: break-word; }
.event h4 { margin: 0 0 8px; font-size: 1.15rem; }
.event h4 a { color: #fff; text-decoration: none; }
.event h4 a:hover { color: var(--accent); }
.month-block > h3 { color: var(--accent); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
