/*
Theme Name: Rüya Patikası
Theme URI: https://ruyapatikasi.com
Author: Rüya Patikası
Description: Çocuklar için sakin, erişilebilir ve SEO odaklı uyku masalı teması.
Version: 1.2.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: uykucu-bulut
*/

:root {
  --night: #171b4b;
  --night-soft: #252967;
  --violet: #7468d8;
  --lavender: #e9e7ff;
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #25233d;
  --muted: #6c6880;
  --peach: #ffb997;
  --mint: #9bd8c5;
  --sun: #ffd978;
  --border: rgba(37, 35, 61, 0.11);
  --shadow: 0 20px 50px rgba(32, 29, 84, 0.12);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }

.site-shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 999; background: #fff; padding: 12px 18px; border-radius: 10px; }
.skip-link:focus { top: 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 240, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--night); background: var(--sun); box-shadow: inset -8px -5px 0 rgba(255,255,255,.35); }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; white-space: nowrap; }
.site-nav > ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav a { text-decoration: none; font-weight: 650; font-size: .96rem; }
.site-nav a:hover { color: var(--violet); }
.nav-cta { padding: 10px 16px; border-radius: 999px; color: #fff !important; background: var(--night); }
.menu-toggle { display: none; border: 0; background: var(--paper); border-radius: 12px; padding: 10px 12px; color: var(--night); box-shadow: 0 4px 16px rgba(30,30,70,.08); }

.hero { overflow: hidden; color: #fff; background: var(--night); position: relative; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 360px; height: 360px; top: -210px; right: 12%; background: rgba(116,104,216,.42); filter: blur(3px); }
.hero::after { width: 260px; height: 260px; bottom: -180px; left: 4%; background: rgba(255,217,120,.14); }
.hero-grid { min-height: 650px; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 54px; padding-block: 76px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: .82rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--sun); }
.hero h1, .page-hero h1, .story-title { margin: 0; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.04em; line-height: 1.08; }
.hero h1 { max-width: 760px; font-size: clamp(3rem, 6.3vw, 5.6rem); }
.hero h1 em { color: var(--sun); font-style: normal; }
.hero-copy { max-width: 650px; margin: 24px 0 32px; color: rgba(255,255,255,.78); font-size: 1.15rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--sun); color: var(--night); box-shadow: 0 12px 30px rgba(255,217,120,.2); }
.button-ghost { border: 1px solid rgba(255,255,255,.28); color: #fff; }
.hero-art { min-height: 460px; display: grid; place-items: center; position: relative; }
.hero-art img { width: min(100%, 560px); border-radius: 46% 54% 48% 52% / 58% 44% 56% 42%; box-shadow: 0 30px 80px rgba(5,7,34,.42); }
.hero-placeholder { width: min(100%, 520px); aspect-ratio: 1.15; position: relative; border-radius: 48% 52% 42% 58% / 55% 45% 55% 45%; background: radial-gradient(circle at 62% 28%, #fff9c4 0 7%, transparent 7.5%), linear-gradient(145deg, #6c69c7, #31366f); box-shadow: 0 30px 80px rgba(5,7,34,.42); }
.hero-placeholder::before { content: "☾"; position: absolute; right: 18%; top: 8%; color: var(--sun); font-size: 8rem; line-height: 1; transform: rotate(-18deg); }
.hero-placeholder::after { content: "☁  ✦  ☁"; position: absolute; left: 14%; bottom: 22%; color: rgba(255,255,255,.84); font-size: 3rem; letter-spacing: .5rem; }

.trust-bar { background: var(--paper); border-bottom: 1px solid var(--border); }
.trust-list { width: min(calc(100% - 40px), 940px); display: grid; grid-template-columns: repeat(3, 1fr); margin-inline: auto; padding: 22px 0; list-style: none; }
.trust-list li { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; font-weight: 700; }
.trust-list li + li { border-left: 1px solid var(--border); }
.trust-icon { color: var(--violet); font-size: 1.2rem; }

.section { padding-block: 92px; }
.section-soft { background: #f2efff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.section-heading h2 { margin: 0; max-width: 700px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.1; letter-spacing: -.035em; }
.section-heading p { max-width: 490px; margin: 0; color: var(--muted); }
.text-link { color: var(--violet); font-weight: 800; text-decoration: none; }

.age-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.age-card { position: relative; overflow: hidden; min-height: 260px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 12px 30px rgba(45,39,103,.06); text-decoration: none; transition: transform .22s ease, box-shadow .22s ease; }
.age-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.age-card:nth-child(1) { background: #fff0e7; }
.age-card:nth-child(2) { background: #e9f8f2; }
.age-card:nth-child(3) { background: #ecebff; }
.age-number { display: inline-flex; align-items: baseline; gap: 4px; margin-bottom: 38px; font-family: Georgia, serif; font-size: 4.6rem; line-height: 1; color: var(--night); }
.age-number small { font: 800 .85rem/1 "Segoe UI", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.age-card h2, .age-card h3 { margin: 0 0 8px; font-family: inherit; font-size: 1.35rem; line-height: 1.3; letter-spacing: 0; }
.age-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.age-symbol { position: absolute; top: 20px; right: 24px; font-size: 2.2rem; opacity: .75; }
.age-landing { min-height: calc(100vh - 78px); padding-block: clamp(64px, 9vw, 118px); background: var(--cream); }
.age-landing-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(40px, 6vw, 88px); align-items: center; margin-bottom: 42px; }
.age-landing-heading h1 { max-width: 720px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 4.8vw, 4.1rem); line-height: .98; letter-spacing: -.045em; }
.age-landing-heading h1 span { display: block; }
.age-landing-heading p { max-width: 520px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.age-landing .age-card { min-height: 260px; }

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--paper); box-shadow: 0 10px 30px rgba(43,37,91,.06); transition: transform .2s ease, box-shadow .2s ease; }
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.story-cover { aspect-ratio: 1.55; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg, var(--lavender), #c9c6fa); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.story-cover-placeholder { font-size: 4.2rem; filter: drop-shadow(0 8px 16px rgba(48,41,110,.15)); }
.story-card:nth-child(3n+2) .story-cover { background: linear-gradient(140deg, #e5f7ef, #bce2d6); }
.story-card:nth-child(3n+3) .story-cover { background: linear-gradient(140deg, #fff1e5, #ffd1b9); }
.story-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: 999px; color: var(--night); background: var(--lavender); font-size: .74rem; font-weight: 800; text-decoration: none; }
.pill-warm { background: #fff0d4; }
.story-card h3 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 1.4rem; line-height: 1.22; }
.story-card h3 a { text-decoration: none; }
.story-card p { margin: 0 0 18px; color: var(--muted); font-size: .94rem; }
.story-card .card-link { margin-top: auto; color: var(--violet); font-weight: 800; text-decoration: none; }

.feature-panel { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: var(--radius-lg); color: #fff; background: var(--night); box-shadow: var(--shadow); }
.feature-copy { padding: clamp(34px, 6vw, 72px); }
.feature-copy h2 { margin: 0 0 18px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; }
.feature-copy p { color: rgba(255,255,255,.74); }
.feature-visual { min-height: 480px; overflow: hidden; background: linear-gradient(145deg, var(--night-soft), #4a458f); }
.feature-visual img { display: block; width: 100%; height: 100%; min-height: 480px; object-fit: cover; }
.topic-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.topic-list a { padding: 10px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 750; }

.guide-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 54px; align-items: center; }
.guide-card { padding: 36px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.guide-steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.step-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--lavender); color: var(--night); font-weight: 900; }
.guide-steps strong { display: block; margin-bottom: 3px; }
.guide-steps span { color: var(--muted); font-size: .93rem; }

.page-hero { padding-block: 80px 70px; text-align: center; background: #f0edff; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.page-hero p { max-width: 680px; margin: 18px auto 0; color: var(--muted); }
.archive-wrap { padding-block: 70px 100px; }

.story-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; gap: 60px; align-items: start; padding-block: 70px 110px; }
.story-kicker { color: var(--violet); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.story-title { margin-top: 12px; font-size: clamp(2.7rem, 6vw, 5rem); }
.story-deck { margin: 22px 0; color: var(--muted); font-size: 1.13rem; }
.story-facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 42px; }
.story-fact { padding: 9px 13px; border-radius: 12px; background: var(--paper); border: 1px solid var(--border); font-size: .85rem; font-weight: 750; }
.story-hero-image { margin: -12px 0 42px; overflow: hidden; border-radius: var(--radius-lg); background: var(--lavender); box-shadow: var(--shadow); }
.story-hero-image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.story-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.18rem; line-height: 1.9; }
.story-content > p:first-of-type::first-letter { float: left; margin: .08em .12em 0 0; color: var(--violet); font-size: 4.3rem; line-height: .78; }
.story-content h2 { margin-top: 2.2em; font-size: 1.8rem; line-height: 1.25; }
.story-content blockquote { margin: 2.2em 0; padding: 24px 28px; border-left: 4px solid var(--sun); border-radius: 0 16px 16px 0; background: #fff6df; font-style: italic; }
.parent-note { margin-top: 46px; padding: 26px; border-radius: var(--radius-md); background: #e9f8f2; }
.parent-note h2 { margin-top: 0; font-family: "Segoe UI", sans-serif; font-size: 1.15rem; }
.story-aside { position: sticky; top: 110px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--paper); }
.story-aside h2 { margin-top: 0; font-size: 1rem; }
.story-aside ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9rem; }
.page-content { width: min(calc(100% - 40px), 780px); margin: 0 auto; padding-block: 70px 110px; }
.page-content h1 { font-family: Georgia, serif; font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.1; }
.page-content h2 { margin-top: 2em; font-family: Georgia, serif; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.2; }
.page-content li + li { margin-top: .55em; }

.site-footer { padding-block: 58px 28px; color: rgba(255,255,255,.75); background: #11143d; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(2, .7fr); gap: 50px; }
.footer-brand { color: #fff; }
.footer-grid h2 { margin: 0 0 14px; color: #fff; font-size: 1rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--sun); }
.footer-bottom { margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; }

.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { min-width: 42px; min-height: 42px; display: grid; place-items: center; border-radius: 10px; background: #fff; text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--night); }
.empty-state { padding: 50px; text-align: center; border: 1px dashed rgba(37,35,61,.22); border-radius: var(--radius-lg); }

@media (max-width: 900px) {
  .hero-grid, .feature-panel, .guide-grid, .story-layout { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 64px; }
  .hero-art { min-height: 350px; }
  .age-grid, .story-grid { grid-template-columns: repeat(2, 1fr); }
  .story-aside { position: static; }
  .site-nav { display: none; position: absolute; inset: 78px 20px auto; padding: 18px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 8px; }
  .site-nav a { display: block; padding: 10px; }
  .feature-visual, .feature-visual img { min-height: 360px; }
  .age-landing-heading { grid-template-columns: 1fr; gap: 22px; }
  .age-landing-heading h1 { max-width: 620px; }
  .menu-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-shell { width: min(calc(100% - 28px), var(--max)); }
  .hero-grid { min-height: auto; gap: 34px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 3rem); }
  .hero-art { min-height: 280px; }
  .trust-list, .age-grid, .story-grid, .footer-grid { grid-template-columns: 1fr; }
  .trust-list { width: min(calc(100% - 28px), 520px); padding-block: 14px; }
  .trust-list li { justify-content: center; padding: 8px 4px; text-align: center; }
  .trust-list li + li { border-left: 0; }
  .section { padding-block: 68px; }
  .section-heading { align-items: start; flex-direction: column; }
  .feature-copy { padding: 36px 24px; }
  .feature-copy h2 { font-size: clamp(2rem, 10.5vw, 2.8rem); }
  .feature-visual, .feature-visual img { min-height: 280px; }
  .story-layout { padding-block: 50px 80px; }
  .story-title { font-size: clamp(2.35rem, 12vw, 3.2rem); overflow-wrap: anywhere; }
  .story-content { font-size: 1.08rem; }
  .page-content { width: min(calc(100% - 28px), 780px); padding-block: 52px 80px; }
  .page-content h1 { font-size: clamp(2.3rem, 12vw, 3.2rem); overflow-wrap: anywhere; }
  .footer-about { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
