/* ==========================================================================
   Yoonverse — Editorial Beige Design System
   ========================================================================== */
:root {
  --bg: #f6f1e8;
  --bg-soft: #efe7da;
  --surface: #fffdf9;
  --ink: #1d1b18;
  --ink-soft: #4a453e;
  --muted: #7d766b;
  --line: #e2d8c8;
  --accent: #c0532a;
  --accent-soft: #f4dccf;
  --olive: #4f5d3f;
  --olive-soft: #e3e6d6;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29,27,24,.04), 0 12px 32px -12px rgba(29,27,24,.12);
  --ease: cubic-bezier(.16,1,.3,1);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Grain overlay for a paper feel */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
h3 { font-size: 1.6rem; }
em.accent, .accent { color: var(--accent); font-style: italic; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--olive);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 620px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,241,232,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--serif); font-size: 1.65rem; text-decoration: none; display: flex; align-items: center; gap: .45rem; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-size: 1rem; font-family: var(--serif); font-style: italic;
}
.nav-links { display: flex; gap: 2.1rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after, .nav-links a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--accent);
}
.menu-btn { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px auto; transition: .3s var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem;
  border-radius: 999px; font-weight: 600; font-size: .93rem; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: transform .3s var(--ease), background .2s, box-shadow .3s; font-family: var(--sans);
}
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(29,27,24,.5); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 4rem; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin: 1.2rem 0 1.5rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero-note { margin-top: 1.6rem; font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: .6rem; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 4px var(--olive-soft); }

