/* HomeGroup app site: plain CSS, no framework, no build step.
   Inter is self-hosted (fonts/OFL-Inter.txt has its licence), so no visitor
   request ever goes to a font CDN. Edit the variables in :root to retheme. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
}

:root {
  --accent:        #2563EB;
  --accent-hover:  #1D4ED8;
  --accent-soft:   #EFF6FF;
  --ink:           #1E293B;
  --ink-soft:      #64748B;
  --surface:       #FFFFFF;
  --bg:            #F8FAFC;
  --band:          #EEF2F7;
  --line:          #E2E8F0;
  --radius:        14px;
  --tap:           48px;
  --measure:       40rem;      /* content column below 1024px */
  --measure-wide:  77.5rem;    /* content column from 1024px */
  --shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md:     0 10px 30px -8px rgba(15, 23, 42, 0.18), 0 4px 10px rgba(15, 23, 42, 0.06);
  --footer-bg:     #0F172A;
  --footer-muted:  #CBD5E1;    /* 12:1 on --footer-bg */
  --footer-label:  #94A3B8;    /* 6.9:1 on --footer-bg */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1rem;
  line-height: 1.58;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
:where(main) :where(p, ul, ol) { margin-block: 0 0.75em; }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--surface); padding: 0.5rem 0.75rem; border-radius: 8px; z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

/* ---- Header ---------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.site-brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.95rem;
  min-height: 2.5rem; display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--ink); }

/* ---- Layout ---------------------------------------------------------- */
.band { background: var(--bg); }
.band--white { background: var(--surface); }
.section { max-width: var(--measure); margin: 0 auto; padding: 1rem 1.25rem; }
.section__title {
  font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.75rem;
}
.muted { color: var(--ink-soft); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0.7rem 1.4rem;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }

/* ---- Hero ------------------------------------------------------------ */
.app-hero {
  background:
    radial-gradient(circle 420px at 85% 10%, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0) 70%),
    linear-gradient(to bottom, #F4F8FC, var(--bg));
  border-bottom: 1px solid var(--line);
}
.app-hero__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.app-hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.app-hero__tagline {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-soft);
}
.app-hero__about { margin: 0 0 1.25rem; max-width: 36rem; }
.app-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.app-hero__link { font-weight: 600; }
.app-hero__shot { justify-self: center; width: min(13rem, 60%); }

.device {
  margin: 0;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  box-shadow: var(--shadow-md);
}
.device img { display: block; width: 100%; height: auto; border-radius: 1.5rem; background: var(--band); }
.device--dark { background: #0F172A; border-color: #0F172A; }

/* ---- Video ----------------------------------------------------------- */
.video-frame {
  max-width: 45rem;
  margin: 0.75rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--band);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--band); }

