/* ─────────────────────────────────────────────────────────────────────────────
   Sim4App public site — shared stylesheet.

   Served from the vhost DocumentRoot (/www/wwwroot/sim4.app/public). The vhost
   sets `Cache-Control: immutable, max-age=31536000` on every *.css request, so
   this file is cached by browsers for a year. It is NOT content-hashed, which
   means the ONLY way to ship a change is to bump the `?v=` query string in the
   <link> tag of every page that loads it (index.html, support.html,
   privacy.html). Forget that and returning visitors keep the old CSS.

   Bilingual pages work without JavaScript: each page ships both language
   variants in the markup and `html[data-lang]` decides which one is painted.
   The attribute is hard-coded to `en` in the HTML, so with JS disabled the
   English copy shows and the Turkish copy stays hidden.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ──────────────────────────────────────────────────────────
   Mirrors the mobile app's Lumina palette (mobile/lib/core/theme/lumina.dart)
   so the site and the app read as one product. */
:root {
  color-scheme: light dark;

  --navy: #001f35;
  --navy-soft: #14344e;
  --navy-deep: #001322;
  --accent: #ff7a45;

  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-alt: #f0f6fc;
  --border: #e0ecf8;
  --text: #1a1c1c;
  --text-muted: #43474d;
  --link: #0a4c78;
  --on-navy: #ffffff;
  --on-navy-muted: #accaea;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --page: 1080px;
  --prose: 760px;
  --shadow: 0 1px 2px rgba(0, 31, 53, 0.06), 0 10px 30px rgba(0, 31, 53, 0.07);
  --shadow-sm: 0 1px 2px rgba(0, 31, 53, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b131b;
    --surface: #141f2a;
    --surface-alt: #1c2a37;
    --border: #27384a;
    --text: #dce6f0;
    --text-muted: #afbdcb;
    --link: #8cc2ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img,
svg {
  max-width: 100%;
}

ul,
ol {
  padding-inline-start: 1.35em;
}

li + li {
  margin-top: 0.4em;
}

code {
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

/* Visible keyboard focus everywhere, including inside the navy header. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Layout helpers ───────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section--alt {
  background: var(--surface-alt);
}

.section__head {
  max-width: var(--prose);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section__head h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
}

.section__head p {
  color: var(--text-muted);
  margin-top: 0.6em;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8em;
}

/* Skip link: keyboard users reach the content without walking the nav. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  left: 0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--on-navy);
}

.site-header a {
  color: var(--on-navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-inline-end: auto;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-navy-muted);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-navy);
}

.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-navy);
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--on-navy-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  cursor: pointer;
}

.lang-switch button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-navy);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--on-navy);
  color: var(--navy);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 55%, var(--navy-deep) 100%);
  color: var(--on-navy);
  padding-block: clamp(52px, 8vw, 104px);
}

.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  max-width: 20ch;
}

.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  color: var(--on-navy-muted);
  max-width: 56ch;
  margin-top: 1em;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.hero__badges li {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #2a0d00;
}

.btn--primary:hover {
  background: #ff8f61;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--on-navy);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--outline {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--navy-soft);
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.note {
  margin-top: 22px;
  font-size: 0.92rem;
  color: var(--on-navy-muted);
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.5em;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.15rem;
}

/* Numbered steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.steps li {
  counter-increment: step;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 700;
  margin-bottom: 14px;
}

.steps strong {
  display: block;
  margin-bottom: 0.35em;
}

.steps span {
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* Contact channel cards */
.channel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel .btn {
  align-self: flex-start;
  margin-top: 6px;
}

.channel__meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Page header (support / privacy) ──────────────────────────────────────── */
.page-head {
  background: var(--navy);
  color: var(--on-navy);
  padding-block: clamp(40px, 6vw, 72px);
}

.page-head h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
}

.page-head p {
  color: var(--on-navy-muted);
  max-width: 62ch;
  margin-top: 0.7em;
  margin-bottom: 0;
}

.page-head .eyebrow {
  color: var(--accent);
}

/* ── Prose (legal text) ───────────────────────────────────────────────────── */
.prose {
  max-width: var(--prose);
}

.prose h2 {
  font-size: 1.28rem;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  padding-top: 0.9em;
  border-top: 1px solid var(--border);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2:first-of-type {
  margin-top: 1.4em;
}

.prose h3 {
  font-size: 1.03rem;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.prose ul,
.prose ol {
  margin-bottom: 1em;
}

.prose .callout {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-block: 1.4em;
}

.prose .callout p:last-child {
  margin-bottom: 0;
}

.updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2em;
}

/* Table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 2.4em;
}

.toc h2 {
  font-size: 0.8rem !important;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 0.8em !important;
}

.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* Data table */
.table-scroll {
  overflow-x: auto;
  margin-block: 1.4em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94rem;
  background: var(--surface);
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-alt);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq {
  max-width: var(--prose);
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 10px;
}

.faq details[open] {
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding-block: 14px;
  list-style-position: inside;
}

.faq summary::marker {
  color: var(--accent);
}

.faq details > :not(summary) {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.faq details > *:last-child {
  margin-bottom: 16px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-muted);
  padding-block: 40px;
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--on-navy);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer p {
  margin: 0;
}

/* ── Bilingual visibility ─────────────────────────────────────────────────── */

/* Inside the nav rows the language wrapper must not become a flex item itself,
   otherwise both links share one `gap` slot. `display: contents` dissolves the
   wrapper so the anchors are laid out directly by the flex container. The
   hiding rule below is more specific, so it still wins for the inactive
   language — keep it last. */
.site-nav [data-lang-block],
.site-footer nav [data-lang-block] {
  display: contents;
}

html[data-lang="en"] [data-lang-block="tr"],
html[data-lang="tr"] [data-lang-block="en"] {
  display: none;
}
