/* ==========================================================================
   manycard26 — blog stylesheet
   ========================================================================== */

:root {
  --ink:        #0d0f1c;
  --violet:     #5b4bf5;
  --violet-lt:  #8b7cff;
  --violet-dk:  #3a2ce0;
  --gold:       #ffc65c;
  --gold-dk:    #b47b12;
  --mint:       #2fd6a5;

  --paper:      #ffffff;
  --paper-2:    #f7f7fb;
  --paper-3:    #eeeef6;
  --line:       #e2e2ee;
  --text:       #1c1e2e;
  --text-2:     #4e5268;
  --text-3:     #878ba3;

  --radius:     16px;
  --radius-sm:  10px;
  --radius-lg:  24px;
  --shadow-sm:  0 1px 2px rgba(13,15,28,.06), 0 2px 8px rgba(13,15,28,.04);
  --shadow:     0 4px 12px rgba(13,15,28,.07), 0 12px 32px rgba(13,15,28,.07);
  --ease:       cubic-bezier(.22,.61,.36,1);
  --wrap:       1160px;
  --nav-h:      68px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* --------------------------------------------------------------- reset --- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--violet-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--violet); }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: .45rem; }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  line-height: 1.2;
  letter-spacing: -.022em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2.05rem, 4.6vw, 3.15rem); letter-spacing: -.032em; line-height: 1.13; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); letter-spacing: -.028em; }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none; transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------- layout --- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap--narrow { max-width: 760px; }
.section { padding: clamp(52px, 7vw, 84px) 0; }
.section--tint { background: var(--paper-2); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- nav --- */

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(13,15,28,.05); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.14rem;
         letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand__mark {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--violet-lt), var(--violet-dk) 65%);
  display: grid; place-items: center; color: #fff;
  font-size: .78rem; font-weight: 800; letter-spacing: -.02em;
  box-shadow: 0 3px 10px rgba(91,75,245,.34);
}
.brand__mark::after { content: "m26"; }
.brand em { font-style: normal; color: var(--violet); }

.nav__links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__links a {
  padding: .5rem .85rem; border-radius: 999px; text-decoration: none;
  font-size: .95rem; font-weight: 500; color: var(--text-2);
  transition: color .16s var(--ease), background .16s var(--ease);
}
.nav__links a:hover { color: var(--ink); background: var(--paper-3); }
.nav__links a[aria-current="page"] { color: var(--violet-dk); background: rgba(91,75,245,.09); }

.nav__toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; color: var(--ink);
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  display: block; position: relative; width: 17px; height: 2px; margin-inline: auto;
  background: currentColor; border-radius: 2px;
  transition: transform .2s var(--ease), opacity .15s var(--ease);
}
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after  { top:  6px; }
.nav__toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::before { opacity: 0; }
.nav__toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-90deg); }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; inset: var(--nav-h) 0 auto; display: none;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 14px 24px 22px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; animation: drop .22s var(--ease); }
  .nav__links a { padding: .8rem .6rem; font-size: 1.02rem; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------ article header --- */

.post-head {
  padding: clamp(38px, 5vw, 64px) 0 clamp(28px, 3.5vw, 40px);
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: .87rem; color: var(--text-3); margin: 0 0 1.2rem; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--violet-dk); text-decoration: underline; }

.tag {
  display: inline-block; padding: .3rem .85rem; margin-bottom: 1.1rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-dk); background: rgba(91,75,245,.1);
  border-radius: 999px; text-decoration: none;
}
a.tag:hover { background: rgba(91,75,245,.18); }

.post-head h1 { max-width: 20ch; margin-bottom: .8rem; }
.standfirst { font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.6;
              color: var(--text-2); max-width: 62ch; margin-bottom: 1.9rem; }

.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.1rem;
          font-size: .92rem; color: var(--text-2); }
.byline__av {
  width: 42px; height: 42px; border-radius: 999px; flex: 0 0 42px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet-lt), var(--violet-dk));
  color: #fff; font-weight: 700; font-size: .92rem; letter-spacing: -.02em;
}
.byline b { color: var(--ink); font-weight: 650; }
.byline__sep { color: var(--line); }

/* ------------------------------------------------------------ article --- */

.post { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(30px, 5vw, 62px);
        padding: clamp(38px, 5vw, 62px) 0 clamp(52px, 7vw, 82px); }
@media (max-width: 940px) { .post { grid-template-columns: 1fr; } }

.rail { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: .93rem; }
@media (max-width: 940px) {
  .rail { position: static; padding: 20px 22px; background: var(--paper-2);
          border: 1px solid var(--line); border-radius: var(--radius); }
}
.rail h2 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
           color: var(--text-3); margin-bottom: .9rem; }
.rail ol, .rail ul { list-style: none; padding: 0; margin: 0; }
.rail li { margin: 0; }
.rail a { display: block; padding: .4rem .7rem; text-decoration: none;
          color: var(--text-2); border-left: 2px solid var(--line); line-height: 1.4; }
.rail a:hover { color: var(--violet-dk); background: var(--paper-2); border-left-color: var(--violet-lt); }