/* ---- Feature cards --------------------------------------------------- */
.feature-grid {
  list-style: none; margin: 0.75rem 0 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: 1fr;
}
.feature {
  display: grid; grid-template-columns: auto 1fr;
  column-gap: 0.85rem; row-gap: 0.15rem; align-items: center; padding: 1rem;
}
.feature .feature__icon { grid-row: 1 / span 2; align-self: start; }
.feature__icon, .install-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: var(--accent-soft); color: var(--accent);
}
.feature__icon svg, .check-list svg, .panel__icon svg, .install-card__icon svg {
  width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.feature__title { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.feature__text { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Screenshot carousel -------------------------------------------- */
.gallery { position: relative; margin-top: 0.75rem; }
.gallery__viewport {
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0.5rem 0 0.75rem; scrollbar-width: thin;
}
.shots { list-style: none; margin: 0; padding: 0 0.25rem; display: flex; gap: 1.25rem; }
.shots__item { flex: 0 0 min(12.75rem, 70%); scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots figcaption { margin-top: 0.75rem; font-size: 0.92rem; color: var(--ink-soft); }
.gallery::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 4rem;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface));
  pointer-events: none; transition: opacity 150ms ease;
}
.gallery.is-at-end::after { opacity: 0; }
.js .gallery.is-static .gallery__controls, .gallery.is-static::after { display: none; }
.gallery__controls { display: none; gap: 0.5rem; margin-top: 0.25rem; }
.js .gallery__controls { display: flex; }
.gallery__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.gallery__btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery__btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.gallery__btn:disabled { opacity: 0.4; cursor: default; }

/* ---- Privacy panel + contact card ----------------------------------- */
.duo { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.panel {
  background: var(--accent-soft); border: 1px solid #BFDBFE; border-radius: var(--radius);
  padding: 1.25rem; display: grid; align-content: start; gap: 0.75rem;
}
.panel__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: #fff;
}
.panel__title { margin: 0 0 0.5rem; }
.panel__lead { margin: 0 0 0.75rem; font-weight: 600; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list svg { flex: none; margin-top: 0.1rem; color: #15803D; stroke-width: 2.4; }

.cta-card {
  background: var(--accent-hover); color: #fff; border-radius: var(--radius);
  padding: 1.25rem; text-align: center; display: flex; flex-direction: column; justify-content: center;
}
.cta-card .section__title { color: #fff; }
.cta-card p:last-child { margin-bottom: 0; }
.cta-card .btn--primary { background: #fff; color: var(--accent-hover); }
.cta-card .btn--primary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.cta-card :focus-visible { outline-color: #fff; }

/* ---- Install help (collapsed) --------------------------------------- */
.install > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.6rem; min-height: var(--tap);
}
.install > summary::-webkit-details-marker { display: none; }
.install > summary::before {
  content: ""; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(-45deg); transition: transform 120ms ease;
}
.install[open] > summary::before { transform: rotate(45deg); }
.install > summary .section__title { margin: 0; }
.install-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 0.75rem; }
.install-card { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem; }
.install-card h3 { margin: 0.25rem 0 0; font-size: 1.125rem; }
.install-card p { margin: 0; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-muted); padding: 2rem 1.25rem; text-align: center; }
.site-footer__brand { margin: 0 0 0.5rem; font-weight: 700; color: #fff; }
.site-footer__disclaimer { max-width: 40rem; margin: 0 auto 0.75rem; font-size: 0.85rem; }
.site-footer__copy { margin: 0; font-size: 0.8rem; color: var(--footer-label); }
.site-footer a { color: var(--footer-muted); }
.site-footer a:hover { color: #fff; }

/* ---- Footer links and legal pages ----------------------------------- */
.site-footer__legal { display: flex; justify-content: center; gap: 0.25rem 1.25rem; margin: 0 0 0.75rem; }
.site-footer__legal a { min-height: 2.5rem; display: inline-flex; align-items: center; }
.prose { max-width: 45rem; }
.prose h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
.prose ul { padding-left: 1.25rem; }
.draft-note {
  background: #FEF3C7; border: 1px solid #F59E0B; color: #78350F;
  border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 1rem; font-weight: 600;
}

/* ---- Breakpoints ----------------------------------------------------- */
@media (min-width: 40rem) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .install-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 48rem) {
  .app-hero__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2.5rem; padding: 2rem; align-items: start;
  }
  .app-hero__shot { align-self: start; justify-self: end; width: clamp(11rem, 22vw, 15rem); }
}
@media (min-width: 64rem) {
  .site-header__inner { max-width: var(--measure-wide); padding-left: 2rem; padding-right: 2rem; }
  .section { max-width: var(--measure-wide); padding: 1.5rem 2rem; }
  .section > p { max-width: 65ch; }
  .app-hero__inner { max-width: var(--measure-wide); padding: 2.25rem 2rem; }
  .app-hero__shot { width: 15rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .duo { grid-template-columns: 3fr 2fr; gap: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery__viewport { scroll-behavior: auto; }
  .gallery::after, .install > summary::before { transition: none; }
}
