/* LifeHub website. Colours and type come from the app's own tokens
   (packages/tokens/src/tokens.json, "light" and "dark"). Warm, flat, no
   gradients. Inter is the app's one typeface, self-hosted (OFL). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-700Bold.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #fbf6ef;
  --surface: #ffffff;
  --ink: #2b2320;
  --muted: #6b5f57;
  --accent: #b5573a;
  --link: #a34b2f;
  --on-accent: #ffffff;
  --border: #e7dccf;
  --field-border: #dccfc0;
  --hero: #f3e9dc;
  --accent-bg: #f3e4dc;
  --warning-bg: #f6ecd9;
  --warning-text: #965d00;
  --radius-md: 12px;
  --radius-tile: 16px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110c0a;
    --surface: #28211e;
    --ink: #f7f1eb;
    --muted: #c4b8af;
    --accent: #e0876a;
    --link: #e0876a;
    --on-accent: #110c0a;
    --border: #413a36;
    --field-border: #48413d;
    --hero: #342d2a;
    --accent-bg: #3a2923;
    --warning-bg: #372c1e;
    --warning-text: #e0a654;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  z-index: 10;
}
.skip:focus {
  left: 16px;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- header / footer ---- */
.site-head {
  padding: 20px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}
.brand img {
  width: 48px;
  height: auto;
  display: block;
}
.site-foot {
  margin-top: 48px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}
.site-foot a {
  color: var(--muted);
}

/* ---- type ---- */
h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 24px 0 8px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 19px;
  line-height: 1.35;
  margin: 32px 0 8px;
}
h3 {
  font-size: 16px;
  margin: 20px 0 4px;
}
p,
ul,
ol {
  margin: 0 0 12px;
}
ul,
ol {
  padding-left: 22px;
}
li {
  margin-bottom: 6px;
}
.lead {
  font-size: 17px;
  color: var(--ink);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}

/* ---- blocks ---- */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}
.hero img {
  width: min(240px, 70vw);
  height: auto;
  display: block;
  margin: 0 auto 8px;
}
.hero h1 {
  margin-top: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-tile);
  padding: 16px 18px;
  margin: 16px 0;
}
.card > :last-child {
  margin-bottom: 0;
}
.card h2 {
  margin-top: 0;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0;
}
@media (min-width: 560px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}
.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-tile);
  padding: 12px 14px;
  margin: 0;
}
.features strong {
  display: block;
}
.features span {
  color: var(--muted);
  font-size: 14px;
}

/* A placeholder the owner still has to fill in. Loud on purpose. */
.placeholder {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px dashed currentColor;
  border-radius: 6px;
  padding: 0 6px;
  font-weight: 600;
}

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

.toc {
  font-size: 15px;
}
.toc ol {
  margin: 0;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(0.95);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--field-border);
}

/* ---- invite code boxes (as in the app's InviteCode) ---- */
.code {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}
.code span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 9.5vw, 42px);
  height: clamp(42px, 13vw, 54px);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: clamp(18px, 5.6vw, 24px);
  font-weight: 700;
  color: var(--ink);
}
.code span.gap {
  margin-left: 8px;
}
.center {
  text-align: center;
}

.steps {
  padding-left: 22px;
}

/* ---- shopping list ---- */
.list-head h1 {
  margin-bottom: 2px;
}
.aisle {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
  margin: 22px 0 6px;
}
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.items li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.items .dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: var(--accent);
  flex: none;
}
.items .nm {
  flex: 1;
  min-width: 0;
}
.items .qty,
.items .price {
  color: var(--muted);
  font-size: 14px;
}
.items .price {
  white-space: nowrap;
}

noscript p {
  background: var(--warning-bg);
  color: var(--warning-text);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

[hidden] {
  display: none !important;
}
