@import url('fonts.css');

/* ---------------------------------------------------------------
   İlk Kelimelerim — tokens ported from constants/Colors.ts,
   constants/Theme.ts and constants/characters.ts. Accent + surface
   colours are swappable at runtime by the mascot picker (app.js),
   mirroring lib/theme.ts → useTheme().
   --------------------------------------------------------------- */
:root {
  --ink: #2B1F14;
  --ink-soft: #6B5744;
  --card: #FFFFFF;
  --hairline: rgba(43, 31, 20, 0.08);
  --shadow-sm: 0 2px 8px rgba(43, 31, 20, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 31, 20, 0.07);
  --shadow-lg: 0 24px 60px rgba(43, 31, 20, 0.10);

  /* mascot-driven — default: Bubu (bear) */
  --accent: #E97A4A;
  --accent-deep: #C85F33;
  --bg: #FAF4EB;
  --bg-soft: #F4E7DA;

  /* category colours (constants/Colors.ts → CategoryColor) */
  --c-animals: #7FB3CC;
  --c-vehicles: #F5B342;
  --c-food: #6CA678;
  --c-colors: #C48FD2;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 40px);
  --section-y: clamp(64px, 9vw, 116px);
}

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

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

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s ease;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-deep); }

h1, h2, h3, h4 { font-weight: 900; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.35; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); }
section[id] { scroll-margin-top: 92px; }
.section--soft { background: var(--bg-soft); transition: background-color .6s ease; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .6s ease;
}
.nav.is-stuck { border-bottom-color: var(--hairline); }
.nav__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav__links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav__links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 8px 12px; border-radius: var(--radius-pill); transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav__links .btn { margin-left: 6px; }
/* .nav__links a (0,1,1) .btn--primary'yi (0,1,0) eziyor — CTA yazısı beyaz kalsın. */
.nav__links a.btn--primary, .nav__links a.btn--primary:hover { color: #fff; background: var(--accent); }
@media (max-width: 860px) { .nav__links a:not(.btn) { display: none; } }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 800; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s, background-color .3s;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 0 var(--accent-deep), var(--shadow-md); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--accent-deep), var(--shadow-lg); }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-deep); }
.btn--ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--hairline); }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--sm { padding: 11px 18px; font-size: .9rem; }

/* ---------------- hero ---------------- */
.hero { padding-top: clamp(36px, 6vw, 72px); padding-bottom: var(--section-y); position: relative; }
.hero::before {
  content: ''; position: absolute; inset: -20% -30% auto -30%; height: 78%;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
  z-index: -1; pointer-events: none;
  transition: background .6s ease;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 7px 14px; border-radius: var(--radius-pill); margin-bottom: 20px;
}
.hero__lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-soft); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm);
  padding: 9px 15px; border-radius: var(--radius-pill); font-size: .87rem; font-weight: 700;
}
.chips svg { width: 15px; height: 15px; flex: none; color: var(--accent); }

/* ---------------- phone mock ---------------- */
.mock { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: min(272px, 72vw); padding: 9px;
  background: linear-gradient(160deg, #3a2c1e, #1c140d);
  border-radius: 46px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.2);
}
.phone::after {
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 82px; height: 22px; background: #100b07; border-radius: var(--radius-pill);
}
.phone img { border-radius: 38px; width: 100%; height: auto; background: var(--bg); }
.phone--tilt { transform: rotate(-2.5deg); }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--hairline);
  padding: 9px 15px 9px 9px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md); font-weight: 800; font-size: .92rem;
  animation: bob 5.5s ease-in-out infinite;
}
.float-card img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.float-card--1 { top: 9%; left: -4%; animation-delay: -.4s; }
.float-card--2 { top: 44%; right: -6%; animation-delay: -2s; }
.float-card--3 { bottom: 11%; left: -7%; animation-delay: -3.4s; }
@media (max-width: 1040px) { .float-card--1 { left: 0; } .float-card--2 { right: 0; } .float-card--3 { left: 0; } }
@media (max-width: 520px) { .float-card { display: none; } }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