/* prose */
.prose { max-width: 72ch; font-size: 1.06rem; }
.prose > h2 { margin-top: 2.8rem; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9rem; }
.prose p, .prose li { color: var(--text-2); }
.prose b, .prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 1.25em; }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 3.4rem; line-height: .82;
  padding: .1em .09em 0 0; color: var(--violet-dk); font-weight: 600;
}
.prose hr { height: 1px; border: 0; background: var(--line); margin: 2.6rem 0; }

.prose figure { margin: 2rem 0; }
.prose figcaption { margin-top: .7rem; font-size: .88rem; color: var(--text-3); }

blockquote {
  margin: 2.2rem 0; padding: 4px 0 4px 26px;
  border-left: 3px solid var(--violet-lt);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.5;
  color: var(--ink); font-style: italic;
}
blockquote p { color: inherit; }
blockquote cite { display: block; margin-top: .7rem; font-family: var(--font);
                  font-size: .88rem; font-style: normal; color: var(--text-3); }

.callout {
  margin: 2rem 0; padding: 22px 24px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .99rem;
}
.callout h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.callout p { margin: 0; color: var(--text-2); }
.callout--stat { border-left-color: var(--mint); }
.callout--stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.035em;
                   color: var(--ink); line-height: 1.1; margin-bottom: .3rem; }

.prose table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: .95rem; }
.prose th, .prose td { padding: .8rem .9rem; text-align: left; border: 1px solid var(--line);
                       vertical-align: top; }
.prose th { background: var(--paper-2); color: var(--ink); font-weight: 650; }
.prose td { color: var(--text-2); }

.takeaways { margin: 2.4rem 0; padding: 26px 28px; background: rgba(91,75,245,.05);
             border: 1px solid rgba(91,75,245,.16); border-radius: var(--radius); }
.takeaways h2 { margin: 0 0 1rem; font-size: 1.12rem; }
.takeaways ul { list-style: none; padding: 0; margin: 0; }
.takeaways li { position: relative; padding-left: 1.9rem; margin: 0 0 .8rem; color: var(--text-2); }
.takeaways li:last-child { margin-bottom: 0; }
.takeaways li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 20px; height: 20px;
  border-radius: 999px;
  background: rgba(47,214,165,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6f5c' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

.post__foot { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
              display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
              font-size: .9rem; color: var(--text-3); }
.chip { display: inline-block; padding: .3rem .8rem; font-size: .84rem; color: var(--text-2);
        background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
        text-decoration: none; }
.chip:hover { border-color: var(--violet-lt); color: var(--violet-dk); }

.author {
  display: flex; gap: 18px; align-items: flex-start;
  margin-top: 2.4rem; padding: 24px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.author .byline__av { width: 54px; height: 54px; flex: 0 0 54px; font-size: 1.05rem; }
.author h3 { margin: 0 0 .3rem; font-size: 1.04rem; }
.author p { margin: 0; font-size: .94rem; color: var(--text-2); }

/* ---------------------------------------------------------- posts grid --- */

.head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 42px); }
.head h2 { margin-bottom: .4rem; }
.head p { color: var(--text-2); margin: 0; }

.posts { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.post-card {
  display: flex; flex-direction: column;
  padding: 26px 24px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3d3e6; }
.post-card .tag { margin-bottom: .9rem; font-size: .7rem; }
.post-card h3 { font-size: 1.12rem; margin-bottom: .5rem; line-height: 1.35; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { color: var(--violet-dk); }
.post-card p { font-size: .95rem; color: var(--text-2); margin: 0 0 1.1rem; }
.post-card__meta { margin-top: auto; font-size: .85rem; color: var(--text-3); }

/* --------------------------------------------------------- legal pages --- */

.legal-hero {
  padding: clamp(44px, 6vw, 72px) 0 clamp(30px, 4vw, 44px);
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .5rem; }
.legal-hero p { color: var(--text-2); margin: 0; max-width: 60ch; }

.legal { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(30px, 5vw, 62px);
         padding: clamp(38px, 5vw, 62px) 0 clamp(52px, 7vw, 82px); }
@media (max-width: 940px) { .legal { grid-template-columns: 1fr; } }
.legal .prose > p:first-of-type::first-letter { float: none; font-size: inherit; padding: 0;
  color: inherit; font-weight: inherit; font-family: inherit; line-height: inherit; }

.note {
  padding: 18px 20px; margin: 1.8rem 0;
  background: var(--paper-2); border-left: 3px solid var(--violet-lt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .95rem; color: var(--text-2);
}
.updated { display: inline-block; padding: .3rem .8rem; margin-bottom: 1.6rem;
           font-size: .82rem; font-weight: 600; color: var(--violet-dk);
           background: rgba(91,75,245,.09); border-radius: 999px; }

/* ------------------------------------------------------------- footer --- */

.footer { background: #0d0f1c; color: #8f95b6; padding: clamp(48px, 6vw, 70px) 0 28px; font-size: .95rem; }
.footer a { color: #b9bede; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: 34px; grid-template-columns: 1.7fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer .brand em { color: var(--violet-lt); }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: .55rem; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; align-items: center;
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .87rem; color: #767c9c;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }

/* ------------------------------------------------------------- motion --- */

[data-reveal] { opacity: 0; transform: translateY(16px); }
[data-reveal].is-in { opacity: 1; transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease); }

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

@media print {
  .nav, .rail, .footer__bottom, .section--tint { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .post, .legal { grid-template-columns: 1fr; }
  .prose { max-width: none; }
}
