/*
 * Site stylesheet. System fonts only, light and dark schemes through
 * prefers-color-scheme, logical properties so Arabic (dir="rtl") mirrors
 * without extra rules. Colors meet WCAG AA contrast on their backgrounds.
 *
 * Colors are the P3 brand palette (brand/paleta/paleta.json, the tokens of the
 * app DesignSystem module). Rules from brand/paleta/PALETA.md:
 * - --brand (orange) is for graphics and backgrounds only; text on it is
 *   --on-brand (dark), never white (white on the orange is 3.12:1).
 * - Orange as text (links, emphasis) and small shapes on light cards use
 *   --brand-text, which passes AA on --bg and --surface in both schemes.
 * - --accent (violet) draws the focus ring, so focus never looks like a link.
 * Contrast (light / dark): --brand-text on --surface 4.64 / 7.51,
 * --on-brand on --brand 5.61 / 6.12, --accent on --bg 10.78 / 7.02,
 * --muted on --surface 6.35 / 7.23.
 */
:root {
  --bg: #FFFFFF;
  --surface: #F5F2EF;
  --text: #1C1917;
  --muted: #5F5750;
  --brand: #FF5A1F;
  --on-brand: #1C1917;
  --brand-text: #C2410C;
  --accent: #3B1FA8;
  --border: #DCD6D0;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0C0B;
    --surface: #1C1917;
    --text: #F7F3EF;
    --muted: #AFA59C;
    --brand: #FF6A2A;
    --on-brand: #1C1917;
    --brand-text: #FF8A55;
    --accent: #9C8BFF;
    --border: #3A3430;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

:lang(ar) body, body:lang(ar) {
  font-family: system-ui, -apple-system, "SF Arabic", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif;
  line-height: 1.8;
}

:lang(ja) body, body:lang(ja) {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  word-break: auto-phrase;
  line-break: strict;
}

.wrap { max-inline-size: 60rem; margin-inline: auto; padding-inline: 1.25rem; }

a { color: var(--brand-text); text-underline-offset: 0.15em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -4rem; padding: 0.5rem 1rem; background: var(--brand); color: var(--on-brand); border-radius: 8px; z-index: 2; }
.skip:focus { inset-block-start: 1rem; }

.top { border-block-end: 1px solid var(--border); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 0.875rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; font-size: 1.125rem; text-decoration: none; }
.logo rect { fill: var(--brand); }
.logo .mark { fill: var(--on-brand); }

.lang summary { cursor: pointer; padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); }
.lang ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0.75rem 0 0; padding: 0; }
.lang a[aria-current="page"] { color: var(--text); font-weight: 700; text-decoration: none; }

main { padding-block: 2rem 3rem; }

h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-block: 0 1rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin-block: 2.25rem 0.75rem; }
h3 { font-size: 1.125rem; line-height: 1.3; margin-block: 1.5rem 0.4rem; }

.lead { font-size: 1.1875rem; color: var(--muted); max-inline-size: 42rem; }
.hero { padding-block: 1.5rem 1rem; }

.store { display: inline-block; margin-block-start: 0.5rem; padding: 0.75rem 1.4rem; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; }
.store.soon { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* Screenshot placeholder: a plain, clearly labelled box until real app captures exist. */
.placeholder { display: grid; place-items: center; min-block-size: 14rem; margin-block: 2rem; padding: 1.5rem; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.features li { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); }
.features h3 { margin-block-start: 0.5rem; }
.features p { margin: 0; color: var(--muted); }
/* Icons sit on --surface cards, where the plain orange is below 3:1 in the light scheme. */
.icon { color: var(--brand-text); }

.note { margin-block-start: 2.5rem; padding: 1.25rem 1.5rem; border-inline-start: 4px solid var(--brand); background: var(--surface); border-radius: var(--radius); }
.note h2 { margin-block-start: 0; }

.doc { max-inline-size: 46rem; }
.doc ul { padding-inline-start: 1.25rem; }
.meta { color: var(--muted); font-size: 0.9375rem; }

.nf { list-style: none; padding: 0; }
.nf li { margin-block: 0.5rem; }

.foot { border-block-start: 1px solid var(--border); color: var(--muted); font-size: 0.9375rem; }
.foot .wrap { padding-block: 1.5rem 2rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.foot a[aria-current="page"] { color: var(--text); font-weight: 600; }
.impressum h2 { font-size: 1.125rem; margin-block-start: 0; }
.impressum address { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