/* Hero visual: mock SERP card */
.serp {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); position: relative; animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-10px); } }
.serp-search {
  display: flex; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: 999px;
  padding: .65rem 1rem; font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.4rem; background: var(--bg);
}
.serp-search .cursor { width: 1px; height: 16px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.serp-result { padding: .9rem 0; border-top: 1px dashed var(--line); }
.serp-result:first-of-type { border-top: 0; }
.serp-url { font-size: .76rem; color: var(--olive); }
.serp-title { font-family: var(--serif); font-size: 1.25rem; color: #1a3d8f; line-height: 1.25; }
.serp-desc { font-size: .82rem; color: var(--muted); }
.serp-result.top { position: relative; }
.rank-badge {
  position: absolute; right: 0; top: .9rem; background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px;
}
.serp-bar { height: 8px; border-radius: 4px; background: var(--bg-soft); margin-top: .45rem; }
.serp-bar.w60 { width: 60%; } .serp-bar.w80 { width: 80%; } .serp-bar.w45 { width: 45%; }
.float-chip {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: .6rem .9rem; font-size: .8rem; font-weight: 600; box-shadow: var(--shadow); display: flex; gap: .5rem; align-items: center;
}
.float-chip.c1 { top: -18px; left: -24px; animation: floaty 6s ease-in-out infinite reverse; }
.float-chip.c2 { bottom: -20px; right: -16px; animation: floaty 8s ease-in-out infinite; }
.float-chip .up { color: var(--olive); }

/* ---------- Marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 1.1rem 0; background: var(--bg-soft); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: scroll 38s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: 1.5rem; white-space: nowrap; color: var(--ink-soft); display: flex; align-items: center; gap: 3rem; }
.marquee-track span::after { content: '✦'; color: var(--accent); font-size: 1rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.section-head h2 { margin-top: .8rem; max-width: 640px; }

/* Topic cards */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.topic {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .3s; position: relative; overflow: hidden;
}
.topic:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #d4c6b0; }
.topic-num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.topic h3 { margin: 1.4rem 0 .6rem; }
.topic p { color: var(--ink-soft); font-size: .95rem; }
.topic-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center;
  position: absolute; top: 1.6rem; right: 1.6rem; font-size: 1.3rem; transition: transform .4s var(--ease), background .3s;
}
.topic:hover .topic-icon { transform: rotate(-8deg) scale(1.08); background: var(--accent-soft); }

/* Split / philosophy */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.quote-card {
  background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: 3rem; position: relative;
}
.quote-card blockquote { font-family: var(--serif); font-size: 2rem; line-height: 1.2; }
.quote-card cite { display: block; margin-top: 1.5rem; font-style: normal; font-size: .85rem; color: #b8afa1; }
.quote-card::before { content: '“'; position: absolute; top: -.2rem; right: 1.6rem; font-family: var(--serif); font-size: 7rem; color: var(--accent); line-height: 1; }
.checklist { list-style: none; margin-top: 1.8rem; display: grid; gap: .9rem; }
.checklist li { display: flex; gap: .8rem; align-items: start; color: var(--ink-soft); }
.checklist li::before {
  content: '✓'; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--olive-soft);
  color: var(--olive); font-size: .75rem; font-weight: 700; display: grid; place-items: center; margin-top: .15rem;
}

/* Blog cards */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post-card { text-decoration: none; display: flex; flex-direction: column; group: card; }
.post-thumb {
  aspect-ratio: 16/11; border-radius: var(--radius); overflow: hidden; position: relative; margin-bottom: 1.2rem;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.post-thumb .glyph { font-family: var(--serif); font-size: 4.5rem; font-style: italic; transition: transform .6s var(--ease); }
.post-card:hover .glyph { transform: scale(1.12) rotate(-4deg); }
.t1 { background: linear-gradient(135deg, #f4dccf, #ecc7b3); color: var(--accent); }
.t2 { background: linear-gradient(135deg, #e3e6d6, #cfd5bb); color: var(--olive); }
.t3 { background: linear-gradient(135deg, #ece3d3, #ddcfb7); color: var(--ink); }
.t4 { background: linear-gradient(135deg, #e6dff0, #d3c8e3); color: #5b4a7d; }
.t5 { background: linear-gradient(135deg, #dfe9ec, #c4d7dc); color: #2f5d68; }
.t6 { background: linear-gradient(135deg, #f1e4c9, #e6d2a6); color: #8a6420; }
.post-meta { font-size: .78rem; color: var(--muted); display: flex; gap: .7rem; align-items: center; margin-bottom: .5rem; }
.tag { background: var(--bg-soft); border: 1px solid var(--line); padding: .15rem .6rem; border-radius: 999px; font-weight: 600; color: var(--ink-soft); }
.post-card h3 { font-size: 1.5rem; transition: color .2s; }
.post-card:hover h3 { color: var(--accent); }
.post-card p { color: var(--ink-soft); font-size: .93rem; margin-top: .5rem; }

/* Newsletter / CTA */
.cta {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 4rem; text-align: center;
  position: relative; overflow: hidden;
}
.cta::before, .cta::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.cta::before { width: 280px; height: 280px; background: var(--accent-soft); top: -100px; left: -60px; }
.cta::after { width: 260px; height: 260px; background: var(--olive-soft); bottom: -110px; right: -40px; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { max-width: 640px; margin: 1rem auto; }
.cta p { color: var(--ink-soft); max-width: 520px; margin: 0 auto; }
.subscribe { display: flex; gap: .6rem; max-width: 460px; margin: 2rem auto 0; }
.subscribe input {
  flex: 1; padding: .85rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  font: inherit; font-size: .93rem; color: var(--ink); outline: none; transition: border-color .2s;
}
.subscribe input:focus { border-color: var(--ink); }
.form-msg { margin-top: 1rem; font-size: .88rem; color: var(--olive); min-height: 1.3em; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 5rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); margin: 1rem 0; max-width: 820px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); background: linear-gradient(160deg, #e9dcc7, #d8c4a5);
  display: grid; place-items: center; position: sticky; top: 100px; border: 1px solid var(--line); overflow: hidden;
}
.portrait span { font-family: var(--serif); font-style: italic; font-size: 9rem; color: rgba(29,27,24,.75); }
.portrait::after {
  content: 'SEO Strategist'; position: absolute; bottom: 1.2rem; left: 1.2rem; background: var(--surface);
  padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.prose { font-size: 1.07rem; color: var(--ink-soft); }
.prose p { margin-bottom: 1.3rem; }
.prose h2 { font-size: 2.2rem; color: var(--ink); margin: 2.8rem 0 1rem; }
.prose h3 { font-size: 1.55rem; color: var(--ink); margin: 2rem 0 .7rem; }
.prose ul, .prose ol { margin: 0 0 1.4rem 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose code { background: var(--bg-soft); padding: .1rem .4rem; border-radius: 5px; font-size: .9em; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1.4rem; margin: 2rem 0;
  font-family: var(--serif); font-size: 1.6rem; color: var(--ink); line-height: 1.3;
}
.callout { background: var(--olive-soft); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin: 1.8rem 0; color: var(--ink); font-size: .98rem; }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0 2rem; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.3rem; }
.value strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; margin-bottom: .3rem; }
.value p { margin: 0; font-size: .92rem; }

/* Blog list filter */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.chip {
  padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: .87rem; font-weight: 500; cursor: pointer; color: var(--ink-soft); transition: .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.post-card.hide { display: none; }
.featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; text-decoration: none;
  margin-bottom: 4rem; padding-bottom: 4rem; border-bottom: 1px solid var(--line);
}
.featured .post-thumb { margin: 0; aspect-ratio: 16/10; }
.featured h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: .6rem 0 1rem; transition: color .2s; }
.featured:hover h2 { color: var(--accent); }
.featured p { color: var(--ink-soft); }

/* Article */
.article-head { padding: 4.5rem 0 2.5rem; text-align: center; }
.article-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 860px; margin: 1.2rem auto; }
.article-head .post-meta { justify-content: center; }
.article-body { max-width: 720px; margin: 0 auto; padding-bottom: 4rem; }
.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0; z-index: 200; }
.back-link { display: inline-flex; gap: .4rem; text-decoration: none; font-size: .88rem; color: var(--muted); }
.back-link:hover { color: var(--ink); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.3rem 1.5rem; margin-bottom: 2.5rem; }
.toc strong { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }
.toc ol { margin: .7rem 0 0 1.2rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.contact-list { list-style: none; display: grid; gap: 1.2rem; margin-top: 2rem; }
.contact-list li { border-top: 1px solid var(--line); padding-top: 1rem; }
.contact-list small { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list span { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; font-size: .95rem; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 4rem 0 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--muted); font-size: .92rem; max-width: 300px; margin-top: 1rem; }
.footer-grid h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.footer-grid ul { list-style: none; display: grid; gap: .55rem; }
.footer-grid ul a { text-decoration: none; font-size: .93rem; color: var(--ink-soft); }
.footer-grid ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .83rem; color: var(--muted); flex-wrap: wrap; gap: 1rem; }
.big-word { font-family: var(--serif); font-size: clamp(4rem, 15vw, 12rem); line-height: .9; text-align: center; color: var(--bg-soft); margin-top: 2rem; user-select: none; -webkit-text-stroke: 1px var(--line); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .about-grid, .contact-grid, .featured { grid-template-columns: 1fr; gap: 2.5rem; }
  .topics, .posts { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portrait { position: static; max-width: 380px; }
  .serp { max-width: 480px; }
}
@media (max-width: 680px) {
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li a { display: block; padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .menu-btn { display: block; }
  .nav .btn { display: none; }
  .topics, .posts, .values { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .cta { padding: 2.5rem 1.4rem; }
  .subscribe { flex-direction: column; }
  .float-chip { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
