/*
  Design decisions
  - Near-black neutrals make the desktop-tool content feel precise and keep the blue accent intentional.
  - Outfit stays as the product typeface because its rounded forms soften a dense, technical interface without imitating a terminal.
  - Blue marks primary download actions and tints the supplied VRChat hero photo to connect the setting to the product accent.
  - Thin rules, square-leaning panels, and restrained radius create structure without shadows, blur, or haze.
  - The hero photo is grayscaled before a dark blue overlay fades into black near the bottom; separate layers preserve foreground contrast and color.
  - Each background follows a curved pan with a restrained zoom; a short accelerating turn carries it into the next crossfade while the foreground stays still.
  - Two decoded photo layers crossfade above one another so background changes do not flash black or affect the foreground.
  - The compact donation notice uses a short slide to attract attention without blocking the page; its neutral link keeps support secondary.
  - Menus unfold and collapse to show where navigation comes from; copy feedback fades in to confirm the action.
  - Process cards enter in task order; a small hover lift and blue border emphasize the card being read.
  - Static 1px charcoal frames separate app screenshots from the dark page without glow or color cycling.
  - Wider screenshot columns and 6px corners show more of the desktop UI; the expand icon and gentle zoom signal a fullscreen image viewer.
  - The compact download dialog keeps OS and build selection together, with a detected default that users can override.
*/
:root {
  --bg: #080808;
  --surface: #101010;
  --surface-raised: #171717;
  --surface-hover: #1d1d1d;
  --line: #292929;
  --line-strong: #3b3b3b;
  --text: #f5f5f5;
  --text-soft: #a1a1aa;
  --text-muted: #94949d;
  --blue: #2997ff;
  --blue-deep: #1769d2;
  --accent: var(--blue);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --motion-curve: cubic-bezier(0.25, 0.1, 0.25, 1);
  --motion-enter: 360ms;
  --motion-ui: 180ms;
  --motion-exit: 180ms;
  --ease: 140ms var(--motion-curve);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
body.is-preview-open { overflow: hidden; }
body.is-download-open { overflow: hidden; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.container { width: min(100% - 48px, 1160px); margin: 0 auto; }

/* The splash screen establishes a clean handoff while the page assets finish loading. */
.page-loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); opacity: 1; visibility: visible; transition: opacity 300ms var(--motion-curve), visibility 0s 300ms; }
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: grid; width: min(180px, 42vw); justify-items: center; gap: 20px; }
.loader-content img { border-radius: 14px; animation: loader-logo 700ms var(--motion-curve) both; }
.loader-bar { width: 100%; height: 3px; overflow: hidden; border-radius: 999px; background: var(--line-strong); }
.loader-bar span { display: block; width: 100%; height: 100%; transform-origin: left; background-color: var(--blue-deep); background-image: linear-gradient(90deg, var(--blue), var(--blue-deep)); animation: loader-progress 850ms var(--motion-curve) both; }
@keyframes loader-logo {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes loader-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.donation-notification { position: fixed; right: 24px; bottom: 24px; z-index: 90; width: min(300px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); animation: donation-slide-in 280ms var(--motion-curve) both; }
.donation-notification[hidden] { display: none; }
.donation-notification h2 { padding-right: 36px; color: var(--text); font-size: 0.95rem; line-height: 1.4; }
.donation-notification p { margin-top: 6px; color: var(--text-soft); font-size: 0.82rem; line-height: 1.5; }
.donation-notification-close { position: absolute; top: 3px; right: 3px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-soft); cursor: pointer; font: inherit; transition: background var(--ease), color var(--ease); }
.donation-notification-close:hover { background: var(--surface-hover); color: var(--text); }
.donation-notification-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 2px; color: var(--text); font-size: 0.82rem; font-weight: 600; text-underline-offset: 4px; transition: color var(--ease); }
.donation-notification-link:hover { color: var(--blue); }
body:has(#back-to-top) .donation-notification { bottom: 80px; max-height: calc(100dvh - 96px); }
@keyframes donation-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* The section rule is the site motif: it marks a change in task without turning blue into a background color. */
.section-rule { width: 100%; height: 1px; background: var(--line); }
.reveal { opacity: 1; transform: none; }
.motion-ready .reveal { opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity var(--motion-enter) var(--motion-curve), transform var(--motion-enter) var(--motion-curve); transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms); }
.motion-ready .reveal.visible { opacity: 1; transform: translateY(0); }

