*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:  #faf9f7;
  --card:   #ffffff;
  --ink:    #17171a;
  --muted:  #6c6c74;
  --line:   rgba(23,23,26,0.09);
  --crimson:#E11D48;
  --shadow: rgba(23,23,26,0.35);

  /* each app's own field, drawn from its own brand system */
  --sio-field:   #fdecf0;
  --snack-field: #e4f5fe;
  --bh-field:    #dedcf4;
  --dr-field:    #eeeffc;

  --bh-ink:    #1A1F40;
  --dr-ink:    rgba(60, 60, 67, 0.6);

  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

/* Dark: the brand's Night behind everything, each app's field deepened. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #0b0306;
    --card:   #161015;
    --ink:    #f4f1f3;
    --muted:  #a8a1a6;
    --line:   rgba(255,255,255,0.09);
    --shadow: rgba(0,0,0,0.7);

    --sio-field:   #2a0d17;
    --snack-field: #0a2431;
    --bh-field:    #1d1b38;
    --dr-field:    #1b1b26;

    --bh-ink:    #c9c6f2;
    --dr-ink:    rgba(235, 235, 245, 0.6);
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sys);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 940px; margin: 0 auto; padding: 0 1.5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- header ---------- */
header.top { padding: 4.25rem 0 3.75rem; }
.mark { display: block; width: clamp(260px, 46vw, 440px); color: var(--ink); }
.mark svg { display: block; width: 100%; height: auto; }
.sub {
  margin-top: 0.9rem;
  font-size: clamp(16px, 1.45vw, 17.5px);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.004em;
}

/* ---------- the shelf ---------- */
.shelf {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.25rem; padding-bottom: 1rem;
}
/* The whole card opens the app's own site; the App Store line is its own link above that. */
.tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px var(--shadow); }
.tile:has(.app:focus-visible) { outline: 2px solid var(--crimson); outline-offset: 3px; }
.app { text-decoration: none; color: inherit; }
.app:focus-visible { outline: none; }
.app::after { content: ""; position: absolute; inset: 0; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

.field {
  height: 190px; display: flex; align-items: center; justify-content: center;
}
.field.sio   { background: var(--sio-field); }
.field.snack { background: var(--snack-field); }
.field.bh    { background: var(--bh-field); }
.field.dr    { background: var(--dr-field); }

.field img {
  width: 96px; height: 96px; border-radius: 22.5%;
  box-shadow: 0 10px 26px -10px rgba(23,23,26,0.42);
  display: block;
}

.plate { padding: 1.35rem 1.5rem 1.5rem; }
.plate h2 { font-size: inherit; font-weight: inherit; line-height: 1.4; }

/* ---- real wordmarks, per each app's own spec ---- */
.wm { display: block; }
/* Strength IO: Montserrat outlines, light-theme spec from StrengthIO-web */
.wm-sio { color: var(--ink); }
.wm-sio svg { height: 11.5px; width: auto; display: block; }
/* Snack: the real outlined wordmark.svg from the brand folder */
.wm-snack svg { height: 21px; width: auto; display: block; }
/* Bedhead: system face, regular, deep indigo */
.wm-bh {
  font-family: var(--sys); font-weight: 400; font-size: 21px;
  letter-spacing: -0.01em; color: var(--bh-ink);
}
/* Dayrift: as the app draws it, system font, semibold, capitals, tracked, iOS secondary-label grey */
.wm-dr {
  font-family: var(--sys); font-weight: 600; font-size: 17px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dr-ink); line-height: 21px;
}

.say {
  margin-top: 0.6rem; font-size: 16px; color: var(--muted);
  line-height: 1.55;
}
.foot-row {
  margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  font-size: 13px; color: var(--muted); letter-spacing: 0.02em;
}
.store {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); text-decoration: none;
  padding: 0.35rem 0; margin: -0.35rem 0;
}
.store:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; }

/* ---------- footer ---------- */
footer.end {
  margin-top: 3.5rem; padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.6rem 1.25rem;
  font-size: 14px; color: var(--muted);
}
.end-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; }
footer.end a { color: var(--muted); text-decoration: none; }
footer.end a:hover { color: var(--ink); }

/* ---------- not found ---------- */
.lost { padding-bottom: 6rem; }
.lost h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; letter-spacing: -0.01em; }
.lost p { margin-top: 0.75rem; color: var(--muted); }
.lost a { color: var(--ink); text-underline-offset: 3px; }

@media (max-width: 680px) {
  .shelf { grid-template-columns: 1fr; }
  header.top { padding: 2.75rem 0 2.5rem; }
  .field { height: 165px; }
  .field img { width: 84px; height: 84px; }
}