/* ---------------- trust strip ---------------- */
.strip { border-block: 1px solid var(--hairline); background: var(--card); }
.strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 30px; text-align: center; }
.strip__n { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; color: var(--accent-deep); line-height: 1.1; }
.strip__l { font-size: .84rem; color: var(--ink-soft); font-weight: 700; }
@media (max-width: 700px) { .strip__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- generic grids/cards ---------------- */
.section__head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 52px); }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; }
.section__head--center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: clamp(22px, 2.4vw, 30px); box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; color: var(--accent-deep); }

/* ---------------- feature rows ---------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature:nth-of-type(even) .feature__media { order: -1; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature:nth-of-type(even) .feature__media { order: 0; }
}
.feature__media { display: flex; justify-content: center; }
.feature__media .phone { width: min(238px, 62vw); }
.feature__list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 11px; }
.feature__list li { display: flex; gap: 11px; align-items: flex-start; font-size: .97rem; color: var(--ink-soft); }
.feature__list svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.tag {
  display: inline-block; font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 12px;
}

/* ---------------- levels ---------------- */
.level { position: relative; overflow: hidden; }
.level__age {
  display: inline-block; font-size: .74rem; font-weight: 900; letter-spacing: .1em;
  padding: 6px 12px; border-radius: var(--radius-pill); margin-bottom: 14px; color: #fff;
}
.level__meta { display: flex; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.level__meta div { font-size: .84rem; color: var(--ink-soft); font-weight: 700; }
.level__meta b { display: block; font-size: 1.25rem; color: var(--ink); font-weight: 900; }

/* ---------------- mascots ---------------- */
.mascots { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.mascot-btn {
  font-family: inherit; cursor: pointer; background: var(--card);
  border: 2px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 20px 16px 16px; width: 154px; text-align: center;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), border-color .25s, box-shadow .25s;
  box-shadow: var(--shadow-sm);
}
.mascot-btn:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.mascot-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: var(--shadow-md); }
.mascot-btn svg { width: 76px; height: 76px; margin: 0 auto 10px; background: var(--tint, transparent); border-radius: 50%; }
.mascot-btn b { display: block; font-size: 1.02rem; font-weight: 900; }
.mascot-btn small { display: block; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.mascot-btn:hover svg, .mascot-btn[aria-pressed="true"] svg { animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-5px); }
}
.mascot-eye { animation: blink 5.5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96%, 98% { transform: scaleY(.12); }
}

/* ---------------- faq ---------------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 4px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-weight: 800; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; font-size: .97rem; }

/* ---------------- cta band ---------------- */
.band {
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px);
  text-align: center; box-shadow: var(--shadow-lg); transition: background .6s ease;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.9); max-width: 44em; margin-inline: auto; }
.band .btn--ghost { background: #fff; color: var(--accent-deep); box-shadow: none; border: 0; margin-top: 24px; }

/* ---------------- footer ---------------- */
.footer { background: var(--card); border-top: 1px solid var(--hairline); padding-block: 48px 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: .94rem; }
.footer a:hover { color: var(--accent-deep); text-decoration: underline; }
.footer__bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .86rem; color: var(--ink-soft);
}

/* ---------------- legal / prose pages ---------------- */
.prose { max-width: 760px; margin-inline: auto; }
/* when .prose is also the padded container, widen it so the text column stays 760px */
.container.prose { max-width: calc(760px + var(--pad) * 2); }
.prose h2 { margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h2:first-of-type { margin-top: 1em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 8px; margin-bottom: 1em; }
.prose strong { color: var(--ink); }
.callout {
  background: var(--card); border: 1px solid var(--hairline); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 22px 26px; margin: 28px 0; box-shadow: var(--shadow-sm);
}
.callout p { margin-bottom: .6em; }
.page-head { padding-block: clamp(40px, 6vw, 72px) 0; }
.page-head .eyebrow { margin-bottom: 14px; }
.updated { font-size: .88rem; color: var(--ink-soft); font-weight: 700; }
.prose .toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.prose .toc a {
  display: inline-block; background: var(--card); border: 1px solid var(--hairline);
  padding: 7px 14px; border-radius: var(--radius-pill); font-size: .86rem;
  text-decoration: none; color: var(--ink-soft); font-weight: 700;
}
.prose .toc a:hover { color: var(--accent-deep); border-color: var(--accent); }

table.plain { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .94rem; }
table.plain th, table.plain td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
table.plain th { font-weight: 900; color: var(--ink); }
table.plain td { color: var(--ink-soft); }

/* ---------------- reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }

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