/* FIXUS homepage — visual language shared with the FIXUS user manual (fixus-user-manual).
   Tokens and component names are kept in sync with that project's styles.css. */

:root {
  --primary: #5e66e0;
  --primary-dark: #4249bc;
  --accent: #ef4581;
  --ink: #252330;
  --muted: #6f6b7b;
  --ground: #f6f5fa;
  --surface: #fff;
  --border: #e6e2ef;
  --shadow: 0 16px 50px rgba(51, 35, 90, .12);
  --radius: 20px;
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Varela Round", Arial, sans-serif;
  line-height: 1.65;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

/* ---------- Header ---------- */
.site-header {
  height: var(--header);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.brand img { object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { color: var(--primary); font-size: 1.2rem; letter-spacing: .03em; }
.brand small { color: var(--muted); font-size: .76rem; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 14px;
  border-radius: 22px;
  color: #504b5d;
  font-size: .86rem;
  font-weight: 700;
  transition: .2s;
}
.site-nav a:hover, .site-nav a.active { background: #f0ebff; color: var(--primary-dark); }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .86rem;
  box-shadow: 0 9px 22px rgba(94, 102, 224, .25);
  transition: .2s;
}
.header-cta:hover { background: var(--primary-dark); }

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 1.5rem;
}

/* ---------- Layout ---------- */
main { width: min(1240px, 100%); margin: auto; padding: 40px 28px 90px; }
.section { margin: 0 0 72px; }

/* ---------- Intro ---------- */
.intro { text-align: center; padding-top: 32px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}
.intro h2 {
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
}
.lead { color: var(--muted); font-size: 1.12rem; }
.intro .lead { max-width: 680px; margin: 18px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.intro .hero-actions, .intro .role-pills { justify-content: center; }

.showcase { max-width: 860px; margin: 0 auto; }
.showcase img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1569 / 912;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f3f1f7;
  box-shadow: var(--shadow);
}
.showcase figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: .82rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 23px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}
.button.primary { background: var(--primary); color: #fff; box-shadow: 0 9px 22px rgba(94, 102, 224, .25); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { border-color: var(--primary); color: var(--primary); background: #fff; }
.button.secondary:hover { background: #f0ebff; }
.role-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pills span {
  padding: 6px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
}

/* ---------- Section headings ---------- */
.section-heading { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.section-heading h1, .section-heading h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.2; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1.03rem; }

/* ---------- Card blocks (kept in sync with manual .chapter) ---------- */
.chapter {
  padding: 54px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(51, 35, 90, .05);
}

/* ---------- Video ---------- */
.video-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.video-frame {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #100f18;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(49, 33, 89, .22);
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  font-size: 1.7rem;
  transition: transform .2s;
}
.video-frame:hover .play { transform: scale(1.08); }
.video-copy p { color: var(--muted); }
.video-copy p + p { margin-top: 1rem; }

/* ---------- Feature cards (kept in sync with manual .cards-2) ---------- */
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cards-2 article {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #faf8ff);
}
.cards-2 h3 { margin: 14px 0 6px; }
.cards-2 p { margin: 0; color: var(--muted); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #fff;
  font-size: 1.5rem;
}

/* ---------- Stats (kept in sync with manual .cards-3) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stats article {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 34px 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #faf8ff);
}
.stats b {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f0ebff;
  color: var(--primary);
  font-size: 1.45rem;
}
.stats h3 { margin: 0; font-size: 1.1rem; }
.stats p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Quick grid (kept in sync with manual) ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-grid a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
  transition: .2s;
}
.quick-grid a:hover { transform: translateY(-3px); border-color: #c9bce9; box-shadow: 0 12px 24px rgba(51, 35, 90, .08); }
.quick-grid b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: #f0ebff;
  color: var(--primary);
  font-size: 1.3rem;
}
.quick-grid span { display: grid; font-weight: 700; }
.quick-grid small { color: var(--muted); font-weight: 400; }
.quick-grid .go { margin-inline-start: auto; color: #c4bcdd; font-size: .8rem; transition: .2s; }
.quick-grid a:hover .go { color: var(--primary); transform: translateX(-3px); }

.explore h3 { margin: 0 0 16px; font-size: 1.05rem; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(51, 35, 90, .05);
  cursor: zoom-in;
  transition: transform .2s, box-shadow .2s;
}
.gallery figure:hover,
.gallery figure:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(51, 35, 90, .13);
}
.gallery figure:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1569 / 912;
  object-fit: contain;
  background: #f3f1f7;
}
/* portrait (phone) screenshot: pillar-box it in the same-size frame */
.gallery figure.tall img { object-fit: contain; padding: 10px 0; }
.gallery figcaption { padding: 14px 18px; display: grid; gap: 4px; }
.gallery figcaption b { font-weight: 700; font-size: .92rem; }
.gallery figcaption span { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.gallery-cta { margin-top: 34px; text-align: center; }

.lightbox {
  width: min(1500px, 94vw);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 14, 32, .82); backdrop-filter: blur(5px); }
.lightbox-inner { display: grid; grid-template-rows: 1fr auto; max-height: 94vh; }
.lightbox-figure {
  margin: 0;
  min-height: 0;
  display: grid;
  place-items: safe center;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 12px 12px 0 0;
}
.lightbox.zoomed .lightbox-figure { place-items: safe start; }
.lightbox.zoomed img {
  width: min(1800px, 200vw);
  max-width: none;
  max-height: none;
  border-radius: 0;
  cursor: zoom-out;
}
.lightbox.no-zoom img { cursor: default; }
.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
}
.lightbox-bar p { margin: 0; font-weight: 700; min-width: 0; }
.lightbox-bar .counter { margin-inline: auto; flex: none; color: var(--muted); font-weight: 400; font-size: .85rem; white-space: nowrap; }
.lightbox-nav { display: flex; gap: 8px; flex: none; }
.lightbox-nav button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--ground);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: .15s;
}
.lightbox-nav button:hover { background: #ece7f7; color: var(--primary); }

/* ---------- Callout ---------- */
.callout { margin-top: 26px; padding: 17px 20px; border-radius: 12px; border-right: 4px solid; }
.callout.info { background: #eef6ff; border-color: #3281d4; }
/* links sitting inside running text need a non-colour cue (WCAG 1.4.1) */
.callout a, .rich a, .contact-intro a, .cards-3 p a, .cards-2 p a { text-decoration: underline; color: var(--primary); }
.callout.warning { background: #fff8e6; border-color: #e9a51d; }
.callout.availability { border-color: #c4b5fd; background: linear-gradient(135deg, #f5f3ff, #faf5ff); color: #4c1d95; }
.callout.availability strong { color: #6d28d9; }

/* ---------- Use-case page blocks (kept in sync with manual) ---------- */
.rich p { margin: 0 0 1rem; color: var(--muted); }
.rich p:last-child { margin-bottom: 0; }
.rich strong { color: var(--ink); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards-3 article {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #faf8ff);
}
.cards-3 h3 { margin: 12px 0 6px; }
.cards-3 p { margin: 0; color: var(--muted); font-size: .92rem; }
.cards-3 .feature-icon { width: 46px; height: 46px; border-radius: 13px; font-size: 1.25rem; background: #f0ebff; color: var(--primary); }

.feature-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: center; }
.feature-layout.reverse { grid-template-columns: 1.15fr .85fr; }
.feature-copy h3 { margin: 22px 0 8px; }
.feature-copy h3:first-child { margin-top: 0; }
.feature-copy > p { color: var(--muted); }
.screen { margin: 0; }
.screen img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f3f1f7;
}
.feature-layout .screen img { max-height: 460px; }
.feature-layout .screen.phone img { max-height: 520px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 6px 28px 6px 0; color: #504b5d; }
.check-list li::before { content: "✓"; position: absolute; right: 0; color: var(--primary); font-weight: 700; }

/* ---------- Install guide (pwa.html) ---------- */
.install-method { margin-top: 28px; }
.install-method h3 { margin: 0 0 16px; }
.install-method + .install-method { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
.install-row { display: grid; grid-template-columns: 1fr 280px; gap: 44px; align-items: start; }
.install-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.install-steps li { position: relative; margin-bottom: 16px; padding-inline-start: 44px; line-height: 1.75; }
.install-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f0ebff;
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
}
.install-video { margin: 0; }
.install-video video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #000;
}
.install-video figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: .82rem; }
@media (max-width: 1000px) {
  .install-row { grid-template-columns: 1fr; gap: 24px; }
  .install-video { max-width: 300px; margin-inline: auto; }
}

/* ---------- Legal / policy pages ---------- */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(51, 35, 90, .05);
}
.legal h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; }
.legal .updated { margin: 0; color: var(--muted); font-size: .92rem; }
.legal > section { margin-top: 34px; }
.legal h2 { margin: 0 0 12px; font-size: 1.32rem; line-height: 1.3; }
.legal h3 { margin: 20px 0 8px; font-size: 1.02rem; }
.legal p { margin: 0 0 12px; line-height: 1.75; }
.legal ul, .legal ol { margin: 0 0 12px; padding-inline-start: 1.4rem; line-height: 1.75; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--primary); text-decoration: underline; }
.legal strong { color: var(--ink); }

/* ---------- What is / FAQ ---------- */
.section-cta { text-align: center; margin: 0; }

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.faq summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 700; font-size: 1.25rem; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.faq details > p { margin: 0; padding: 0 20px 18px; color: var(--muted); line-height: 1.75; }
.faq details > p a { color: var(--primary); text-decoration: underline; }

/* ---------- Blog ---------- */
.post-list { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.post-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(51, 35, 90, .05);
}
.post-card .post-meta { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.post-card h2 { margin: 0 0 10px; font-size: 1.22rem; line-height: 1.35; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary-dark); }
.post-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; }
.post-card .more { font-weight: 700; color: var(--primary); text-decoration: none; }
.post-card .more:hover { text-decoration: underline; }

