/* Kitabook tanıtım sayfası. Renkler uygulamanın tema belirteçleridir
   (lib/core/theme/app_theme.dart); biri değişirse burası da değişir.
   Dış kaynak (font, betik, izleyici) yüklenmez. */
@font-face { font-family: Literata; src: url(/fonts/Literata.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root, :root[data-theme="classic"] {
  color-scheme: light;
  --bg: #f4eee3; --card: #fbf8f2; --line: #e6dccd; --text: #2b241d; --soft: #6b5e50;
  --accent: #b4532a; --on-accent: #fff; --shelf: #8a5a36; --edge: #6a4226; --panel: #714628;
}
:root[data-theme="sage"] {
  color-scheme: light;
  --bg: #edf0e4; --card: #f7f8f1; --line: #c9d3bb; --text: #1e2a22; --soft: #5c6b5c;
  --accent: #3b6448; --on-accent: #fff; --shelf: #ad8c5c; --edge: #7c6140; --panel: #8a7552;
}
:root[data-theme="ink"] {
  color-scheme: light;
  --bg: #f7f6f3; --card: #fff; --line: #dcdfe4; --text: #18202e; --soft: #59606e;
  --accent: #26437a; --on-accent: #fff; --shelf: #d6cfc2; --edge: #6f675b; --panel: #c2bcb0;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #1b1613; --card: #261f1a; --line: #3d3229; --text: #f1e7da; --soft: #b3a592;
  --accent: #d8875a; --on-accent: #1b1613; --shelf: #563a27; --edge: #33231a; --panel: #432d20;
}
:root[data-theme="navy"] {
  color-scheme: dark;
  --bg: #131a27; --card: #1b2436; --line: #2e3a52; --text: #ece7da; --soft: #a3adbf;
  --accent: #d8b25e; --on-accent: #141b2a; --shelf: #52302a; --edge: #34201e; --panel: #422824;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 Inter, system-ui, sans-serif;
  overflow-x: clip;
  transition: background-color .35s, color .35s;
}
a { color: var(--accent); text-underline-offset: .18em; }
h1, h2 { font-family: Literata, Georgia, serif; font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(70rem, 100% - 2.5rem); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; font: 700 1.2rem Literata, Georgia, serif; color: inherit; text-decoration: none; }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: .55rem; display: block; }
.lang { padding: .6rem 0; }

/* --- Raf: sayfanın ilk ekranı ------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(1.5rem, 6vw, 5rem); padding-top: clamp(.5rem, 2vw, 1.5rem); }
.copy { align-self: start; max-width: 38rem; padding-top: clamp(0rem, 2vw, 1.5rem); }
.copy .lead { max-width: 33rem; margin-top: 1.25rem; font-size: 1.15rem; color: var(--soft); text-wrap: pretty; }
.soon { margin-top: 1.25rem; color: var(--accent); font-weight: 650; }

.books { grid-column: 1; align-self: end; display: flex; align-items: flex-end; gap: 4px; padding: 2.25rem 0 0; margin: 0; }
.tabs { display: flex; align-items: flex-end; gap: 4px; }
.spine {
  appearance: none; border: 0; margin: 0; padding: .95rem 0; cursor: pointer;
  writing-mode: vertical-rl; display: flex; align-items: center; justify-content: flex-start;
  font: 650 1.02rem/1 Literata, Georgia, serif; white-space: nowrap;
  width: var(--w); height: var(--h); background-color: var(--c); color: var(--ink, #fff8ec);
  border-radius: 4px 4px 1px 1px;
  background-image: linear-gradient(90deg, rgb(0 0 0 / .26), rgb(255 255 255 / .16) 14%, rgb(255 255 255 / 0) 42%, rgb(0 0 0 / .2));
  box-shadow: inset 0 3px rgb(255 255 255 / .2);
  transition: transform .28s cubic-bezier(.2, .8, .3, 1.2);
}
.spine:hover { transform: translateY(-8px); }
.spine[aria-selected="true"] { transform: translateY(-22px); box-shadow: inset 0 3px rgb(255 255 255 / .2), 0 14px 12px -8px rgb(0 0 0 / .45); }
/* Rafın ortasında yatık duran yığın (uygulamadaki yarım raflar gibi). */
.pile { flex: none; display: flex; flex-direction: column; align-items: center; margin-left: clamp(1rem, 5vw, 4.5rem); }
.pile i {
  display: block; width: var(--w); height: var(--h); background-color: var(--c); border-radius: 2px 4px 4px 2px; margin-top: 2px; margin-left: var(--x);
  background-image: linear-gradient(rgb(255 255 255 / .2), rgb(255 255 255 / 0) 40%, rgb(0 0 0 / .22));
}

.phone {
  grid-column: 2; grid-row: 1 / span 2; align-self: end; justify-self: end; z-index: 1;
  width: clamp(15rem, 25vw, 19.5rem);
  border: .55rem solid #17120e; border-radius: 2rem; overflow: hidden; background: #17120e;
  box-shadow: 0 0 0 1px var(--line), 0 1.2rem 1.6rem -1rem rgb(0 0 0 / .55);
}
.phone img { width: 100%; height: auto; display: block; border-radius: 1.45rem; }
.board { position: relative; height: 22px; background: var(--shelf); box-shadow: inset 0 -7px var(--edge), 0 12px 14px -6px rgb(0 0 0 / .35); transition: background-color .35s; }
.caption { min-height: 6.5rem; padding: 1.75rem 0 0; max-width: 38rem; }
.caption strong { font: 700 1.2rem Literata, Georgia, serif; display: block; margin-bottom: .2rem; }
.caption p { color: var(--soft); }

/* --- Barkoddan rafa ------------------------------------------------------ */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem) 0; }
.scan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.scan p, .lend p, .themes p { margin-top: 1rem; color: var(--soft); max-width: 34rem; text-wrap: pretty; }
.morph { display: flex; align-items: flex-end; height: 15rem; border-bottom: 14px solid var(--shelf); box-shadow: 0 7px var(--edge); overflow: hidden; transition: border-color .35s; }
.morph i { flex: var(--f) 0 0; height: var(--h); background: var(--c); margin-right: var(--m); }
.morph i.b { border-radius: 4px 4px 0 0; background-image: linear-gradient(90deg, rgb(0 0 0 / .26), rgb(255 255 255 / .16) 16%, rgb(255 255 255 / 0) 45%, rgb(0 0 0 / .2)); }

