/* Shelfcat website. Colours are the app's tokens (lib/ui/tokens.dart in the app repo). */
:root {
  --page: #f7f3ef;        /* ShelfcatColors.page */
  --card: #ffffff;        /* ShelfcatColors.card */
  --ink: #292524;         /* ShelfcatColors.ink */
  --ink-soft: #57534e;    /* ShelfcatColors.inkSoft */
  --muted: #78716c;       /* ShelfcatColors.muted */
  --ink-brown: #533630;   /* ShelfcatColors.inkBrown */
  --brown: #926247;       /* ShelfcatColors.brown */
  --brown-pressed: #704738; /* ShelfcatColors.brownPressed */
  --tint: #ebe2d6;        /* ShelfcatColors.tint (Brand/10) */
  --line: #e7e5e4;        /* ShelfcatColors.line */
  --shadow: 0 8px 24px rgba(41, 37, 36, 0.10), 0 2px 6px rgba(41, 37, 36, 0.06);
  --radius-card: 24px;
  --radius-sm: 16px;
  --gutter: 16px;
  color-scheme: light;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brown);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brown-pressed);
}

a:focus-visible,
.store-button:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 16px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  flex: 1;
}

/* ---------- Home ---------- */

.hero {
  padding: 64px 0 32px;
  text-align: center;
}

.app-icon {
  width: 128px;
  height: 128px;
  margin: 0 auto 24px;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tagline {
  margin: 12px auto 0;
  max-width: 28ch;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink-soft);
}

.stores {
  margin-top: 32px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  padding: 10px 20px 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  text-align: left;
  box-shadow: var(--shadow);
}

.store-button:hover {
  color: #ffffff;
  background: #000000;
}

.store-button svg {
  flex: none;
  width: 28px;
  height: 28px;
}

.store-button .store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-button .store-small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.store-button .store-big {
  font-size: 20px;
  font-weight: 700;
}

/* Not live yet: remove aria-disabled from a button once its store link works. */
.store-button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.coming-soon {
  display: inline-block;
  margin: 16px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--ink-brown);
  font-size: 15px;
  font-weight: 600;
}

.features {
  list-style: none;
  margin: 32px 0 64px;
  padding: 8px 24px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.features li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.features li:last-child {
  border-bottom: 0;
}

.features strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.features span {
  color: var(--ink-soft);
}

/* ---------- Header (legal pages, 404) ---------- */

.site-header {
  padding: 24px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

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

.legal {
  padding-top: 32px;
  padding-bottom: 64px;
}

.legal h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.updated {
  margin: 8px 0 32px;
  color: var(--muted);
  font-weight: 600;
}

.legal h2 {
  margin: 48px 0 12px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--ink);
  scroll-margin-top: 16px;
}

.legal h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink-brown);
}

.legal p,
.legal li {
  color: var(--ink);
}

.legal ul,
.legal ol {
  padding-left: 24px;
}

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

.legal .in-short {
  font-style: italic;
  color: var(--ink-soft);
}

.legal .caps {
  font-size: 15px;
}

.card {
  margin: 24px 0;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.toc ol {
  margin: 0;
  padding-left: 24px;
}

.toc li + li {
  margin-top: 4px;
}

.toc a {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.legal table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.legal th,
.legal td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal thead th {
  background: var(--tint);
  color: var(--ink-brown);
  font-weight: 700;
}

.legal tbody tr:last-child td {
  border-bottom: 0;
}

.address {
  font-style: normal;
}

.back-to-top {
  margin-top: 48px;
  font-weight: 600;
}

/* ---------- 404 ---------- */

.not-found {
  padding-top: 64px;
  padding-bottom: 64px;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
}

.not-found p {
  color: var(--ink-soft);
  font-size: 19px;
}

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--brown);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--brown-pressed);
  color: #ffffff;
}

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

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.site-footer nav li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}

.site-footer nav a {
  font-weight: 600;
}

.site-footer p {
  margin: 0;
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .hero {
    padding-top: 96px;
  }

  .app-icon {
    width: 160px;
    height: 160px;
    border-radius: 36px;
  }

  .hero h1 {
    font-size: 64px;
  }

  .tagline {
    font-size: 26px;
  }

  .legal h1 {
    font-size: 48px;
  }

  .card {
    padding: 32px;
  }
}
