/* Kodrika — shared styles for app.kodrika.com.tr */

:root {
  --ink: #212836;          /* logo navy */
  --brand: #1a8dcc;        /* logo blue */
  --brand-strong: #13699a; /* AA text on light bg */
  --brand-soft: #e6f3fb;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1b2130;
  --muted: #5b6474;
  --border: #e2e7ee;
  --shadow: 0 1px 2px rgba(33, 40, 54, .04), 0 8px 24px -12px rgba(33, 40, 54, .14);
  --shadow-hover: 0 2px 4px rgba(33, 40, 54, .05), 0 18px 40px -16px rgba(33, 40, 54, .26);
  --radius: 18px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f8;
    --brand: #4fb3ea;
    --brand-strong: #7cc6f0;
    --brand-soft: #142b3b;
    --bg: #0d1118;
    --surface: #151b25;
    --surface-2: #19202b;
    --text: #e6eaf1;
    --muted: #98a2b3;
    --border: #252e3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar .brand { line-height: 0; flex-shrink: 0; }
.topbar .brand img { height: 26px; width: auto; }
.topbar .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.topbar .back:hover { color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); color: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn.primary { color: #0d1118; }
  .btn.primary:hover { background: var(--brand); border-color: var(--brand); color: #0d1118; }
}
.btn.ghost { background: transparent; }

/* ── Home ────────────────────────────────────────────── */
.home .hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 20px 56px;
}
.home .hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 520px;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%) 30% 50% / 60% 100% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, #7c5cff 14%, transparent), transparent 70%) 75% 40% / 50% 90% no-repeat;
  pointer-events: none;
  z-index: -1;
}
.home .hero .logo { margin: 0 0 22px; line-height: 0; }
.home .hero .logo img { height: 52px; width: auto; max-width: 100%; }
.home .hero h1 {
  margin: 0 auto 14px;
  max-width: 18ch;
  font-size: clamp(30px, 5.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.home .hero h1 em { font-style: normal; color: var(--brand-strong); }
.home .hero .tagline {
  margin: 0 auto;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}
.home .hero .stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.home .hero .stats li {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.home .hero .stats strong { color: var(--ink); }

.home main { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 28px;
}
.filters button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.filters .count { opacity: .6; font-weight: 500; margin-left: 4px; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}
.app {
  --h: 205;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.app:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: hsl(var(--h) 60% 75% / .55); }
.app[hidden] { display: none; }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  background: linear-gradient(140deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 28) 70% 44%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 10px -6px rgba(33, 40, 54, .35);
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.image { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.app h2 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.app .tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--h) 55% 38%);
  background: hsl(var(--h) 80% 50% / .1);
  padding: 2px 9px;
  border-radius: 999px;
}
@media (prefers-color-scheme: dark) { .app .tag { color: hsl(var(--h) 75% 72%); background: hsl(var(--h) 80% 60% / .14); } }
.app p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.app .links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }

.home footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 48px;
}
.home footer .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
}
.home footer .cta h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.02em; }
.home footer .cta p { margin: 0; opacity: .75; font-size: 15px; }
.home footer .cta .btn { background: var(--surface); border-color: var(--surface); color: var(--ink); }
.home footer .cta .btn:hover { background: var(--brand-soft); color: var(--ink); }
.home footer .cta .btn.ghost { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 35%, transparent); }
.home footer .cta .btn.ghost:hover { border-color: var(--surface); color: var(--surface); }
.home footer .cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.legalnote { text-align: center; color: var(--muted); font-size: 13px; margin: 22px 0 0; }

/* ── Legal pages ─────────────────────────────────────── */
.legal .wrap {
  max-width: 820px;
  margin: 32px auto 0;
  padding: 0 20px;
}
.legal .sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
}
.legal h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px;
  text-wrap: balance;
}
.legal section > h1 { margin-top: 0 !important; }
.legal .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}
.legal .lang {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0;            /* hide separator dots between links */
  margin: 0 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.legal .lang a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-strong);
  background: var(--brand-soft);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background .15s;
}
.legal .lang a:hover { background: color-mix(in srgb, var(--brand) 22%, var(--brand-soft)); }

.legal section { scroll-margin-top: 80px; }
.legal h2 {
  position: relative;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 40px 0 12px;
}
.legal p, .legal li { font-size: 16px; color: var(--text); }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 4px; margin: 0 0 16px; list-style: none; }
.legal li { position: relative; padding-left: 22px; margin: 8px 0; }
.legal li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .75;
}
.legal strong { color: var(--ink); font-weight: 650; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
}

.legal .note {
  position: relative;
  background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 60%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 16px;
  padding: 18px 20px 18px 56px;
  margin: 22px 0 8px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
}
.legal .note::before {
  content: "i";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 14px/1 Georgia, serif;
  font-style: italic;
  color: var(--surface);
  background: var(--brand-strong);
}

.legal .divider {
  margin: 56px 0 40px;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent);
}

.legal .sheet > footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.legal .site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 28px 20px 48px;
}
.legal .site-foot a { color: var(--muted); }
.legal .site-foot a:hover { color: var(--brand-strong); }

/* ── Product page (Paperynth) ────────────────────────── */
.product .hero { text-align: center; padding: 64px 20px 24px; }
.product .hero img { width: 112px; height: auto; filter: drop-shadow(0 14px 22px rgba(33, 40, 54, .22)); }
.product .hero h1 { margin: 18px 0 8px; font-size: clamp(36px, 6vw, 52px); letter-spacing: -0.04em; line-height: 1.05; color: var(--ink); }
.product .hero h1 span { background: linear-gradient(90deg, #1a63d8, #2f8be6 45%, #6a3fe0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product .hero p { margin: 0 auto; max-width: 56ch; color: var(--muted); font-size: 18px; text-wrap: pretty; }
.product .hero .links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.product main { max-width: 900px; margin: 0 auto; padding: 24px 20px 40px; }
.product .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.product .features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 15px;
}
.product .features li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.product .features li strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; letter-spacing: -0.01em; }
.product .features .ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand-strong);
}
.product .features .ico svg { width: 20px; height: 20px; }
.product .privacy {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--ink); color: var(--surface);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 8px;
}
.product .privacy h2 { margin: 0 0 6px; font-size: 19px; }
.product .privacy p { margin: 0; opacity: .82; font-size: 15px; }
.product .privacy a { color: inherit; }
.product .privacy .ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 14%, transparent); }
.product .privacy .ico svg { width: 22px; height: 22px; }
.product > footer { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 20px 48px; }
.product > footer a { color: var(--muted); }

@media (max-width: 560px) {
  .topbar .brand img { height: 22px; }
  .home .hero { padding: 48px 16px 36px; }
  .home main, .home footer { padding-left: 16px; padding-right: 16px; }
  .legal .wrap { margin-top: 16px; padding: 0 12px; }
  .legal .sheet { border-radius: 18px; }
  .legal .note { padding-left: 50px; }
  .product .privacy { flex-direction: column; }
}
