/* Emotio — shared stylesheet for the public site.
   Colors mirror lib/utils/UI/colors.dart (ColorConstants) so the pages
   match the app. Plain static CSS — redeploy with
   `firebase deploy --only hosting` from the "cloud functions" folder. */

:root {
  --red: #F84D4D;
  --dark-blue: #1E293B;
  --light-blue: #94A3B8;
  --bg: #F5F1E7;
  --white: #FFFFFF;
  --green: #39A54D;
  --line: #E6DDC7;
  --soft: #F0E8D3;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--dark-blue);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  letter-spacing: -0.5px;
}

nav.site { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }

nav.site a {
  color: var(--dark-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

nav.site a:hover { color: var(--red); }

.langswitch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.langswitch button {
  border: 0;
  background: var(--white);
  color: var(--light-blue);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
}

.langswitch button[aria-pressed="true"] {
  background: var(--dark-blue);
  color: var(--white);
}

/* ── Content ────────────────────────────────────────────────────────── */

main { padding: 40px 0 24px; }

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 21px; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 6px; }

p, li { color: var(--dark-blue); }

.lead { color: #4b5768; font-size: 18px; margin-top: 0; }
.meta { color: var(--light-blue); font-size: 14px; margin: 0 0 28px; }

a { color: var(--red); }

ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 18px 0;
}

.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.callout {
  background: var(--soft);
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 22px 0;
}

.callout.calm { border-left-color: var(--green); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 22px 0;
}

details.faq {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: " +"; color: var(--red); }
details.faq[open] summary::after { content: " –"; }
details.faq > :last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
  margin: 6px 8px 6px 0;
}

.btn.ghost {
  background: transparent;
  color: var(--dark-blue);
  border: 1px solid var(--line);
}

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--light-blue); font-weight: 600; }
.tablewrap { overflow-x: auto; }

/* ── Footer ─────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 24px 0 44px;
  font-size: 14px;
  color: var(--light-blue);
}

footer.site a { color: var(--dark-blue); text-decoration: none; margin-right: 16px; }
footer.site a:hover { color: var(--red); }

/* ── Language toggling ──────────────────────────────────────────────── */

[data-lang="uk"] [lang="en"] { display: none; }
[data-lang="en"] [lang="uk"] { display: none; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 25px; }
  nav.site { gap: 14px; }
}
