/*
 * Tanitim sitesinin duzeni.
 *
 * Sinif adlari ve iskelet Fyrbolt'un sitesinden (app/webHub/public/styles.css);
 * renk ve tipografi sabitleri BURADA TANIMLI DEGIL, hepsi theme.css'ten geliyor.
 *
 * public/ altinda ve <link> ile yukleniyor: ust bar, alt bar, butonlar ve
 * tipografi statik yasal sayfalarda (/legal/*.html) da kullaniliyor. Paketlenmis
 * olsaydi o stillerin legal.css'e KOPYALANMASI gerekirdi.
 */

* {
  box-sizing: border-box;
}

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

a {
  color: var(--primary);
}

h1,
h2,
h3 {
  margin: 0;
}

p {
  margin: 0;
}

/* ── Duzen ─────────────────────────────────────────────────────────────── */

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section {
  padding: 100px 0;
}

.section-tight {
  padding: 40px 0 100px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 64px;
}

.section-head-narrow {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Tipografi ─────────────────────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* Basliktaki vurgulu kelime ("deck"): uygulamanin ana rengi. */
.display em,
.title em {
  font-style: normal;
  color: var(--primary);
}

.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h2);
  line-height: 1.1;
}

.subtitle {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h4);
  line-height: 1.1;
}

.heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h3);
  line-height: 1.1;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-card);
  line-height: 1.2;
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.6;
}

.lead-sm {
  font-size: var(--text-lead-sm);
  line-height: 1.6;
}

.eyebrow {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.muted {
  color: var(--muted);
}

.text-sm {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.text-xs {
  font-size: var(--text-xs);
  line-height: 1.5;
}

.text-2xs {
  font-size: var(--text-2xs);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Ust bar ───────────────────────────────────────────────────────────── */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 96px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lead);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

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

.nav-link {
  position: relative;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 8px;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.is-active {
  color: var(--text);
  font-weight: 800;
}

/* Uygulamadaki navbar gibi: etkin sekmenin altinda turuncu kisa cizgi. */
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── Butonlar ──────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button-sm {
  padding: 10px 20px;
  font-size: var(--text-xs);
  border-radius: var(--radius);
}

.button-lg {
  padding: 16px 40px;
}

.button-block {
  display: flex;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-button);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, black);
}

.button-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-card);
  font-weight: 700;
}

.button-outline:hover {
  border-color: var(--primary);
}

.button-signin {
  background: var(--primary-app);
  color: var(--on-primary);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  box-shadow: var(--shadow-button);
}

.button-signin:hover {
  background: color-mix(in srgb, var(--primary-app) 88%, black);
}

/* Henuz indirilemeyen paketler icin. Baglanti DEGIL, bu yuzden imlec de yok. */
.button-disabled {
  background: transparent;
  border-color: var(--border-card);
  color: var(--muted);
  cursor: default;
  font-weight: 700;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ── Giris bolumu ──────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    var(--bg-grad-mid) 60%,
    var(--bg-grad-end) 100%
  );
  padding: 100px 0 120px;
}

.hero-centered {
  padding: 120px 0 160px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-copy {
  display: flex;
  flex: 1 0 0;
  min-width: 0;
  flex-direction: column;
  gap: 32px;
}

.hero-copy .lead {
  max-width: 36ch;
}

.hero-art {
  position: relative;
  flex: 1 0 0;
  min-width: 0;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
 * Telefonun arkasindaki yelpaze: uygulamanin uc kart rengi. Gorsel dosya yerine
 * CSS, cunku renkler zaten belirtec olarak var ve tema degisirse birlikte degisir.
 */
.hero-fan {
  position: absolute;
  width: 300px;
  height: 420px;
  border-radius: 28px;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.hero-fan-task {
  background: color-mix(in srgb, var(--task) 22%, white);
  transform: translate(-50%, -50%) translateX(-120px) rotate(-12deg);
}

.hero-fan-habit {
  background: color-mix(in srgb, var(--habit) 22%, white);
  transform: translate(-50%, -50%) translateX(120px) rotate(12deg);
}

.hero-device {
  position: relative;
  width: 300px;
  height: 540px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-frame);
  border-radius: var(--radius-device);
  box-shadow: var(--shadow-device);
  background: var(--bg);
}

/* ── Kartlar ───────────────────────────────────────────────────────────── */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

/* Dort ozellik: 4 / 2 / 1 sutun. auto-fit 3+1 birakip son karti yalniz kaliyordu. */
.card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Ozellik kartlarinin ust seridi: uygulamadaki kartlarin sol seridinin web karsiligi. */
.card[data-accent] {
  border-top: 5px solid var(--card-accent, var(--primary));
}

.card[data-accent='task'] { --card-accent: var(--task); }
.card[data-accent='habit'] { --card-accent: var(--habit); }
.card[data-accent='shopping'] { --card-accent: var(--shopping); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-accent, var(--primary)) 12%, white);
  color: var(--card-accent, var(--primary));
  flex-shrink: 0;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-label {
  font-size: var(--text-xs);
  font-weight: 700;
}

.rule {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border-card);
}

