/* Shared styling for the PageBite website. Colors and fonts mirror the app theme "Ton & Tinte"
   (readbyte: src/global.css). Fonts are served from this site, never from Google Fonts. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./fonts/BricolageGrotesque_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #efe7dc;
  --surface: #fbf6ee;
  --ink: #2b2420;
  --body: rgba(43, 36, 32, 0.85);
  --muted: rgba(43, 36, 32, 0.6);
  --border: rgba(43, 36, 32, 0.18);
  --primary: #c75b39;
  --primary-soft: rgba(199, 91, 57, 0.12);
  --success: #2e5e5a;
  --success-soft: rgba(46, 94, 90, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 46rem;
  margin: 0 auto;
  padding: 24px 16px 96px;
  color: var(--body);
  background: var(--bg);
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.3em;
}

h2 {
  font-size: 1.3rem;
  margin: 2.2em 0 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  margin: 1.6em 0 0.4em;
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

strong {
  color: var(--ink);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
}

/* Navigation */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--primary);
}

.nav .brand {
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-right: 8px;
}

.nav .lang {
  margin-left: auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--ink);
  background: var(--surface);
}

/* Boxes */

.note {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 16px 18px;
  margin: 1.5em 0 2em;
}

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

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

.hint {
  background: var(--success-soft);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 1.2em 0;
}

/* Tables scroll sideways on small screens instead of the page. */

.table-wrap {
  overflow-x: auto;
  margin: 1.2em 0;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 36rem;
  font-size: 0.92rem;
}

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

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

th {
  color: var(--ink);
  font-weight: 700;
  background: var(--primary-soft);
}

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

li {
  margin: 0.35em 0;
}

address {
  font-style: normal;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}

/* Start page */

.hero {
  margin: 1rem 0 2.5rem;
}

.hero h1 {
  font-size: 2.6rem;
}

.tagline {
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.4em;
}

.lede {
  font-size: 1.1rem;
  color: var(--body);
}

.platforms {
  display: inline-block;
  margin-top: 0.4em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 14px;
  margin: 1.2em 0;
}

.card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--muted);
}

/* Buttons: pill, ink border, hard shadow. Pressing moves the button onto its shadow. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.button:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.button:focus-visible,
.copy-button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.hero-actions {
  margin: 1.4rem 0 0;
}

/* Download page and creator links (assets/stores.js): phones leave for their store at once. The page stays hidden
   and only a short note with a link shows while the store opens. */

.redirect-notice {
  display: none;
  max-width: 22rem;
  margin: 28vh auto 0;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
}

.redirect-notice a {
  display: block;
  margin-top: 12px;
}

html.redirecting .page {
  display: none;
}

html.redirecting .redirect-notice {
  display: block;
}

html.redirect-ios .only-android,
html.redirect-android .only-ios,
html.platform-android .only-computer {
  display: none;
}

.stores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
  margin: 1.5rem 0;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 24px;
  text-align: center;
}

.store h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.3rem;
}

.store-name {
  margin: -8px 0 4px;
  color: var(--muted);
  font-weight: 600;
}

/* Ink QR code for the best contrast, terracotta frame for the brand (user decision 2026-09-18). */
.qr {
  display: block;
  width: 176px;
  height: 176px;
  border: 3px solid var(--primary);
  border-radius: 14px;
}

/* The official store badges, unchanged, at the same height (Apple and Google badge guidelines). */
.store-badge {
  display: inline-block;
  margin-top: 8px;
  border-radius: 8px;
  line-height: 0;
}

.store-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.store-badge:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.trademarks {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Creator link */

.creator-code {
  color: var(--primary);
  letter-spacing: 0.03em;
}

.copy-button {
  min-height: 44px;
  padding: 8px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}

.steps {
  margin: 1.4rem 0;
  padding: 18px 20px 22px;
}

.steps h2 {
  margin: 0 0 0.4em;
  padding: 0;
  border: 0;
  font-size: 1.2rem;
}

.steps .button {
  margin-top: 8px;
}
