/* ───────────────────────────────────────────────────────────
   TesbihApp website – shared styles
   Colours mirror the app (src/theme.ts): slate/zinc + blue.
   Light/dark is automatic via light-dark(); boot.js sets
   data-theme so the toggle can override the system setting.
   ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  --bg: light-dark(#f4f6fb, #0b0b0e);
  --surface: light-dark(rgb(255 255 255 / 0.66), rgb(255 255 255 / 0.05));
  --surface-solid: light-dark(#ffffff, #19191d);
  --line: light-dark(rgb(15 23 42 / 0.09), rgb(255 255 255 / 0.09));
  --line-strong: light-dark(rgb(15 23 42 / 0.14), rgb(255 255 255 / 0.16));

  --text: light-dark(#0f172a, #f5f5f7);
  --text-2: light-dark(#334155, #cfcfd6);
  --muted: light-dark(#5f6b7d, #9c9ca6);

  --accent: light-dark(#2563eb, #6aa8ff);
  --accent-2: light-dark(#6366f1, #a78bfa);
  --ink: light-dark(#18181b, #f1f5f9);
  --on-ink: light-dark(#ffffff, #18181b);

  --shadow-lg: 0 1px 0 rgb(255 255 255 / 0.5) inset, 0 30px 60px -24px rgb(15 23 42 / 0.28);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
}
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --shadow-lg: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 30px 60px -24px rgb(0 0 0 / 0.7);
}

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

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

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* One language visible at a time (only pages marked data-i18n switch in place;
   the legal pages are separate per-language URLs). */
html[data-i18n][lang="en"] [lang="tr"],
html[data-i18n][lang="tr"] [lang="en"] {
  display: none !important;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Background ─────────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 46% at 82% 34%, light-dark(rgb(99 102 241 / 0.2), rgb(79 70 229 / 0.3)), transparent 72%),
    radial-gradient(42% 40% at 6% 4%, light-dark(rgb(56 189 248 / 0.2), rgb(14 165 233 / 0.14)), transparent 72%),
    radial-gradient(60% 40% at 50% 112%, light-dark(rgb(37 99 235 / 0.14), rgb(37 99 235 / 0.22)), transparent 72%),
    var(--bg);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: light-dark(0.5, 0.7);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Header ─────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(14px, 2.2dvh, 24px) clamp(18px, 5vw, 72px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8.5px;
  box-shadow: 0 4px 12px -4px rgb(15 23 42 / 0.45);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.seg > :is(button, a) {
  appearance: none;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
}
.seg > :is(button, a):hover {
  color: var(--text);
}
.seg > :is([aria-pressed="true"], [aria-current="page"]) {
  background: var(--ink);
  color: var(--on-ink);
}

.icon-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.icon-btn:hover {
  border-color: var(--line-strong);
  transform: rotate(-12deg);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .i-sun {
  display: none;
}
:root[data-theme="dark"] .icon-btn .i-sun {
  display: block;
}
:root[data-theme="dark"] .icon-btn .i-moon {
  display: none;
}

/* ── Footer ─────────────────────────────────────────────── */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(18px, 5vw, 72px) clamp(16px, 2.6dvh, 28px);
  color: var(--muted);
  font-size: 13px;
}
.foot nav {
  display: flex;
  gap: 20px;
}
.foot a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.foot a:hover {
  color: var(--text);
}

/* ── Headings with the serif accent word ─────────────────── */
h1 em,
h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.1em;
  padding-right: 0.04em;
}

/* ── Document pages (privacy, support) ───────────────────── */
.doc {
  flex: 1 0 auto;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(20px, 6dvh, 64px) clamp(18px, 5vw, 72px) 72px;
}
.doc h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.045em;
}
.doc h1 em {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-lg);
}

.tldr {
  margin: 36px 0 12px;
  padding: clamp(20px, 3vw, 30px);
}
.tldr h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.tldr p {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 560;
}
.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: light-dark(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.04));
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
}
.ticks svg {
  width: 18px;
  height: 18px;
  flex: none;
  padding: 3px;
  border-radius: 50%;
  background: var(--accent);
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sec {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px clamp(24px, 5vw, 56px);
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.sec:first-of-type {
  margin-top: 28px;
}
.sec h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.sec p,
.sec li {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
}
.sec > div > :last-child {
  margin-bottom: 0;
}
.sec ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.sec li {
  margin-bottom: 4px;
  padding-left: 2px;
}
.sec li::marker {
  color: var(--accent);
}
.sec strong {
  color: var(--text);
  font-weight: 600;
}

/* Support page */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin: 36px 0 28px;
  padding: clamp(20px, 3vw, 30px);
}
.contact p {
  margin: 0;
  max-width: 50ch;
  color: var(--text-2);
  text-wrap: pretty;
}
.contact p strong {
  display: block;
  margin-bottom: 4px;
  text-wrap: balance;
  color: var(--text);
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 10px 24px -10px rgb(15 23 42 / 0.5);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq {
  margin-top: 8px;
}
.faq h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(var(--text), var(--text)) center / 10px 1.6px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 1.6px 10px no-repeat,
    var(--surface);
  border: 1px solid var(--line-strong);
  transition:
    transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1),
    background-size 0.3s;
}
.faq details[open] summary::after {
  transform: rotate(135deg);
}
.faq .answer {
  padding: 0 40px 22px 0;
  max-width: 64ch;
  color: var(--text-2);
}
.faq .answer p {
  margin: 0 0 10px;
}
.faq .answer p:last-child {
  margin-bottom: 0;
}

/* 404 */
.lost {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.lost h1 {
  margin: 0;
  font-size: clamp(64px, 16vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 650;
}
.lost p {
  margin: 0;
  color: var(--muted);
}

/* ── Small screens ──────────────────────────────────────── */
@media (max-width: 720px) {
  .sec {
    grid-template-columns: 1fr;
    padding: 24px 0;
  }
  .sec h2 {
    font-size: 17px;
  }
  .faq .answer {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
