/*
 * Minnak sitesi stilleri.
 * Renkler uygulamanın paletinden (src/theme/palette.ts) birebir alınmıştır; palet değişirse burası da güncellenir.
 * Harici font yok: yuvarlak hatlı sistem fontu varsa o, yoksa sistem fontu.
 */

:root {
  /* Palet (src/theme/palette.ts) */
  --earth: #6b4a2e;
  --earth-dark: #3a2618;
  --earth-deep: #24170e;
  --earth-muted: #5a3f28;
  --amber: #f2a93b;
  --honey: #f7c873;
  --cream: #fff6e3;
  --cream-light: #fffbf2;
  --sand: #ead9b8;
  --sand-dark: #d9c3a0;
  --leaf: #6fae5a;
  --sky: #7fbce6;

  /* Roller: açık tema */
  --bg: var(--cream);
  --surface: var(--cream-light);
  --soil: var(--sand);
  --line: var(--sand-dark);
  --text: var(--earth-dark);
  --text-muted: var(--earth-muted);
  --link: var(--earth);
  --accent: var(--amber);
  --on-accent: var(--earth-deep);
  --badge-bg: var(--earth-dark);
  --badge-fg: var(--cream);
  --focus: var(--earth);
  --note-bg: var(--honey);
  --note-fg: var(--earth-deep);

  /* Ölçüler */
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-l: 2rem;
  --gutter: 1rem;
  --measure: 40rem;
  --wide: 64rem;
  --dur: 160ms;

  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', 'Quicksand', 'Comfortaa', Calibri,
    'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--earth-deep);
    --surface: var(--earth-dark);
    --soil: var(--earth-dark);
    --line: var(--earth-muted);
    --text: var(--cream);
    --text-muted: var(--sand);
    --link: var(--honey);
    --accent: var(--amber);
    --on-accent: var(--earth-deep);
    --badge-bg: var(--cream);
    --badge-fg: var(--earth-deep);
    --focus: var(--honey);
    --note-bg: var(--earth-muted);
    --note-fg: var(--cream);
  }
}

@media (min-width: 40rem) {
  :root {
    --gutter: 1.5rem;
  }
}

/* ---------- Temel ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.25rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.2em;
}

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

[hidden] {
  display: none !important;
}

/* Dil blokları: JS kapalıyken ikisi de görünür. */
html.js[data-lang='tr'] [data-only='en'],
html.js[data-lang='en'] [data-only='tr'] {
  display: none !important;
}

/* Dil seçici JS gerektirir. */
html:not(.js) .lang-switch {
  display: none;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--badge-bg);
  color: var(--badge-fg);
  border-radius: var(--radius-s);
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap-narrow {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

/* ---------- Üst şerit ---------- */

.site-header {
  padding: 1rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand::before {
  /* Küçük amber nokta: yumurta. Maskot değil. */
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 0.7em;
  margin-right: 0.4em;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent);
  vertical-align: -0.02em;
}

.lang-switch {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch button {
  min-width: 2.75rem;
  min-height: 2.25rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- Ana sayfa ---------- */

.hero {
  padding: 1.5rem 0 3rem;
}

.hero .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 34rem;
}

.hero .uses,
.platforms {
  color: var(--text-muted);
}

.platforms {
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

@media (min-width: 48rem) {
  .hero {
    padding: 3rem 0 4.5rem;
  }
  .hero .wrap {
    grid-template-columns: 1.15fr 1fr;
    gap: 3rem;
  }
  .figure-placeholder {
    max-width: 22rem;
  }
}

/* Karakter görseli için yer tutucu. Gerçek görsel gelince <img> ile değiştirilir. */
.figure-placeholder {
  margin: 0;
  aspect-ratio: 4 / 5;
  max-width: min(18rem, 100%);
  width: 100%;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Toprak: ana sayfanın alt kısmı yeraltı gibi kum rengi bir zemine iner. */
.soil {
  background: var(--soil);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  padding: 3rem 0 1rem;
}

.soil section {
  padding-bottom: 2.5rem;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.steps h3 {
  margin: 0.35rem 0 0.2rem;
}

.steps p {
  margin: 0;
}

.aside-note {
  max-width: var(--measure);
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
}

.promises {
  display: grid;
  gap: 0;
  margin: 0;
}

.promises div {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.promises dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.promises dd {
  margin: 0;
}

@media (min-width: 40rem) {
  .promises {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
}

.measure {
  max-width: var(--measure);
}

/* ---------- Mağaza düğmeleri ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 9.5rem;
  min-height: 3.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-m);
  background: var(--badge-bg);
  color: var(--badge-fg);
  text-decoration: none;
  line-height: 1.2;
  transition: transform var(--dur) ease;
}

a.store:hover {
  transform: translateY(-1px);
}

.store-note {
  font-size: 0.75rem;
  opacity: 0.85;
}

.store-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.store.is-soon {
  background: transparent;
  color: var(--text-muted);
  border: 2px dashed var(--line);
}

.store.is-soon .store-note {
  opacity: 1;
  font-weight: 700;
}

/* ---------- Akıllı bağlantı sayfaları, 404 ---------- */

.link-page {
  padding: 2rem 0 3rem;
}

.link-page .wrap {
  max-width: calc(34rem + 2 * var(--gutter));
}

.link-page .stores {
  margin-bottom: 2rem;
}

.status {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-m);
  background: var(--note-bg);
  color: var(--note-fg);
}

.status p {
  margin: 0;
}

.status p + p {
  margin-top: 0.35rem;
}

.status a {
  color: inherit;
}

.status-title {
  font-weight: 700;
}

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

/* ---------- Hukuki metinler ---------- */

.prose {
  padding: 1rem 0 3rem;
}

.prose h1 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.draft-banner {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-m);
  background: var(--note-bg);
  color: var(--note-fg);
  font-weight: 700;
}

/* [İnceleme] notları: hukuki incelemede karar verilecek yerler. Yayından önce kaldırılır. */
.review {
  display: block;
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-size: 0.9rem;
}

html:not(.js) .lang-section + .lang-section {
  /* JS kapalıyken iki dil alt alta görünür; aralarını ayırır. */
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ---------- Alt şerit ---------- */

.site-footer {
  padding: 1.5rem 0 2rem;
  background: var(--soil);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer.plain {
  background: transparent;
  border-top: 1px solid var(--line);
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.site-footer a {
  color: var(--text);
}

.site-footer p {
  margin: 0.25rem 0 0;
}

/* ---------- Hareket ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  a.store:hover {
    transform: none;
  }
}