.article { max-width: 760px; margin: 0 auto; }
.article .crumbs { margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.article .crumbs a { color: var(--primary); text-decoration: none; }
.article .crumbs a:hover { text-decoration: underline; }
.article h1 { margin: 4px 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.2; }
.article .article-meta { margin: 0 0 26px; color: var(--muted); font-size: .92rem; }
.article h2 { margin: 34px 0 10px; font-size: 1.32rem; line-height: 1.3; }
.article p { margin: 0 0 16px; line-height: 1.8; }
.article p a { color: var(--primary); text-decoration: underline; }
.article .check-list { margin: 4px 0 20px; }
.article figure { margin: 28px 0; }
.article figure img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }
.article .article-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
  align-items: start;
}
.contact-intro h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.contact-intro > p { color: var(--muted); }
.contact-points { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-points li { position: relative; padding: 7px 28px 7px 0; color: #504b5d; }
.contact-points li::before { content: "✓"; position: absolute; right: 0; color: var(--primary); font-weight: 700; }

.contact-form { display: grid; gap: 12px; }
.contact-form label { font-size: .86rem; font-weight: 700; }
.contact-form .field { display: grid; gap: 6px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #faf9fc;
  outline: none;
  transition: .2s;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(94, 102, 224, .45);
}
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; font-weight: 400; }
.checkbox-row a { color: var(--primary); text-decoration: underline; }
.contact-form .button.primary { justify-self: start; }
.contact-form .button[disabled] { opacity: .65; cursor: wait; }
.form-message { min-height: 1.5em; margin: 0; font-size: .88rem; color: #c62828; }
.form-message.success { color: #207a42; }

/* ---------- To top ---------- */
.to-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 900;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 1.3rem;
  cursor: pointer;
}
.to-top.visible { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: #24212c;
  color: #fff;
  padding: 54px 28px 30px;
}
.footer-grid {
  width: min(1240px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.site-footer h2 { margin: 0 0 12px; font-size: .95rem; font-weight: 700; color: #fff; }
.site-footer a, .site-footer p { color: #c3bdd0; font-size: .88rem; }
.site-footer a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand strong { display: block; color: var(--primary); font-size: 1.2rem; margin-bottom: 8px; }
.footer-social { display: flex; gap: 14px; font-size: 1.1rem; }
.footer-bottom {
  width: min(1240px, 100%);
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #aaa3b4;
  font-size: .8rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .video-layout { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .feature-layout, .feature-layout.reverse { grid-template-columns: 1fr; gap: 28px; }
  .chapter { padding: 38px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header: 66px; }
  .site-header { padding: 0 14px; gap: 10px; }
  .brand span { display: none; }
  .site-nav {
    position: fixed;
    inset: var(--header) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform .25s, visibility .25s;
  }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav a { padding: 12px 14px; }
  .header-cta { margin-inline-start: auto; }
  .nav-toggle { display: block; }
  main { padding: 24px 14px 70px; }
  .section { margin-bottom: 44px; }
  .intro { padding-top: 8px; }
  .intro h1 { font-size: 2.3rem; }
  .cards-2, .cards-3, .stats, .quick-grid, .gallery { grid-template-columns: 1fr; }

  .lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .lightbox-inner { height: 100vh; height: 100dvh; max-height: 100dvh; }
  .lightbox img { max-height: none; height: 100%; border-radius: 0; }
  .lightbox.zoomed img { height: auto; }
  .lightbox-bar {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }
  .lightbox-bar p { flex: 1 1 100%; text-align: center; font-size: .95rem; }
  .lightbox-bar .counter { margin-inline: 0; }
  .lightbox-nav { margin-inline-start: auto; }
  .lightbox-nav button { width: 44px; height: 44px; font-size: 1.05rem; }
  .chapter { padding: 28px 20px; }
  .hero-actions .button { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .to-top { left: 14px; bottom: 14px; }
}

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