/* WAYEQ public website — shared styles.
   Colors are taken from the WAYEQ Flutter app theme (lib/app/theme/app_theme.dart)
   and the WAYEQ logo, not invented. */

:root {
  --bg: #FBF7F1;
  --surface: #F2EBDF;
  --surface-border: #E6DCC8;
  --text: #24302D;
  --text-muted: #5B6B65;
  --primary: #3F7A69;
  --primary-hover: #2F5F51;
  --accent: #E8823C;
  --notice-bg: #FBEFDD;
  --notice-border: #E8823C;
  --notice-text: #6B4718;
  --max-width: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #142320;
    --surface: #1B2E2A;
    --surface-border: #2B4038;
    --text: #ECE7DB;
    --text-muted: #A9B6B0;
    --primary: #79BBA7;
    --primary-hover: #93CFBC;
    --accent: #F0A868;
    --notice-bg: #2E2416;
    --notice-border: #E8823C;
    --notice-text: #F0C896;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--primary-hover);
}

.lang-block[hidden] {
  display: none !important;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 2rem;
  height: 2rem;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.lang-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  color: var(--text);
}

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

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* ---------- Home ---------- */

.home-hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.home-logo {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
}

.home-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.home-tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 1.25rem;
}

.home-description {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 34rem;
  margin: 0 auto;
}

/* ---------- Legal / content articles ---------- */

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.page-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
}

.legal-article h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
}

.legal-article h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
}

.legal-article p {
  margin: 0 0 0.85rem;
}

.legal-article ul {
  margin: 0 0 0.85rem;
  padding-inline-start: 1.4rem;
}

.legal-article li {
  margin: 0 0 0.35rem;
}

.legal-article + .lang-block .legal-article,
.legal-article {
  color: var(--text);
}

/* ---------- Notice / flag boxes ---------- */

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  color: var(--notice-text);
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

/* ---------- Simple content sections (support / delete-account) ---------- */

.content-section {
  margin: 0 0 1.75rem;
}

.content-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.content-section p,
.content-section li {
  color: var(--text);
}

.content-section ul {
  padding-inline-start: 1.4rem;
  margin: 0 0 0.85rem;
}

.email-box {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
  direction: ltr;
  unicode-bidi: isolate;
}

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

.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 1.75rem 1.25rem 2.25rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 30rem) {
  .home-name {
    font-size: 1.5rem;
  }

  .home-tagline {
    font-size: 1.05rem;
  }
}
