/* NostalgiCam website: shared layout and components (hand-written).
   Every colour comes from the custom properties in palette.css, which is
   generated (do not edit it by hand). Load palette.css before this file. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* Brand accent strip across the top of every page. */
body::before {
  content: "";
  flex: none;
  height: 4px;
  background: var(--gradient);
}

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

a {
  color: var(--brand-fg);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  color: var(--fg);
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.25rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.35em;
}

h2 {
  font-size: 1.3rem;
  margin: 2.2em 0 0.55em;
}

h3 {
  font-size: 1.08rem;
  margin: 1.7em 0 0.4em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.4em;
}

strong {
  color: var(--fg);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

.container {
  width: 100%;
  max-width: 760px; /* 720px text column + gutters */
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  flex: none;
  width: 32px;
  height: 32px;
}

/* ---------- Main ---------- */

main {
  flex: 1 0 auto;
  padding-top: 36px;
  padding-bottom: 64px;
}

.page-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5em;
}

.lead {
  font-size: 1.125rem;
}

.callout {
  background: var(--brand-tint);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0 0 1.75em;
}

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

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

.callout h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5em;
}

/* "On this page" table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 0 0 2em;
}

.toc h2 {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.6em;
}

.toc ol,
.toc ul {
  margin: 0;
  padding-left: 1.4em;
}

.toc li {
  margin: 0 0 0.3em;
}

@media (min-width: 640px) {
  .toc ol,
  .toc ul {
    columns: 2;
    column-gap: 40px;
  }

  .toc li {
    break-inside: avoid;
  }
}

/* ---------- Tables (third-party services) ---------- */

.table-wrap {
  margin: 1.25em 0 1.75em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
}

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

thead th {
  background: var(--surface-alt);
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody th {
  color: var(--fg);
  font-weight: 600;
}

.provider {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.services thead th:nth-child(1) { width: 20%; }
.services thead th:nth-child(2) { width: 36%; }
.services thead th:nth-child(3) { width: 25%; }

.services td ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.services td li + li {
  margin-top: 0.3em;
}

/* On phones each row becomes a card; td::before shows the column name. */
@media (max-width: 640px) {
  .stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .stack,
  .stack tbody,
  .stack tr,
  .stack th,
  .stack td {
    display: block;
    width: 100%;
  }

  .stack tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 0;
    margin-bottom: 12px;
  }

  .stack th,
  .stack td {
    border: 0;
    padding: 6px 16px;
  }

  .stack tbody th {
    font-size: 1.05rem;
    padding-top: 8px;
  }

  .stack td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
}

/* ---------- Buttons and store badges ---------- */

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
}

.button:hover {
  filter: brightness(1.08);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 1em;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 160px;
  padding: 9px 18px 10px;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
  line-height: 1.2;
  text-align: left;
}

.badge small {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.badge b {
  font-size: 1.15rem;
  font-weight: 600;
}

/* ---------- Landing page ---------- */

.hero {
  text-align: center;
  padding-top: 56px;
}

.app-icon {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--seed) 35%, transparent));
}

.hero h1 {
  font-size: clamp(2.25rem, 1.8rem + 2.4vw, 3rem);
  margin-bottom: 0.1em;
}

.tagline {
  color: var(--brand-fg);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.4rem);
  font-weight: 600;
  margin-bottom: 1.1em;
}

.hero .lead {
  max-width: 34em;
  margin-inline: auto;
}

.coming-soon {
  color: var(--fg);
  font-weight: 600;
  text-wrap: balance;
  margin: 2em 0 0.9em;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  list-style: none;
  padding: 0;
  margin: 2.25em 0 0;
}

.link-row li {
  margin: 0;
}

/* ---------- Short notice pages (404, open-in-app) ---------- */

.notice {
  text-align: center;
  padding-top: 48px;
}

.notice .app-icon {
  width: 96px;
  height: 96px;
}

.notice p {
  max-width: 32em;
  margin-inline: auto;
}

.notice .button {
  margin-top: 0.75em;
}

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .container {
  padding-top: 22px;
  padding-bottom: 30px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  color: var(--body);
}

.site-footer p {
  margin: 0;
}

.site-footer .fine-print {
  margin-top: 6px;
  font-size: 0.8rem;
}
