/* Regi website: static, no scripts, no tracking, nothing from third-party servers.
   Font, colours and shapes as in the app (src/styles.css), light or dark following the system setting. */

/* Same font as the app (@fontsource-variable/plus-jakarta-sans, Latin subset only). Licence: fonts/OFL.txt */
@font-face {
  font-family: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/plus-jakarta-sans.woff2) format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #f4f4f9;
  --surface: #ffffff;
  --ink: #15141d;
  --ink-2: #484659;
  --muted: #6b6982;
  --border: #e8e7f0;
  --accent: hsl(258 85% 60%);
  --accent-strong: hsl(258 70% 52%);
  --accent-soft: hsl(258 100% 96%);
  --accent-ink: hsl(258 60% 36%);
  --shadow: 0 1px 2px rgb(20 19 40 / 4%), 0 6px 20px rgb(20 19 40 / 6%);
  --radius: 22px;
  --font: 'Plus Jakarta Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c13;
    --surface: #17171f;
    --ink: #f3f2fa;
    --ink-2: #c5c3d7;
    --muted: #8c8aa3;
    --border: #272735;
    --accent: hsl(258 92% 70%);
    --accent-strong: hsl(258 80% 72%);
    --accent-soft: hsl(258 40% 19%);
    --accent-ink: hsl(258 100% 86%);
    --shadow: 0 0 0 1px var(--border);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  background: var(--bg);
  color: var(--ink-2);
  font: 500 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
p,
ul,
dl,
dd {
  margin: 0;
}

h1,
h2,
dt,
strong {
  color: var(--ink);
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  hyphens: auto;
}

h2 {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.3;
  scroll-margin-top: 16px;
}

dt {
  font-weight: 700;
}

ul {
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

/* Links in running text are underlined – colour alone does not set them apart enough. */
a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}

/* --- Subpages: header, title, cards like in the app --------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.top a,
.links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top .home {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.home img {
  border-radius: 10px;
}

main {
  padding: 8px 0;
}

main > * + * {
  margin-top: 16px;
}

main > h2 {
  margin-top: 28px;
}

main > h2 + * {
  margin-top: 10px;
}

.sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card > * + * {
  margin-top: 10px;
}

.card > * + h2 {
  margin-top: 26px;
}

.card > h2 + * {
  margin-top: 6px;
}

.card > dd {
  margin-top: 4px;
}

/* Questions stacked, separated like the rows of a list in the app. */
.card > dd + dt {
  margin: 14px -18px 0;
  padding: 14px 18px 0;
  border-top: 1px solid var(--border);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
  padding: 24px 0;
}

.links [aria-current] {
  color: var(--muted);
}

/* --- Start page and 404: like the app's sign-in screen, everything centred ---------------------------------- */

.start {
  --gutter: 18px;
  display: grid;
  align-content: center;
  gap: 24px;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px var(--gutter);
  text-align: center;
}

.start main {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
}

.start main > * {
  margin: 0;
}

/* Only the app icon, not the screenshots on the start page. */
.start main > img {
  margin-bottom: 8px;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgb(124 92 255 / 35%);
}

.start h1 {
  font-size: 36px;
}

.start .links {
  padding: 0;
}

/* --- Start page: plus three app screens in iPhone frames ---------------------------------------------------- */

.landing {
  max-width: 880px;
  padding-top: 40px;
}

/* The tagline stays as narrow as on the app's sign-in screen. */
.landing main > p {
  max-width: 404px;
}

.landing .stores,
.landing .facts {
  padding: 0;
  list-style: none;
}

.landing li {
  margin: 0;
}

/* Notes instead of store badges: flat like .pill in the app so they do not look like buttons. */
.landing .stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.stores li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
}

/* On phones a swipe row that snaps each phone to the centre and starts with the first one centred: the side
   padding lets the first and the last phone reach the centre (50% is half the width of main, the row itself is
   wider by the two gutters). */