.card .button-block {
  margin-top: auto;
}

/* ── Indirme sayfasi ───────────────────────────────────────────────────── */

.platform-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 720px;
}

.platform-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.platform-card > a,
.platform-card.is-disabled {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

.platform-card > a:hover {
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.platform-card.is-disabled {
  opacity: 0.6;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--icon-bg-solid);
  color: var(--primary);
  flex-shrink: 0;
}

.platform-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 0 0;
  min-width: 0;
}

.platform-label {
  color: var(--muted);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.platform-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lead-sm);
}

.badge {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 8px;
  border: 1px solid var(--border-card);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--text-3xs);
  white-space: nowrap;
}

.platform-card:has(.badge) .platform-name {
  padding-right: 84px;
}

/* ── Masaustu sayfasi ──────────────────────────────────────────────────── */

.version-badge {
  align-self: center;
  padding: 12px 24px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 700;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
}

/* ── Kapanis cagrisi ───────────────────────────────────────────────────── */

.final-cta {
  background: linear-gradient(to bottom, var(--bg), var(--bg-grad-soft));
  padding: 120px 0;
}

.final-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.final-cta-inner .lead-sm {
  max-width: 720px;
}

/* ── Dil secici ────────────────────────────────────────────────────────── */

.language-picker select {
  appearance: none;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}

.language-picker select:hover {
  color: var(--text);
  border-color: var(--primary);
}

.language-picker option {
  background: var(--surface);
  color: var(--text);
}

/* Ust bardaki kompakt surum: kure + iki harf + ok (bkz. LanguagePicker.tsx). */
.language-picker-compact {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.language-picker-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.language-picker-code {
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 800;
}

.language-picker-compact select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.language-picker-compact:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* ── Alt bar ───────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.site-footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
}

.site-footer-columns {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xs);
  color: var(--text);
}

.footer-column a {
  color: var(--muted);
  font-size: var(--text-2xs);
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--primary);
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-3xs);
}

/* ── Dar ekran ─────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  :root {
    --page-pad: 40px;
    --text-hero: 48px;
    --text-h1: 42px;
    --text-h2: 34px;
    --text-h3: 32px;
    --text-h4: 28px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-art {
    width: 100%;
    height: 460px;
  }

  .card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --page-pad: 16px;
    --text-hero: 38px;
    --text-h2: 28px;
    --text-h3: 26px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero-centered {
    padding: 64px 0 80px;
  }

  .site-nav {
    display: none;
  }

  .site-header-inner {
    min-height: 72px;
    gap: 12px;
  }

  .site-header-actions {
    gap: 12px;
  }

  .hero-art {
    height: 400px;
  }

  .hero-device {
    width: 220px;
    height: 400px;
  }

  .hero-fan {
    width: 200px;
    height: 300px;
  }

  .hero-fan-task {
    transform: translate(-50%, -50%) translateX(-80px) rotate(-12deg);
  }

  .hero-fan-habit {
    transform: translate(-50%, -50%) translateX(80px) rotate(12deg);
  }

  .cta-row {
    flex-direction: column;
    align-self: stretch;
  }

  .cta-row .button {
    width: 100%;
  }

  .card,
  .notice {
    padding: 24px;
  }

  .platform-grid,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .site-footer-brand {
    width: 100%;
  }

  .site-footer-columns {
    gap: 32px;
  }
}
