/*
 * Groove — marketing site.
 *
 * Palette and page gradient are the app's own Light theme ("Cream"), taken
 * from src/application/appearance/theme.ts so the site and the app read as one
 * product. Every path in the markup is relative: the site is served both at a
 * domain root and from /groove on loopdev.ca.
 */

:root {
  --bg-top: #FFFAF3;
  --bg-mid: #F8EEE1;
  --bg-bottom: #F1E4D0;
  --surface: #FFF9F0;
  --surface-elevated: #F3E8D9;
  --accent: #B88464;
  --accent-pressed: #9C6E4E;
  --accent-text: #FFF9F0;
  --text: #3A211A;
  --text-secondary: #806B5C;
  --text-tertiary: #A89483;

  --measure: 34rem;

  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 3rem;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  /* The app's vertical warm gradient, fixed so short pages still show all of it. */
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-pressed); }

/* ---- App Store banner ---------------------------------------------------- */

.banner {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
  background: rgba(255, 249, 240, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(58, 33, 26, 0.08);
  text-decoration: none;
  color: var(--text);
}

.banner img { border-radius: 8px; flex: none; }

.banner-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-width: 0;
}

.banner-text b { font-size: 0.9375rem; color: var(--text); }

.banner-cta {
  margin-left: auto;
  flex: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---- Layout -------------------------------------------------------------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 0;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 { font-size: 1.1875rem; letter-spacing: -0.01em; }

.hero { text-align: center; }
/* The mark is 180x110, not square: fix the height and let the width follow, or
   it gets squashed to its height. */
.hero .mark { height: 72px; width: auto; }
.tagline { margin: 0.5rem 0 0; font-size: 1.125rem; font-weight: 600; }
.lede { color: var(--text-secondary); margin: 0.75rem 0 0; }
.note { font-size: 0.8125rem; color: var(--text-tertiary); margin: 0.75rem 0 0; }

.button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.button:active { background: var(--accent-pressed); }

/* ---- Screenshots --------------------------------------------------------- */

.gallery-section { margin-top: 3rem; }

.lang { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }

.lang-button {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(58, 33, 26, 0.15);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--surface-elevated);
  color: var(--text);
  border-color: transparent;
  font-weight: 600;
}

/* Swipeable on a phone, a plain row on a wide screen. */
.gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  margin: 0 -1.25rem;
  padding-inline: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.shot {
  flex: 0 0 68%;
  max-width: 260px;
  margin: 0;
  scroll-snap-align: center;
}

.shot img {
  width: 100%;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(58, 33, 26, 0.1);
  display: block;
}

.shot figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ---- How it works -------------------------------------------------------- */

.how { margin-top: 3rem; }
.how ol { list-style: none; counter-reset: step; margin: 1rem 0 0; padding: 0; }

.how li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(58, 33, 26, 0.08);
}

.how li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  align-self: start;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--surface-elevated);
  color: var(--accent-pressed);
  font-size: 0.8125rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.how li span { color: var(--text-secondary); font-size: 0.9375rem; }
.quiet { color: var(--text-tertiary); font-size: 0.875rem; margin-top: 1.25rem; }

/* ---- Legal pages --------------------------------------------------------- */

.legal h1 { font-size: 1.75rem; }
.legal .effective { color: var(--text-tertiary); font-size: 0.8125rem; margin: 0.4rem 0 0; }
.legal section { margin-top: 1.75rem; }
.legal h2 { margin: 0 0 0.4rem; }
.legal p { margin: 0; color: var(--text-secondary); }
.legal .lede { margin-top: 1rem; }

/* ---- Footer -------------------------------------------------------------- */

footer {
  max-width: var(--measure);
  margin: 3rem auto 0;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid rgba(58, 33, 26, 0.08);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

footer p { color: var(--text-tertiary); margin: 0.75rem 0 0; }

@media (min-width: 640px) {
  main { padding-top: 3.5rem; }
  h1 { font-size: 2.75rem; }
  .shot { flex-basis: 240px; }
}
