@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #f4f8f2;
  --surface: #ffffff;
  --surface-soft: #eaf2ea;
  --text: #102116;
  --muted: #647469;
  --line: #d9e7da;
  --accent: #18733d;
  --accent-bright: #91da35;
  --accent-ink: #0a2413;
  --shadow: 0 24px 80px rgba(16, 33, 22, 0.13);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1240px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #07110d;
  --surface: #0e1a14;
  --surface-soft: #14231a;
  --text: #f5f7f2;
  --muted: #9ba9a0;
  --line: #25372c;
  --accent: #b4f23d;
  --accent-bright: #c4ff52;
  --accent-ink: #091609;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 999px;
}
.skip-link:focus { top: 16px; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 18px 24px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; font-weight: 800; letter-spacing: -.04em; }
.brand-logo { display: block; width: 236px; height: 76px; object-fit: contain; object-position: left center; transform: translateZ(0); animation: brand-glow 3.8s ease-in-out infinite; }
.brand-logo-dark { display: none; }
.brand-logo-light { display: block; }
:root[data-theme='dark'] .brand-logo-dark { display: block; }
:root[data-theme='dark'] .brand-logo-light { display: none; }
.footer-logo { width: 200px; height: 64px; flex: 0 0 auto; object-fit: contain; object-position: left center; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font: 500 11px/1 'DM Mono', monospace; letter-spacing: -.12em;
}
.brand-name { font-size: 15px; }
.brand-name em { color: var(--accent); font-style: normal; }
.main-nav { display: flex; gap: 28px; align-items: center; font-size: 13px; color: var(--muted); }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.nav-admin { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); }
.mobile-cta { display: none; }
body.gallery-page .main-nav,
body.gallery-page .mobile-cta { display: none; }

@keyframes brand-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(145, 218, 53, 0)); }
  50% { filter: drop-shadow(0 0 11px rgba(145, 218, 53, .62)); }
}

.container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.page-shell { padding: 52px 0 100px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font: 500 11px/1 'DM Mono', monospace; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 42px); line-height: 1.05; letter-spacing: -.065em; }
.section-heading p { max-width: 360px; margin: 0; color: var(--muted); font-size: 14px; }
.text-link { color: var(--accent); font-size: 13px; font-weight: 800; }
.text-link span { display: inline-block; margin-left: 5px; transition: transform .2s ease; }
.text-link:hover span { transform: translate(3px, -3px); }

.hero {
  position: relative; min-height: min(680px, calc(100vh - 100px)); display: flex; align-items: end; overflow: hidden;
  border-radius: var(--radius-lg); background: #15251b var(--hero-image) center/cover no-repeat; isolation: isolate; box-shadow: var(--shadow);
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 13, 9, .91) 0%, rgba(5, 13, 9, .57) 44%, rgba(5, 13, 9, .05) 100%), linear-gradient(0deg, rgba(5, 13, 9, .92), transparent 60%); }
.hero-content { max-width: 730px; padding: clamp(28px, 6vw, 76px); color: #f5f7f2; }
.hero .eyebrow { color: var(--accent-bright); }
.hero h1 { max-width: 720px; margin: 18px 0 18px; font-size: clamp(48px, 8vw, 104px); line-height: .91; letter-spacing: -.09em; }
.hero p { max-width: 520px; margin: 0 0 28px; color: rgba(245,247,242,.75); font-size: clamp(15px, 1.6vw, 18px); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 28px; color: rgba(245,247,242,.7); font: 500 11px/1 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .06em; }
.hero-meta strong { color: var(--accent-bright); font-weight: 500; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); background: var(--accent-bright); }
.button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.button.small { min-height: 36px; padding: 0 13px; font-size: 12px; }

