/* TopbisGo web — tokens are the semantic roles from docs/DESIGN-SYSTEM.md.
   Follows system appearance, same as the app (userInterfaceStyle: automatic). */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/montserrat-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/montserrat-600.woff2') format('woff2');
}

:root {
  --bg: #F2F5F7;
  --surface: #FFFFFF;
  --text: #0E1113;
  --text-secondary: #3F494F;
  --border: #E6EDF1;
  --primary: #CC3F13;
  --wordmark: #D84415;
  --badge-bg: #0E1113;
  --badge-border: #0E1113;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1113;
    --surface: #1B2126;
    --text: #F2F5F7;
    --text-secondary: #A1B0B9;
    --border: #2A3138;
    --primary: #FF764A;
    --wordmark: #FF764A;
    --badge-bg: #0E1113;
    --badge-border: #3F494F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---- landing ---- */
main.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}
.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: linear-gradient(160deg, #E65C2F 0%, #D84415 60%, #CC3F13 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(216, 68, 21, 0.28);
}
.app-icon svg { width: 56px; height: auto; display: block; }
.wordmark {
  margin: 1.5rem 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--wordmark);
}
.landing h1 {
  margin: 1.75rem 0 0;
  max-width: 22ch;
  font-size: clamp(1.5rem, 4.5vw, 2.125rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}
.claim-en {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 2.5rem;
}
.badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 10px;
  padding: 0.55rem 1.1rem 0.6rem;
  color: #FFFFFF;
  text-decoration: none;
  text-align: left;
  min-width: 12.5rem;
}
.badge .glyph { width: 26px; height: 26px; flex: none; }
.badge .lines { display: flex; flex-direction: column; }
.badge .pre {
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.badge .store { font-size: 1.0625rem; font-weight: 600; line-height: 1.25; }
.badge-hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ---- legal document pages ---- */
header.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.doc-header .home {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--wordmark);
  text-decoration: none;
}
.doc-header .lang-switch { font-size: 0.875rem; }
main.doc {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.doc h1 { font-size: 1.75rem; font-weight: 500; line-height: 1.3; }
.doc h2 { font-size: 1.25rem; font-weight: 500; margin-top: 2rem; }
.doc h3 { font-size: 1.0625rem; font-weight: 600; margin-top: 1.5rem; }
.doc p, .doc li { font-size: 0.9375rem; line-height: 1.65; }
.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.doc th, .doc td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.doc th { background: var(--surface); font-weight: 600; }

/* ---- footer (shared) ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.6rem;
  row-gap: 0.25rem;
}
footer a { text-decoration: none; }
footer a:hover, footer a:focus-visible { text-decoration: underline; }
footer .sep { color: var(--border); }
footer .copyright { font-size: 0.8125rem; }