.landing .shots {
  --w: min(260px, 68vw);
  --titanium: linear-gradient(135deg, #6c6b72, #2e2d33 18%, #57565d 42%, #27262b 64%, #4f4e55 84%, #707076);
  --phone-shadow: 0 2px 6px rgb(20 19 40 / 8%), 0 22px 44px -14px rgb(20 19 40 / 30%);
  --phone-shadow-raised: 0 2px 6px rgb(20 19 40 / 8%), 0 34px 60px -18px rgb(20 19 40 / 38%);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: auto auto;
  justify-self: stretch;
  justify-content: start;
  gap: 16px;
  margin: 20px calc(-1 * var(--gutter)) 0;
  padding: 16px calc(50% + var(--gutter) - var(--w) / 2) 32px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.shots figure {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  justify-items: center;
  width: var(--w);
  margin: 0;
  scroll-snap-align: center;
}

/* iPhone drawn in CSS, every size a fraction of its outer width --w, taken from the iPhone 18 Pro simulator
   (screen 1206 × 2622 px with a corner reaching 254 px, Dynamic Island 284 × 110 px, 42 px below the top).
   Titanium band = border, black glass edge = padding, screenshot = screen; both radii share one centre. */
.phone {
  position: relative;
  align-self: end;
  width: var(--w);
  padding: calc(var(--w) * 0.026);
  border: calc(var(--w) * 0.011) solid transparent;
  border-radius: calc(var(--w) * 0.18);
  background: linear-gradient(#050506, #050506) padding-box, var(--titanium) border-box;
  box-shadow: var(--phone-shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.143);
}

/* Dynamic Island: the screenshots leave the middle of the status bar free for it. */
.phone::before {
  content: '';
  position: absolute;
  top: calc(var(--w) * 0.058);
  left: 50%;
  width: calc(var(--w) * 0.218);
  height: calc(var(--w) * 0.0845);
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

/* Side buttons, just outside the band: action button and volume on the left, side button on the right. */
.phone::after {
  --button: #3c3b41;
  content: '';
  position: absolute;
  inset: 0 calc(var(--w) * -0.019);
  background:
    linear-gradient(transparent 15%, var(--button) 0 20%, transparent 0 24%, var(--button) 0 31.5%,
      transparent 0 34%, var(--button) 0 41.5%, transparent 0) left / calc(var(--w) * 0.008) 100% no-repeat,
    linear-gradient(transparent 26%, var(--button) 0 37.5%, transparent 0) right / calc(var(--w) * 0.008) 100% no-repeat;
}

.shots figcaption {
  color: var(--muted);
  font-size: 14px;
  text-wrap: balance;
}

.shots strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
}

.landing .facts {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
  text-wrap: balance;
}

/* From 540 px all three in one centred row with even gaps; the middle one is larger and stands taller.
   Widths and gaps add up to at most 89vw, so the row never touches the edges. */
@media (min-width: 540px) {
  .landing .shots {
    justify-content: center;
    column-gap: min(40px, 3.5vw);
    margin: 44px 0 0;
    padding: 0;
    overflow: visible;
  }

  .shots figure {
    --w: min(232px, 26vw);
  }

  .shots figure:nth-child(2) {
    --w: min(264px, 30vw);
    --phone-shadow: var(--phone-shadow-raised);
  }

  .landing .facts {
    margin-top: 36px;
  }
}

@media (min-width: 720px) {
  .landing {
    padding-top: 64px;
  }
}

/* Side by side with dots only once the line surely fits – stacked otherwise. */
@media (min-width: 840px) {
  .landing .facts {
    display: flex;
    justify-content: center;
  }

  .facts li + li::before {
    content: '·';
    content: '·' / '';
    margin: 0 10px;
    color: var(--muted);
  }
}

/* Dark mode: a faint ring keeps the dark frame apart from the dark page. */
@media (prefers-color-scheme: dark) {
  .landing .shots {
    --phone-shadow: 0 0 0 1px rgb(255 255 255 / 10%), 0 22px 44px -14px rgb(0 0 0 / 70%);
    --phone-shadow-raised: 0 0 0 1px rgb(255 255 255 / 12%), 0 34px 60px -18px rgb(0 0 0 / 85%);
  }
}