.marquee { display: flex; gap: 14px; overflow: hidden; margin: 22px 0 74px; padding: 14px 0; border-block: 1px solid var(--line); color: var(--muted); font: 500 11px/1 'DM Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.marquee span { white-space: nowrap; }
.marquee b { color: var(--accent); font-weight: 500; }
.event-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.event-card { grid-column: span 4; position: relative; min-width: 0; }
.event-card:nth-child(1) { grid-column: span 6; }
.event-card:nth-child(2) { grid-column: span 6; }
.event-card:nth-child(3), .event-card:nth-child(4) { grid-column: span 3; }
.event-card-media { position: relative; overflow: hidden; aspect-ratio: 1.1 / 1; border-radius: var(--radius-md); background: var(--surface-soft); }
.event-card:nth-child(1) .event-card-media, .event-card:nth-child(2) .event-card-media { aspect-ratio: 1.7 / 1; }
.event-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.event-card:hover .event-card-media img { transform: scale(1.045); }
.event-card-media::after { content: '↗'; position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 900; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.event-card:hover .event-card-media::after { opacity: 1; transform: translateY(0); }
.event-card-body { padding: 14px 4px 8px; }
.event-card-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: 500 10px/1.3 'DM Mono', monospace; letter-spacing: .04em; text-transform: uppercase; }
.event-card h3 { margin: 8px 0 4px; font-size: clamp(19px, 2vw, 28px); line-height: 1; letter-spacing: -.06em; }
.event-card p { margin: 0; color: var(--muted); font-size: 13px; }
.event-card.is-empty { grid-column: 1 / -1; padding: 64px; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); text-align: center; }

.home-section { padding: 78px 0 0; }
.category-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.category-chip:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.manifesto { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; padding: 90px 0; }
.manifesto h2 { max-width: 650px; margin: 0; font-size: clamp(32px, 5vw, 72px); line-height: .95; letter-spacing: -.08em; }
.manifesto h2 span { color: var(--accent); }
.manifesto-copy { padding-top: 10px; color: var(--muted); font-size: 15px; }
.manifesto-copy p { max-width: 420px; }
.manifesto-stats { display: flex; gap: 28px; margin-top: 36px; }
.stat strong { display: block; color: var(--text); font-size: 28px; letter-spacing: -.06em; }
.stat span { display: block; margin-top: 3px; color: var(--muted); font: 500 10px/1.2 'DM Mono', monospace; text-transform: uppercase; }

