/* MasalUyku — warm ink + coral, melatonin-friendly */

:root {
  --bg: #1A1612;
  --surface: #252018;
  --surface-2: #2E2820;
  --text: #F5F1ED;
  --text-muted: #B4A89E;
  --text-soft: #8A7E73;
  --accent: #D97757;
  --accent-soft: #E8A87C;
  --border: #3A3328;
  --moon: #F5DEB3;
  --max-w: 760px;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text",
               system-ui, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(26, 22, 18, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
}

header.site .moon-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 222, 179, 0.18);
  font-size: 16px;
}

header.site nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

header.site nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

h1 {
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin-bottom: 16px;
}

h2 {
  font-size: 26px;
  line-height: 1.3;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  margin: 24px 0 8px;
  font-weight: 600;
}

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

.lead {
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

.muted { color: var(--text-muted); }
.soft  { color: var(--text-soft); font-size: 14px; }

ul, ol {
  margin: 12px 0 18px 22px;
}

li { margin: 6px 0; }

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

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

.app-store-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--moon);
  color: #1A1612;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  margin: 12px 0 28px;
  transition: filter 0.15s ease;
}

.app-store-cta:hover { filter: brightness(0.95); color: #1A1612; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.card .icon {
  font-size: 22px;
  margin-bottom: 10px;
  display: block;
}

.card h3 { margin-top: 0; font-size: 17px; }

.card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

.steps {
  counter-reset: step;
  margin: 16px 0;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: 14px 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(217, 119, 87, 0.15);
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th { color: var(--text-muted); font-weight: 600; }

code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

.toc {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0 24px;
  font-size: 14.5px;
}

.toc ol { margin-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 20px 36px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  margin-top: 60px;
}

footer.site nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

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

@media (max-width: 480px) {
  header.site nav { gap: 12px; font-size: 13px; }
  .wrap { padding-top: 24px; }
}
