/* Mimhar – Website. Reines CSS, keine externen Schriften, keine Frameworks.
   Farben aus tigrinya_app/lib/core/theme/app_theme.dart (Brand, appTheme).
   Hell/Dunkel per prefers-color-scheme. */

:root {
  color-scheme: light dark;

  /* Fläche und Text (appTheme, hell) */
  --bg: #fff8e7;
  --surface: #ffffff;
  --fill: #f3e8d2;
  --line: #eadfc8;
  --text: #3b2f2f;
  --muted: #725e52;

  /* Marke */
  --amber: #cc6d05;
  --link: #9c5000;          /* Amber als Textfarbe, ≥ 4,5:1 auf --bg */
  --btn-bg: #b35f00;        /* Skip-Link: weiße Schrift darauf ≥ 4,5:1 */
  --btn-edge: #7d4200;
  --btn-fg: #ffffff;
  --focus: #1e6fc0;

  --green: #059669;
  --blue: #1e88e5;
  --purple: #8e5cf0;
  --teal: #0d9488;
  --red: #e53935;

  /* Platzhalter und Entwurfs-Kasten */
  --ph-bg: #ffe08a;
  --ph-fg: #4a2b00;
  --ph-line: #b87300;
  --draft-bg: #fdecea;
  --draft-fg: #5a1010;
  --draft-line: #c62828;

  --radius: 1.25rem;
  --shadow: 0 0.25rem 0 var(--line);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI",
    Roboto, "Noto Sans", "Noto Sans Ethiopic", Nyala, Kefa, "Abyssinica SIL",
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #130e0a;
    --surface: #1f1812;
    --fill: #2a2018;
    --line: #3a2e24;
    --text: #f6ebdd;
    --muted: #c4b3a3;

    --link: #f0a04b;
    --btn-bg: #f0a04b;
    --btn-edge: #a8631a;
    --btn-fg: #2a1600;
    --focus: #7ab8ff;

    --ph-bg: #5c4300;
    --ph-fg: #ffe9b0;
    --ph-line: #e0a63a;
    --draft-bg: #3a1412;
    --draft-fg: #ffd9d5;
    --draft-line: #ff8a80;

    --shadow: 0 0.25rem 0 #000;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font);
  overflow-wrap: anywhere;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.2rem;
  border-radius: 0.375rem;
}

/* Skip-Link */
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  border-radius: 0.75rem;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

/* ───── Kopfzeile ───── */

.site-header {
  padding-block: 1rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--fill);
}

.site-nav a[aria-current="page"] {
  background: var(--fill);
  box-shadow: inset 0 -0.15rem 0 var(--amber);
}

.site-nav .lang {
  border: 0.125rem solid var(--line);
}

/* ───── Inhalt ───── */

main {
  padding-block: 1rem 3.5rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  font-weight: 800;
  margin-top: 2.2em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.6em;
}

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

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 36rem;
}

/* Hero */
.hero {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: center;
  padding-block: 1.5rem 1rem;
}

.hero h1 {
  margin-top: 0.3rem;
}

.hero .greet {
  margin: 0;
  color: var(--link);
  font-size: 1.4rem;
  font-weight: 700;
}

.hero-art {
  justify-self: center;
  width: min(70%, 20rem);
  animation: bob 4.5s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-0.5rem) rotate(1.5deg);
  }
}

@media (min-width: 46rem) {
  .hero {
    grid-template-columns: 1.3fr 1fr;
  }
  .hero-art {
    width: min(100%, 22rem);
  }
}

/* Karten */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.card,
.panel {
  background: var(--surface);
  border: 0.125rem solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.25rem 1.25rem 1.1rem;
}

.card h3 {
  margin: 0.6rem 0 0.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 0.2rem 0 rgb(0 0 0 / 0.18);
}

.c-amber { background: var(--amber); }
.c-green { background: var(--green); }
.c-blue { background: var(--blue); }
.c-purple { background: var(--purple); }
.c-teal { background: var(--teal); }
.c-red { background: var(--red); }

.panel {
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}

.panel .last {
  margin-bottom: 0;
}

.more {
  margin-top: 1rem;
}

/* „Bald verfügbar“ statt Store-Badges */
.soon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  background: var(--fill);
  border: 0.1875rem dashed var(--amber);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-block: 1.5rem;
}

.soon img {
  width: 5.5rem;
  flex: none;
}

.soon strong {
  display: block;
  font-size: 1.3rem;
}

.soon div {
  flex: 1 1 14rem;
}

.soon p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Fakten-Leiste */
.facts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 0.125rem solid var(--line);
}

.facts strong {
  display: block;
  font-size: 1.15rem;
}

.facts span {
  color: var(--muted);
}

/* FAQ */
details {
  background: var(--surface);
  border: 0.125rem solid var(--line);
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}

summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  list-style-position: inside;
}

details[open] summary {
  border-bottom: 0.125rem solid var(--line);
}

details > :not(summary) {
  margin: 0;
  padding: 0.85rem 1.1rem 1rem;
}

/* Rechtstexte */
.legal {
  max-width: 44rem;
}

.legal h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}

.legal h3 {
  font-size: 1.1rem;
}

.legal li {
  margin-bottom: 0.4em;
}

.legal dt {
  font-weight: 700;
  margin-top: 1em;
}

.legal dd {
  margin: 0;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Entwurfs-Kasten: vor Veröffentlichung entfernen */
.draft {
  background: var(--draft-bg);
  color: var(--draft-fg);
  border: 0.25rem solid var(--draft-line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-block: 1rem 1.5rem;
}

.draft strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.draft p {
  margin: 0.4rem 0 0;
}

/* Platzhalter [[…]] – bewusst auffällig */
mark.ph {
  background: var(--ph-bg);
  color: var(--ph-fg);
  border: 0.0625rem dashed var(--ph-line);
  border-radius: 0.35rem;
  padding: 0.05em 0.3em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ───── Fußzeile ───── */

.site-footer {
  border-top: 0.125rem solid var(--line);
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-art {
    animation: none;
  }
}

@media print {
  .site-nav,
  .skip,
  .hero-art {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