.listing-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin: 28px 0 34px; }
.search-box { flex: 1 1 280px; position: relative; }
.search-box input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 999px; outline: none; background: var(--surface); color: var(--text); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.search-box::before { content: '⌕'; position: absolute; left: 18px; top: 10px; color: var(--muted); font-size: 21px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; }
.filter-button.active, .filter-button:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.event-detail-header { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: end; margin-bottom: 42px; }
.event-detail-header h1 { max-width: 620px; margin: 16px 0; font-size: clamp(44px, 7vw, 94px); line-height: .9; letter-spacing: -.09em; }
.event-detail-header p { max-width: 480px; margin: 0; color: var(--muted); font-size: 15px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; color: var(--muted); font: 500 11px/1 'DM Mono', monospace; text-transform: uppercase; }
.detail-meta strong { color: var(--accent); font-weight: 500; }
.detail-cover { overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-soft); }
.detail-cover img { width: 100%; max-height: 560px; object-fit: cover; }
.gallery-grid { columns: 3 240px; column-gap: 12px; }
.gallery-item { position: relative; break-inside: avoid; margin-bottom: 12px; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--surface-soft); }
.gallery-item img { width: 100%; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.035); }
.gallery-item::after { content: '+'; position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(7,17,13,.72); color: #fff; opacity: 0; transition: opacity .2s ease; }
.gallery-item:hover::after { opacity: 1; }
.gallery-empty { padding: 60px 0; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--accent); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-grid h1 { margin: 18px 0 24px; font-size: clamp(48px, 8vw, 104px); line-height: .88; letter-spacing: -.09em; }
.about-copy { color: var(--muted); font-size: 16px; }
.about-copy p { max-width: 560px; }
.about-card { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.about-card h3 { margin: 0 0 18px; font-size: 22px; letter-spacing: -.06em; }
.about-card ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.about-card li { display: grid; grid-template-columns: 24px 1fr; gap: 9px; color: var(--muted); font-size: 14px; }
.about-card li::before { content: '↗'; color: var(--accent); font-weight: 900; }

.lightbox { position: fixed; inset: 0; z-index: 40; display: none; place-items: center; padding: 32px; background: rgba(2, 8, 5, .93); }
.lightbox.open { display: grid; }
.lightbox-figure { max-width: min(1000px, 86vw); max-height: 90vh; margin: 0; }
.lightbox-figure img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; }
.lightbox-figure figcaption { margin-top: 12px; color: rgba(255,255,255,.7); font: 500 11px/1.4 'DM Mono', monospace; text-align: center; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; border: 0; background: transparent; color: #fff; }
.lightbox-close { top: 18px; right: 24px; font-size: 34px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 56px; padding: 20px; opacity: .75; }
.lightbox-prev { left: 12px; } .lightbox-next { right: 12px; }

.site-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; max-width: var(--max); margin: 0 auto; padding: 32px 24px 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.footer-brand p { margin: 0; }
.footer-links { display: flex; justify-content: center; gap: 18px; }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin: 0; text-align: right; }

.skeleton { animation: pulse 1.5s ease-in-out infinite; background: var(--surface-soft); border-radius: var(--radius-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes pulse { 50% { opacity: .55; } }
.error-state { padding: 60px 0; color: var(--muted); }

.my-photos-page { min-height: 78vh; }
.my-photos-intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.my-photos-intro h1 { margin: 16px 0 0; font-size: clamp(52px, 9vw, 112px); line-height: .86; letter-spacing: -.1em; }
.my-photos-intro h1 span, .my-photos-auth-card h2 span, .photo-match-results-heading h2 span, .photo-match-empty h2 span { color: var(--accent); }
.my-photos-intro > p { max-width: 290px; margin: 0 0 5px; color: var(--muted); font-size: 14px; }
.my-photos-auth-card, .my-photos-workspace { max-width: 820px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.my-photos-auth-card { padding: 28px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 42px; }
.auth-tab { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; }
.auth-tab.active, .auth-tab:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.auth-copy h2 { margin: 14px 0 12px; font-size: clamp(38px, 6vw, 72px); line-height: .9; letter-spacing: -.08em; }
.auth-copy p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; }
.photo-auth-form { display: grid; gap: 12px; max-width: 390px; margin-top: 30px; }
.photo-auth-form label, .photo-search-form label { color: var(--muted); font: 500 10px/1.2 'DM Mono', monospace; letter-spacing: .04em; text-transform: uppercase; }
.photo-auth-form input { display: block; width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--bg); color: var(--text); font: 500 13px/1.4 'Manrope', sans-serif; text-transform: none; letter-spacing: normal; }
.photo-auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.form-feedback { min-height: 18px; margin: 3px 0 0; color: var(--accent); font-size: 12px; }
.my-photos-workspace { overflow: hidden; }
.my-photos-account { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.my-photos-account strong, .my-photos-account small { display: block; }
.my-photos-account strong { font-size: 14px; }
.my-photos-account small { margin-top: 3px; color: var(--muted); font: 500 10px/1.2 'DM Mono', monospace; letter-spacing: .04em; text-transform: uppercase; }
.photo-search-form { padding: 24px; }
.photo-dropzone { position: relative; display: grid; place-items: center; min-height: 330px; overflow: hidden; padding: 36px; border: 1px dashed var(--accent); border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); text-align: center; cursor: pointer; }
.photo-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-dropzone:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 4px; }
.photo-drop-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 28px; line-height: 1; }
.photo-dropzone strong, .photo-dropzone small { position: relative; z-index: 1; }
.photo-dropzone strong { font: 800 20px/1.1 'Manrope', sans-serif; letter-spacing: -.05em; text-transform: none; }
.photo-dropzone small { margin-top: 7px; color: var(--muted); font: 500 10px/1.2 'DM Mono', monospace; text-transform: uppercase; }
.photo-dropzone img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: saturate(.75); }
.photo-search-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; }
.photo-search-actions p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.photo-search-actions .button:disabled { opacity: .5; cursor: wait; }
.photo-search-results { padding: 0 24px 28px; }
.photo-match-empty { padding: 50px 0 18px; color: var(--muted); }
.photo-match-empty h2 { max-width: 590px; margin: 16px 0 12px; color: var(--text); font-size: clamp(34px, 5vw, 62px); line-height: .9; letter-spacing: -.08em; }
.photo-match-empty p { max-width: 470px; margin: 0; font-size: 14px; }
.photo-match-empty.is-start { padding-top: 32px; }
.photo-match-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 22px 0 22px; }
.photo-match-results-heading h2 { margin: 14px 0 0; font-size: clamp(34px, 5vw, 62px); line-height: .9; letter-spacing: -.08em; }
.photo-match-results-heading p { max-width: 190px; margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.photo-match-list { display: grid; gap: 14px; }
.photo-match-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.photo-match-card-link { display: grid; grid-template-columns: minmax(190px, 32%) 1fr; gap: 20px; align-items: center; padding: 10px; }
.photo-match-mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1.55 / 1; overflow: hidden; gap: 2px; border-radius: 11px; background: var(--surface-soft); }
.photo-match-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.photo-match-card-body { padding: 8px 12px 8px 0; }
.photo-match-card-body h3 { margin: 12px 0 7px; font-size: clamp(24px, 3vw, 38px); line-height: .95; letter-spacing: -.07em; }
.photo-match-card-body p { margin: 0; color: var(--muted); font-size: 12px; }
.photo-match-card-body p span { color: var(--accent); font-size: 18px; }
.my-photos-privacy { display: flex; gap: 12px; align-items: baseline; max-width: 820px; margin-top: 18px; padding: 16px 0; color: var(--muted); font-size: 12px; }
.my-photos-privacy strong { flex: 0 0 auto; color: var(--accent); font: 500 10px/1 'DM Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 800px) {
  .site-header { padding: 14px 18px; }
  .brand-logo { width: 204px; height: 66px; }
  .main-nav { display: none; }
  .mobile-cta { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
  .container { width: min(var(--max), calc(100% - 32px)); }
  .page-shell { padding-top: 26px; }
  .hero { min-height: 580px; border-radius: 22px; }
  .hero-content { padding: 28px; }
  .hero h1 { font-size: clamp(48px, 16vw, 86px); }
  .event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .event-card, .event-card:nth-child(1), .event-card:nth-child(2), .event-card:nth-child(3), .event-card:nth-child(4) { grid-column: span 1; }
  .event-card:nth-child(1), .event-card:nth-child(2) { grid-column: span 2; }
  .event-card:nth-child(1) .event-card-media, .event-card:nth-child(2) .event-card-media { aspect-ratio: 1.35 / 1; }
  .manifesto, .about-grid, .event-detail-header { grid-template-columns: 1fr; gap: 24px; }
  .my-photos-intro { display: block; margin-bottom: 30px; }
  .my-photos-intro > p { margin-top: 18px; }
  .my-photos-auth-card { padding: 20px; }
  .auth-tabs { flex-wrap: wrap; margin-bottom: 30px; }
  .photo-search-form, .photo-search-results { padding-inline: 16px; }
  .photo-search-actions, .photo-match-results-heading { display: block; }
  .photo-search-actions .button { margin-top: 18px; }
  .photo-match-results-heading p { margin-top: 12px; }
  .photo-match-card-link { grid-template-columns: 1fr; gap: 12px; }
  .photo-match-card-body { padding: 0 7px 10px; }
  .my-photos-privacy { display: block; }
  .my-photos-privacy span { display: block; margin-top: 7px; }
  .manifesto { padding: 62px 0 20px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
  .section-heading .text-link { display: inline-block; margin-top: 16px; }
  .site-footer { grid-template-columns: 1fr; padding-inline: 18px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; }
  .footer-note { text-align: left; }
  .lightbox { padding: 16px; }
  .lightbox-prev, .lightbox-next { font-size: 36px; padding: 10px; }
}

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

/* Alternador de tema dia/noite — baseado em https://codepen.io/lgmus/pen/gOBoZyd (MIT).
   O widget inteiro é dimensionado em em, então --daynight-scale é a única escala:
   no original vale 10px (25em x 10em = 250x100). Aqui está em um terço disso. */
.daynight {
  --daynight-scale: 3.3333px;
  --day: #397ab0;
  --night: #1c202c;
  --sun: #f2c426;
  --moon: #c5c8cf;
  --cloud-front: #fff;
  --cloud-back: #a5c5dc;
  --star: #fff;
  --duration: 1s;
  --easing: cubic-bezier(0.65, 0, 0.34, 1.17);
  --easing-clouds: cubic-bezier(0.65, 0, 0.35, 1);
  -webkit-tap-highlight-color: transparent;
  font-size: var(--daynight-scale);
  display: block;
  flex: 0 0 auto;
  position: relative;
  cursor: pointer;
  width: 25em;
  height: 10em;
  border-radius: 5em;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 -0.3em 0.2em 0.1em rgba(0, 0, 0, 0.2), 0 0.3em 0.2em 0.1em #fffeff;
}
/* O original zera o outline do checkbox; sem isto o alvo some para quem navega por teclado. */
.daynight:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.daynight__checkbox {
  appearance: none;
  pointer-events: none;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  background: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  box-shadow: inset 0 0.5em 0.5em 0 rgba(0, 0, 0, 0.5), inset 0 -0.5em 1em 0 rgba(0, 0, 0, 0.3);
  z-index: 2;
}
.daynight__sky {
  display: block;
  width: 100%;
  height: 100%;
  padding: 1em;
  box-sizing: border-box;
  background-color: var(--day);
  transition: background var(--duration) var(--easing);
  isolation: isolate;
}
.daynight__sky::before, .daynight__sky::after {
  content: "";
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  width: 9em;
  height: 9em;
  left: 30.7em;
  top: 1.4em;
  transition: var(--duration) var(--easing);
  box-shadow: -10em 0 0 0 var(--cloud-front), -12.7em 2.5em 0 -1em var(--cloud-front), -16.5em 5.8em 0 0 var(--cloud-front), -20em 5.7em 0 -1em var(--cloud-front), -23.5em 5em 0 -1.2em var(--cloud-front), -28em 5.5em 0 -1em var(--cloud-front), -31em 7.5em 0 0 var(--cloud-front), 9em 1em 0 0 var(--cloud-front);
  animation: daynight-clouds 10s infinite var(--easing-clouds);
}
.daynight__sky::before {
  z-index: -1;
  box-shadow: -10.5em -2.2em 0 0 var(--cloud-back), -15em 0em 0 -2em var(--cloud-back), -17.5em 1.8em 0 -1em var(--cloud-back), -20.5em 4.6em 0 0 var(--cloud-back), -24.5em 4.2em 0 0 var(--cloud-back), -28.5em 5.8em 0 0 var(--cloud-back), -31.5em 6.5em 0 0 var(--cloud-back);
  animation-delay: -5s;
  animation-duration: 8s;
}
.daynight__checkbox:checked ~ .daynight__sky { background-color: var(--night); }
.daynight__checkbox:checked ~ .daynight__sky::before { transform: translateY(13em); opacity: 0; }
.daynight__checkbox:checked ~ .daynight__sky::after { transform: translateY(10em); opacity: 0; }
.daynight__stars, .daynight__morestars { transition: var(--duration) var(--easing); }
.daynight__stars::before, .daynight__stars::after, .daynight__morestars::before, .daynight__morestars::after {
  content: "✦";
  position: absolute;
  font-size: 1.35em;
  color: var(--star);
  opacity: 0;
  transform: translateY(-15em);
  transition: var(--duration) var(--easing);
  animation: daynight-stars var(--stars-duration, 7s) var(--stars-delay, 0s) infinite;
}
.daynight__checkbox:checked ~ * .daynight__stars, .daynight__checkbox:checked ~ * .daynight__morestars { opacity: 1; }
.daynight__checkbox:checked ~ * .daynight__stars::before,
.daynight__checkbox:checked ~ * .daynight__stars::after,
.daynight__checkbox:checked ~ * .daynight__morestars::before,
.daynight__checkbox:checked ~ * .daynight__morestars::after { transform: translateY(0); }
.daynight__stars::before { left: 3.8em; top: 0.8em; text-shadow: 6.1em 1.1em; }
.daynight__stars::after { font-size: 1em; left: 11em; top: 6.8em; --stars-duration: 9.1s; --stars-delay: -2.8s; }
.daynight__morestars::before { font-size: 0.6em; left: 4.9em; top: 5.2em; text-shadow: 4.5em 1.9em, 13.1em -0.8em, 16.8em 4.4em, 4.5em 8.7em; --stars-duration: 5.6s; --stars-delay: -7s; }
.daynight__morestars::after { font-size: 0.4em; left: 8em; top: 19.6em; text-shadow: 1.5em -2.1em, 16.7em -7.1em; --stars-duration: 11.2s; --stars-delay: -1.4s; }
.daynight__sunmoon, .daynight__sunmoon::before {
  content: "";
  overflow: hidden;
  display: block;
  position: relative;
  width: 8em;
  height: 8em;
  border-radius: 50%;
  transition: transform var(--duration) var(--easing);
  background-color: var(--sun);
  box-shadow: 0.4em 0.4em 0.5em 0.1em rgba(0, 0, 0, 0.3), inset -0.2em -0.2em 0.5em 0 rgba(0, 0, 0, 0.4), inset 0.2em 0.2em 0.5em 0 #fffeff, 0 0 0 10em rgba(255, 255, 255, 0.07), 0 0 0 6.5em rgba(255, 255, 255, 0.07), 0 0 0 3em rgba(255, 255, 255, 0.07);
}
.daynight__sunmoon::before {
  box-shadow: 0.4em 0.4em 0.5em 0.1em rgba(0, 0, 0, 0.3), inset -0.2em -0.2em 0.5em 0 rgba(0, 0, 0, 0.4), inset 0.2em 0.2em 0.5em 0 #fffeff;
  background: radial-gradient(circle, #969db0 1.1em, #798090 1.3em, rgba(129, 136, 153, 0) 1.4em), radial-gradient(circle, #969db0 0.5em, #798090 0.7em, rgba(129, 136, 153, 0) 0.8em), radial-gradient(circle, #969db0 0.5em, #798090 0.7em, rgba(129, 136, 153, 0) 0.8em);
  background-position: -1.2em 0.7em, 0em -2em, 2em 1.4em;
  background-color: var(--moon);
  transform: translateX(105%) rotate(50deg);
  animation: daynight-moon 25s infinite linear;
}
.daynight__checkbox:checked ~ * .daynight__sunmoon { transform: translateX(15em); }
.daynight__checkbox:checked ~ * .daynight__sunmoon::before { transform: translateX(0) rotate(0); }

@keyframes daynight-stars { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
@keyframes daynight-clouds { 0% { scale: 1; } 50% { scale: 1.05; } 100% { scale: 1; } }
@keyframes daynight-moon { to { background-position: 6.8em 0.7em, 8em -2em, 10em 1.4em; } }

@media (prefers-reduced-motion: reduce) {
  .daynight, .daynight *, .daynight *::before, .daynight *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