/* Navigation */
#navbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(8, 8, 8, 0.96); animation: nav-arrive 500ms var(--motion-curve) both; }
.nav-inner { display: flex; height: 68px; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1rem; font-weight: 700; letter-spacing: -0.025em; text-decoration: none; }
.nav-logo img { border-radius: 8px !important; }
.nav-links { position: relative; display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a, #mobile-menu a { border-radius: var(--radius-xs); color: var(--text-soft); font-size: 0.87rem; font-weight: 500; text-decoration: none; transition: color var(--ease), background var(--ease); }
.nav-links a { padding: 8px 11px; }
.nav-links a:hover, #mobile-menu a:hover { background: var(--surface-hover); color: var(--text); }
.nav-links .nav-cta { margin-left: 8px; padding: 9px 15px; border: 1px solid transparent; background-color: var(--blue-deep); background-image: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: white; font-weight: 650; }
.nav-links .nav-cta:hover { background-color: #1d75e3; background-image: linear-gradient(135deg, #46a7ff, #1d75e3); color: white; }
/* The active marker sits below the label, leaving a deliberate breathing gap. */
.nav-indicator { position: absolute; bottom: -8px; left: 0; height: 2px; width: 1px; transform-origin: left; border-radius: 999px; background: var(--blue); opacity: 0; pointer-events: none; transition: transform 200ms var(--motion-curve), opacity var(--ease); }
.nav-indicator.is-visible { opacity: 1; }
#nav-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; }
#nav-toggle:hover { border-color: var(--text-muted); }
#mobile-menu { display: grid; grid-template-rows: 0fr; padding: 0 24px; background: var(--bg); opacity: 0; visibility: hidden; transition: grid-template-rows 240ms var(--motion-curve), padding 240ms var(--motion-curve), opacity var(--motion-ui) var(--motion-curve), visibility 0s 240ms; }
#mobile-menu.open { grid-template-rows: 1fr; padding-top: 12px; padding-bottom: 18px; opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu-links { display: flex; min-height: 0; flex-direction: column; gap: 4px; overflow: hidden; }
#mobile-menu a { padding: 11px 12px; }

/* Hero */
#home { position: relative; isolation: isolate; padding: clamp(72px, 11vw, 136px) 0 clamp(72px, 9vw, 112px); overflow: hidden; background: var(--bg); }
#home::after { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ''; }
.hero-background { position: absolute; inset: -96px; z-index: -2; overflow: hidden; pointer-events: none; }
.hero-background-slide { position: absolute; inset: 0; opacity: 0; transform: translate3d(0, 0, 0); backface-visibility: hidden; transition: opacity 1400ms linear; }
.hero-background img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; image-rendering: auto; filter: grayscale(1) brightness(0.55); }
.hero-background-slide.is-active { opacity: 1; }
.hero-background-slide.is-sliding { will-change: transform, opacity; }
#home::after { background: linear-gradient(to bottom, rgba(8, 28, 49, 0.88) 0%, rgba(8, 28, 49, 0.88) 58%, rgba(8, 16, 24, 0.94) 82%, var(--bg) 100%); }
#home > .container, #about > .container { width: min(100% - 48px, 1320px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
.hero-grid > :first-child { animation: hero-copy-arrive 580ms 80ms var(--motion-curve) both; }
.hero-eyebrow, .section-label { color: var(--blue); font-size: 0.76rem; font-weight: 650; letter-spacing: 0.03em; margin-bottom: 16px; }
.hero-eyebrow { display: flex; align-items: center; gap: 9px; }
.hero-eyebrow::before { width: 18px; height: 1px; background: var(--blue); content: ''; }
h1.hero-title { max-width: 660px; font-size: clamp(3rem, 6vw, 5.25rem); font-weight: 700; letter-spacing: -0.065em; line-height: 0.96; }
.accent-word { color: var(--blue); }
.hero-rule { width: 48px; height: 1px; margin: 30px 0 24px; background: var(--line-strong); }
.hero-desc { max-width: 540px; color: var(--text-soft); font-size: 1.05rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn-primary, .btn-secondary, .dl-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.92rem; font-weight: 650; text-decoration: none; transition: transform var(--ease), border-color var(--ease), background var(--ease); }
.btn-primary, .dl-btn { border: 1px solid transparent; background-color: var(--blue-deep); background-image: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: white; padding: 0 20px; }
.btn-primary:hover, .dl-btn:hover { background-color: #1d75e3; background-image: linear-gradient(135deg, #46a7ff, #1d75e3); transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 0 20px; }
.btn-secondary:hover { border-color: var(--text-muted); background: var(--surface-hover); }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; margin-top: 42px; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: color var(--ease); }
.scroll-cue:hover { color: var(--text); }
.scroll-cue i { color: var(--blue); animation: scroll-cue-bob 1.2s ease-in-out infinite; }
.hero-img-wrap { min-width: 0; }
.hero-img-float { perspective: 1200px; animation: hero-float 4s ease-in-out infinite; }
.hero-img-inner { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transform: rotateX(var(--preview-tilt-x, 0deg)) rotateY(var(--preview-tilt-y, 0deg)); transform-style: preserve-3d; will-change: transform; transition: transform 240ms var(--motion-curve); }
.hero-img-inner.is-tilting { transition: none; }
.hero-img-inner img { display: block; width: 100%; height: auto; filter: saturate(0.88) contrast(1.04); }

/* One slow movement gives the preview presence without competing with the download action. */
@keyframes hero-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}
@keyframes scroll-cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@keyframes nav-arrive {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-copy-arrive {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Shared section treatment */
section { padding: clamp(72px, 9vw, 112px) 0; }
.section-title { max-width: 690px; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1.02; }
.section-sub { max-width: 560px; margin-top: 18px; color: var(--text-soft); font-size: 1rem; line-height: 1.7; }

/* About */
#about { background: var(--surface); }
.about-grid { display: grid; grid-template-columns: minmax(320px, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: clamp(32px, 4vw, 56px); }
.about-img-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.about-img-wrap img { display: block; width: 100%; height: auto; filter: saturate(0.85) contrast(1.04); }
.preview-trigger { position: relative; display: block; overflow: hidden; color: var(--text); cursor: zoom-in; }
.preview-trigger:focus-visible { outline-offset: -4px; }
.preview-trigger img { transition: transform 280ms var(--motion-curve); }
.preview-trigger::after { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; content: ''; transition: opacity var(--motion-ui) var(--motion-curve); }
.preview-open-icon { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 1.3rem; opacity: 0; transform: translate(-50%, -40%) scale(0.85); pointer-events: none; transition: opacity var(--motion-ui) var(--motion-curve), transform 240ms var(--motion-curve); }
.preview-trigger:focus-visible::after { opacity: 1; }
.preview-trigger:focus-visible .preview-open-icon { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: hover) and (pointer: fine) {
  .preview-trigger:hover img { transform: scale(1.025); }
  .preview-trigger:hover::after { opacity: 1; }
  .preview-trigger:hover .preview-open-icon { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.preview-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 80px 24px 24px; border: 0; background: rgba(8, 8, 8, 0.97); color: var(--text); }
.preview-viewer[open] { display: grid; place-items: center; animation: preview-viewer-in 200ms var(--motion-curve) both; }
.preview-viewer::backdrop { background: transparent; }
.preview-viewer-header { position: absolute; top: 16px; left: 24px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preview-viewer-header h2 { font-size: 1rem; font-weight: 600; }
.preview-viewer-close { flex-shrink: 0; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.25rem; transition: background var(--ease), border-color var(--ease); }
.preview-viewer-close:hover { background: var(--surface-hover); border-color: var(--blue); }
.preview-viewer-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 104px); object-fit: contain; border: 1px solid var(--line); border-radius: 6px; animation: preview-image-in 240ms var(--motion-curve) both; }
.preview-viewer.is-closing { animation: preview-viewer-out var(--motion-exit) var(--motion-curve) both; }
@keyframes preview-viewer-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes preview-viewer-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes preview-image-in { from { transform: scale(0.96); } to { transform: scale(1); } }
.download-modal { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); }
.download-modal[open] { animation: quick-download-in 200ms var(--motion-curve) both; }
.download-modal::backdrop { background: rgba(0, 0, 0, 0.8); animation: preview-viewer-in 200ms var(--motion-curve) both; }
.download-modal.is-closing, .download-modal.is-closing::backdrop { animation: preview-viewer-out var(--motion-exit) var(--motion-curve) both; }
.download-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.download-modal-header h2 { font-size: 1.3rem; line-height: 1.2; }
#quick-download-description { margin: 12px 0 22px; color: var(--text-soft); font-size: 0.9rem; }
.download-modal label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; }
.download-modal select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--text); color-scheme: dark; font: inherit; cursor: pointer; }
.download-detection { margin: 8px 0 20px; color: var(--text-soft); font-size: 0.82rem; }
.quick-download-status { min-height: 48px; margin: 16px 0; color: var(--text-soft); font-size: 0.87rem; }
.quick-download-action { display: flex; width: 100%; justify-content: center; }
.quick-download-action[aria-disabled="true"] { background: var(--line); color: var(--text-soft); cursor: not-allowed; }
.quick-download-retry { width: 100%; min-height: 44px; margin-top: 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-raised); color: var(--text); font: inherit; cursor: pointer; }
.quick-download-retry:hover { border-color: var(--blue); }
.download-modal-all { display: flex; min-height: 44px; width: fit-content; align-items: center; margin: 12px auto 0; color: var(--text-soft); font-size: 0.87rem; text-underline-offset: 4px; }
.download-modal-all:hover { color: var(--text); }
@keyframes quick-download-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.about-text { display: flex; flex-direction: column; gap: 25px; }
.about-disclaimer { max-width: 560px; margin-top: 14px; color: #ef7b95; font-size: 0.8rem; line-height: 1.6; }
.feature-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.feature-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--bg); color: var(--blue); font-size: 0.9rem; }
.feature-copy h4 { margin-bottom: 3px; font-size: 0.97rem; font-weight: 650; }
.feature-copy p { color: var(--text-soft); font-size: 0.9rem; line-height: 1.65; }
.feature-row { transition: transform var(--ease), color var(--ease); }
.feature-row:hover { transform: translateX(6px); }
.feature-row:hover .feature-icon { border-color: var(--blue); transform: rotate(-4deg); }
.feature-icon { transition: border-color var(--ease), transform var(--ease); }

