/* Zirve static legal & account pages (zirve.games)
 * Zero trackers, zero cookies, zero external resources.
 * System typography, WCAG AA contrast, responsive mobile-first layout,
 * native light and dark (alpine midnight) color schemes.
 */

:root {
  --bg: #f7f9fc;
  --bg-top: #ebf3fa;
  --surface: #ffffff;
  --surface-subtle: #edf3f9;
  --ink: #111827;
  --ink-muted: #49576d;
  --border: #d7e1ec;
  --border-strong: #b8c9dc;
  --accent: #0d66a3;
  --accent-hover: #094f80;
  --accent-soft: #e3f1fc;
  --warn-bg: #fff3ef;
  --warn-border: #e4a795;
  --warn-ink: #992e1d;
  --draft-bg: #fef7e4;
  --draft-border: #dfbe68;
  --draft-ink: #644606;
  --header-bg: rgba(247, 249, 252, 0.9);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);

  /* Strict 3-size body scale (navbar wordmark & page h1 exempt) */
  --text-heading: 1.25rem;
  --text-body: 1rem;
  --text-sm: 0.875rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1522;
    --bg-top: #142238;
    --surface: #151f30;
    --surface-subtle: #1b283d;
    --ink: #f1f5fa;
    --ink-muted: #a6b6cc;
    --border: #25344d;
    --border-strong: #374c6e;
    --accent: #66c0f6;
    --accent-hover: #8fd3fa;
    --accent-soft: #17304a;
    --warn-bg: #2a1a19;
    --warn-border: #6f3b33;
    --warn-ink: #ffc7b2;
    --draft-bg: #272011;
    --draft-border: #6b5623;
    --draft-ink: #f3d47d;
    --header-bg: rgba(14, 21, 34, 0.9);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-body);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

/* Visually hidden language radios (pure CSS switching, works without JS) */
.lang-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#lang-tr:checked ~ .page .lang-en {
  display: none;
}

#lang-en:checked ~ .page .lang-tr {
  display: none;
}

#lang-tr:checked ~ .page .lang-opt-tr,
#lang-en:checked ~ .page .lang-opt-en {
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

#lang-tr:focus-visible ~ .page .lang-opt-tr,
#lang-en:focus-visible ~ .page .lang-opt-en {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header.is-home {
  border-bottom-color: transparent;
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1;
  flex-shrink: 0;
}

.brand svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* Segmented TR | EN switch */
.lang-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.lang-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  padding: 0.2rem 0.45rem;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-muted);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}

.lang-opt:hover {
  color: var(--ink);
}

/* Alpine horizon backdrop on home page */
.home-stage {
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}

.alpine-ridge {
  display: block;
  width: 100%;
  height: clamp(48px, 7.5vw, 92px);
  color: var(--border);
  pointer-events: none;
  margin-top: 0.25rem;
}

/* Main container */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.home-main {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

/* Headings */
h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4.6vw, 2.5rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.home-title {
  font-size: clamp(2.4rem, 6.5vw, 3.35rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.85rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: var(--text-body);
  font-weight: 650;
  line-height: 1.45;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
  max-width: 65ch;
}

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

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  max-width: 65ch;
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

li {
  margin-bottom: 0.45rem;
}

li:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 160ms var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.doc-meta {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
}

.home-intro {
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

/* Home destination list */
.dest-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.dest-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease),
    transform 180ms var(--ease);
}

.dest-link:hover {
  border-color: var(--accent);
  background-color: var(--surface);
  color: var(--ink);
}

.dest-link:hover .dest-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.dest-title {
  display: block;
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}

.dest-desc {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.5;
}

.dest-arrow {
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: transform 180ms var(--ease), color 160ms var(--ease);
}

/* Document sections */
.doc-section {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 4.5rem;
}

.doc-section:first-of-type {
  margin-top: 1.5rem;
}

/* Quick contents navigation */
.toc {
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem;
  background-color: var(--surface-subtle);
  border-radius: var(--radius-md);
}

.toc-title {
  margin: 0 0 0.55rem;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--ink);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.35rem 1.25rem;
  max-width: none;
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  font-size: var(--text-sm);
  text-decoration: none;
}

.toc-list a:hover {
  text-decoration: underline;
}

/* Key facts definition grid */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem 1.5rem;
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.fact-item dt {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

.fact-item dd {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

/* Key-value info rows (for email template, developer details) */
.detail-list {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 0.35rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:first-child {
  padding-top: 0;
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-row dt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
}

.detail-row dd {
  margin: 0;
  font-size: var(--text-body);
  color: var(--ink);
  word-break: break-word;
}

/* Provider table / responsive cards */
.provider-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  max-width: none;
  border-top: 1px solid var(--border);
}

.provider-list li {
  display: grid;
  grid-template-columns: minmax(130px, 175px) 1fr;
  gap: 0.3rem 1rem;
  padding: 0.85rem 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.provider-name {
  font-weight: 650;
  color: var(--ink);
}

.provider-desc {
  color: var(--ink);
}

/* Callouts */
.callout {
  margin: 1.1rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-subtle);
}

.callout.is-warn {
  background-color: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--ink);
}

.callout.is-warn .callout-title {
  color: var(--warn-ink);
}

.callout.is-draft {
  background-color: var(--draft-bg);
  border-color: var(--draft-border);
  color: var(--draft-ink);
  margin-top: 2rem;
}

.callout-title {
  font-weight: 650;
  margin: 0 0 0.3rem;
}

/* Highlight placeholders for owner / legal review */
.placeholder {
  background-color: var(--draft-bg);
  color: var(--draft-ink);
  border: 1px solid var(--draft-border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-weight: 600;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Primary action button (used once on delete-account email action) */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.7rem 1.2rem;
  background-color: var(--accent);
  color: #ffffff;
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.action-btn:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .action-btn {
    color: #0b1623;
  }
  .action-btn:hover {
    color: #0b1623;
  }
}

/* Menu path & friend code highlight */
.ui-path,
.friend-code {
  font-weight: 600;
  color: var(--ink);
}

.friend-code {
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Support strip on home */
.support-block {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 560px) {
  .header-inner {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }

  .header-controls {
    gap: 0.65rem;
  }

  .site-nav {
    gap: 0.65rem;
  }

  main {
    padding: 1.65rem 1rem 2.75rem;
  }

  .detail-row,
  .provider-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .dest-link {
    padding: 1.05rem 1.1rem;
  }
}

@media (max-width: 350px) {
  .header-inner {
    flex-wrap: wrap;
  }
}

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

@media print {
  .site-header,
  .toc,
  .action-btn {
    display: none;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
}