/* --- Temalar -------------------------------------------------------------- */
.themes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.themes .phone { grid-column: 1; grid-row: 1; align-self: center; justify-self: start; }
.picker { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.picker button {
  appearance: none; cursor: pointer; min-height: 3rem; padding: .5rem 1.1rem .5rem .6rem; display: flex; align-items: center; gap: .65rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: 600 1rem Inter, system-ui, sans-serif;
}
.picker button[aria-pressed="true"] { border-color: var(--accent); }
.picker span { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: linear-gradient(90deg, var(--a) 50%, var(--b) 50%); border: 1px solid rgb(128 128 128 / .45); }

/* --- Ödünç ---------------------------------------------------------------- */
.lend { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.slip { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; display: flex; gap: 1.1rem; align-items: center; transition: background-color .35s, border-color .35s; }
.slip + .slip { margin-top: .75rem; }
.slip i { flex: none; width: 3.6rem; height: 5.4rem; border-radius: 4px; background: var(--c); box-shadow: 0 6px 10px -3px rgb(0 0 0 / .45); }
.slip strong { font: 700 1.15rem Literata, Georgia, serif; display: block; color: var(--text); }
.slip div { color: var(--soft); font-size: 1rem; line-height: 1.5; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2.5rem; margin: 0; border-top: 1px solid var(--line); padding-top: 2rem; }
.facts dt { font: 700 1.1rem Literata, Georgia, serif; }
.facts dd { margin: .25rem 0 0; color: var(--soft); }

footer { margin-top: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; padding-block: 1.75rem 2.5rem; color: var(--soft); }
footer a, footer span { padding: .4rem 0; }
footer span { margin-right: auto; }

/* --- Gizlilik metni -------------------------------------------------------- */
.doc { max-width: 44rem; padding-top: clamp(1rem, 3vw, 2rem); }
.doc h1 { font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.08; }
.doc h2 { font-size: 1.4rem; margin: 2.5rem 0 .6rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc p + p, .doc ul + p { margin-top: .9rem; }
.doc ul { padding-left: 1.25rem; margin: .6rem 0 0; }
.doc li { margin: .45rem 0; }
.doc .meta { color: var(--soft); margin: .5rem 0 1.5rem; }

@media (max-width: 60rem) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 47.9rem) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero { display: block; }
  .books { position: relative; padding: 2.75rem 0 0; margin-bottom: calc(22px + 2.25rem); }
  .books::after {
    content: ""; position: absolute; top: 100%; left: -1.25rem; right: -1.25rem; height: 22px;
    background: var(--shelf); box-shadow: inset 0 -7px var(--edge), 0 12px 14px -6px rgb(0 0 0 / .35);
  }
  .pile { margin-left: auto; }
  .pile i { width: calc(var(--w) * .6); height: calc(var(--h) * .85); }
  .hero .phone { margin: 0 auto; }
  .caption { min-height: 0; padding-top: 1.5rem; }
  .phone { width: min(16.5rem, 78vw); }
  .scan, .themes, .lend { grid-template-columns: minmax(0, 1fr); }
  .themes .phone { grid-row: auto; justify-self: center; }
  .morph { height: 11rem; }
  .spine { font-size: .98rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; scroll-behavior: auto !important; }
}