/* Process cards reflect the four real tasks while keeping each hover boundary complete and independent. */
#how-it-works { background: var(--bg); }
.how-header { margin-bottom: 52px; }
.steps-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.step { min-width: 0; min-height: 252px; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.step-num { color: var(--blue); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; }
.step h4 { margin-top: 40px; font-size: 1.02rem; font-weight: 650; }
.step p { margin-top: 9px; color: var(--text-soft); font-size: 0.88rem; line-height: 1.65; }
.step { transition: background var(--ease), translate 220ms var(--motion-curve), border-color var(--ease); }
.motion-ready .step.reveal { transition: opacity var(--motion-enter) var(--motion-curve), transform var(--motion-enter) var(--motion-curve), background var(--ease), translate 220ms var(--motion-curve), border-color var(--ease); transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0s, 0s, 0s; }
@media (hover: hover) and (pointer: fine) {
  .step:hover { background: var(--surface-hover); border-color: var(--blue); translate: 0 -8px; }
}

/* Download */
#download { background: var(--surface); }
.download-header { margin-bottom: 42px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; min-height: 250px; padding: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--bg); }
.download-card:focus-within { border-color: var(--blue); }
.dl-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface); color: var(--blue); font-size: 1.15rem; }
.dl-title { font-size: 1.1rem; font-weight: 650; }
.dl-desc { margin-top: 7px; color: var(--text-soft); font-size: 0.89rem; line-height: 1.65; }
.dl-btn { grid-column: 1 / -1; align-self: end; width: fit-content; }
.dl-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--text-muted); font-size: 0.82rem; }
.dl-note i { color: var(--blue); }

/* FAQ */
#faq { background: var(--bg); }
.faq-grid { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr); gap: clamp(40px, 8vw, 104px); align-items: start; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); transition: border-color var(--ease), background var(--ease); }
.faq-item:hover, .faq-item.open { border-color: var(--line-strong); }
.faq-q { display: flex; width: 100%; min-height: 64px; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: transparent; color: var(--text); cursor: pointer; font-family: inherit; font-size: 0.95rem; font-weight: 600; text-align: left; }
.faq-q:hover { color: var(--blue); }
.faq-chevron { color: var(--text-muted); font-size: 0.72rem; transition: transform var(--ease), color var(--ease); }
.faq-item.open .faq-chevron { color: var(--blue); transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; overflow: hidden; visibility: hidden; transition: grid-template-rows var(--motion-ui) var(--motion-curve), visibility 0s var(--motion-ui); }
.faq-a p { min-height: 0; overflow: hidden; color: var(--text-soft); font-size: 0.89rem; line-height: 1.7; }
.faq-a p::after { display: block; height: 18px; content: ''; }
.faq-a a { color: var(--blue); font-weight: 600; text-decoration: none; }
.faq-a a:hover { text-decoration: underline; }
.faq-item.open .faq-a { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--surface); padding: 58px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 44px; }
.footer-brand p { max-width: 300px; margin-top: 13px; color: var(--text-soft); font-size: 0.86rem; line-height: 1.65; }
.footer-col h5 { margin-bottom: 15px; color: var(--text); font-size: 0.83rem; font-weight: 650; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; list-style: none; }
.footer-col a { color: var(--text-soft); font-size: 0.86rem; text-decoration: none; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { color: var(--text-muted); font-size: 0.78rem; }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); color: var(--text-soft); text-decoration: none; }
.footer-socials a:hover { border-color: var(--text-muted); color: var(--blue); }

/* Back to top remains compact and only appears after the page context has changed. */
#back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 10; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-soft); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity var(--ease), border-color var(--ease), color var(--ease); }
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { border-color: var(--text-muted); color: var(--blue); }

@media (max-width: 900px) {
  .motion-ready .step.reveal { transition-delay: 0s; }
  .hero-grid, .about-grid, .faq-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .about-grid { gap: 42px; }
  .about-img-wrap { order: -1; }
  .steps-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr; }
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  #nav-toggle { display: grid; place-items: center; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1160px); }
  #home > .container, #about > .container { width: calc(100% - 32px); }
  .preview-viewer { padding: 80px 12px 16px; }
  .preview-viewer-image { max-height: calc(100dvh - 96px); }
  .donation-notification { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  body:has(#back-to-top) .donation-notification { bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px)); max-height: calc(100dvh - 88px - env(safe-area-inset-bottom)); }
  #home { padding-top: 70px; }
  h1.hero-title { font-size: clamp(2.7rem, 14vw, 4.1rem); }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
  .scroll-cue { margin-top: 30px; }
  section { padding: 68px 0; }
  .steps-track { grid-template-columns: 1fr; }
  .step, .step + .step { min-height: 0; padding: 24px; }
  .step h4 { margin-top: 20px; }
  .download-card { padding: 24px; }
  .faq-grid { gap: 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  #back-to-top { right: 16px; bottom: 16px; }
}

/* Motion stays available by default, even when an OS-level browser setting disables cosmetic effects. */
html[data-motion="reduced"] {
  scroll-behavior: auto;
}
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
}
html[data-motion="reduced"] .motion-ready .reveal { opacity: 1; transform: none; }

@media (hover: none), (pointer: coarse) {
  .hero-img-inner { transform: none !important; }
  .preview-open-icon { top: auto; left: auto; right: 12px; bottom: 12px; width: 44px; height: 44px; opacity: 1; transform: none; }
  .preview-trigger:focus-visible .preview-open-icon { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-background-slide.is-sliding { will-change: auto; }
  .hero-background-slide { transition: none; }
  .download-modal[open], .download-modal::backdrop { animation: none; }
  .preview-trigger img, .preview-trigger::after, .preview-open-icon { transition: none; }
  .preview-trigger:hover img { transform: none; }
  .preview-viewer[open], .preview-viewer-image { animation: none; }
  .motion-ready .step.reveal { opacity: 1; transform: none; transition: none; }
  .step:hover { translate: none; }
  .donation-notification { animation: none; }
  #mobile-menu { transition-duration: 1ms; transition-delay: 0s; }
  /* Browser-level motion reduction only removes the pointer tilt. Core page transitions remain enabled by request. */
  .hero-img-inner { transform: none !important; }
}
