:root {
  color-scheme: light;
  --bg-top: #fff4fb;
  --bg-mid: #f5edff;
  --bg-bottom: #ebe6f8;
  --surface: rgba(255, 255, 255, 0.88);
  --line: #dfc3ef;
  --text: #3f3155;
  --muted: #625676;
  --brand: #ff70ad;
  --brand-strong: #692e70;
  --secondary: #6ec7ff;
  --shadow-md: 0 14px 28px rgba(95, 58, 132, 0.14);
  --shadow-lg: 0 24px 48px rgba(95, 58, 132, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: "Avenir Next", "Avenir", "Helvetica Neue", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 112, 173, 0.2), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(110, 199, 255, 0.2), transparent 36%),
    radial-gradient(circle at 74% 68%, rgba(255, 255, 255, 0.16), transparent 40%);
  animation: bgDrift 18s ease-in-out infinite;
}

.page-wrap {
  width: min(1080px, 100% - 34px);
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 255, 0.68));
  backdrop-filter: blur(16px) saturate(138%);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 52px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu a {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.menu .cta-nav {
  position: relative;
  border-radius: 999px;
  padding: 9px 15px;
  color: #5a2b73;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 7px 16px rgba(95, 49, 129, 0.16);
}

.menu .cta-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, var(--brand), var(--secondary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.crumbs {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.crumbs a {
  color: var(--brand-strong);
  text-decoration: none;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  padding: 30px 24px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(132deg, rgba(255, 112, 173, 0.92), rgba(110, 199, 255, 0.88));
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(32px, 4.7vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 12px 0 0;
  max-width: 66ch;
  color: rgba(255, 255, 255, 0.96);
}

.hero-meta {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
}

.post {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 16px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 28px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(254, 250, 255, 0.92)),
    linear-gradient(120deg, rgba(255, 112, 173, 0.06), rgba(110, 199, 255, 0.06));
  backdrop-filter: blur(16px) saturate(136%);
  box-shadow:
    0 18px 40px rgba(95, 58, 132, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.72), transparent 38%),
    radial-gradient(circle at 90% 12%, rgba(210, 241, 255, 0.36), transparent 34%);
  z-index: 0;
}

.post > * {
  position: relative;
  z-index: 1;
}

.post .lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.58;
  color: #574b68;
}

.post h2 {
  margin: 30px 0 10px;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.post p {
  margin: 0;
  color: var(--muted);
}

.post p + p {
  margin-top: 12px;
}

.post ul,
.post ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.post li + li {
  margin-top: 8px;
}

.post-toc {
  margin: 18px 0 6px;
}

.post-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-toc a {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 178, 235, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 247, 255, 0.9));
  box-shadow: 0 6px 14px rgba(101, 70, 132, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-toc a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 112, 173, 0.58);
  box-shadow: 0 8px 16px rgba(101, 70, 132, 0.13);
}

.tip {
  margin: 14px 0 0;
  border: 1px solid rgba(227, 184, 244, 0.9);
  border-radius: 14px;
  padding: 12px 14px;
  color: #5f4f75;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 240, 255, 0.84));
}

.promo-block {
  margin-top: 40px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 34px 36px 30px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(253, 247, 255, 0.9)),
    linear-gradient(120deg, rgba(255, 112, 173, 0.12), rgba(110, 199, 255, 0.12));
  box-shadow:
    0 14px 30px rgba(99, 66, 129, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas:
    "kicker points"
    "title points"
    "copy points"
    "cta points";
  column-gap: 24px;
  row-gap: 12px;
  align-items: start;
}

.promo-kicker {
  grid-area: kicker;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a5e96;
  font-weight: 800;
}

.promo-title {
  grid-area: title;
  margin: 0;
  max-width: 16ch;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.16;
}

.promo-copy {
  grid-area: copy;
  margin: 0;
  max-width: 42ch;
  color: #635779;
  line-height: 1.58;
}

.promo-points {
  grid-area: points;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.promo-points li {
  border: 1px solid rgba(214, 178, 235, 0.7);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.8);
  color: #5f4e73;
  font-weight: 700;
  font-size: 15px;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.promo-block .cta-row {
  grid-area: cta;
  margin-top: 2px;
  gap: 12px;
}

.promo-block .cta-row .btn {
  min-width: 220px;
}

.post-related {
  margin-top: 18px;
}

.post-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-related li + li {
  margin-top: 12px;
}

.post-related li {
  display: flex;
}

.post-related a {
  position: relative;
  display: block;
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  border: 1px solid rgba(214, 178, 235, 0.8);
  border-radius: 14px;
  padding: 11px 40px 11px 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 246, 255, 0.9));
  box-shadow: 0 8px 16px rgba(101, 70, 132, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-related a::after {
  content: "→";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a58a8;
  font-weight: 800;
  opacity: 0.74;
}

.post-related a:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 112, 173, 0.58);
  box-shadow: 0 10px 18px rgba(101, 70, 132, 0.14);
}

.cta-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  min-height: 52px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  position: relative;
  color: #5a2b73;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 7px 16px rgba(95, 49, 129, 0.16);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, var(--brand), var(--secondary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.btn-secondary {
  color: var(--brand-strong);
  border-color: rgba(143, 79, 185, 0.35);
  background: rgba(255, 255, 255, 0.9);
}

.post p a,
.post li a {
  color: #6b3f88;
  font-weight: 700;
  text-decoration-color: rgba(143, 79, 185, 0.45);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.post p a:hover,
.post li a:hover {
  color: #5a2f75;
  text-decoration-color: rgba(255, 112, 173, 0.62);
}

.post-toc a,
.post-related a {
  color: var(--text);
  text-decoration: none;
}

.post-toc a:hover,
.post-related a:hover {
  color: var(--text);
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

body.js-animate [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.js-animate [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #6d5f80;
}

@keyframes bgDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2%, 1.4%, 0) scale(1.03);
  }
}

@media (max-width: 900px) {
  .menu .cta-nav {
    box-shadow: none;
  }

  .btn-primary {
    box-shadow: none;
  }

  .promo-block {
    display: block;
    margin-top: 32px;
    padding: 26px 22px 22px;
  }

  .promo-title,
  .promo-copy {
    max-width: none;
  }

  .promo-copy {
    margin-top: 12px;
  }

  .promo-points {
    margin-top: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .promo-points li {
    min-height: 64px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .page-wrap {
    width: min(1200px, 100% - 18px);
    padding-top: 10px;
  }

  .topbar {
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .brand-logo {
    height: 34px;
  }

  .hero {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(30px, 5.3vw, 42px);
    max-width: 20ch;
  }

  .hero p {
    font-size: 14px;
  }

  .post {
    width: 100%;
    max-width: none;
    padding: 22px 20px;
  }
}

@media (max-width: 640px) {
  .page-wrap {
    width: min(1120px, 100% - 22px);
    padding-top: 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .brand-logo {
    height: 30px;
  }

  .menu {
    margin-left: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    width: auto;
  }

  .menu a {
    font-size: 13px;
    white-space: nowrap;
  }

  .menu .cta-nav {
    padding: 8px 12px;
    box-shadow: none;
  }

  .hero {
    padding: 26px 16px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.8vw, 42px);
    max-width: 100%;
  }

  .post {
    margin-top: 12px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  .promo-block {
    padding: 22px 18px 18px;
    margin-top: 26px;
  }

  .post .lead {
    font-size: 17px;
  }

  .post h2 {
    margin-top: 24px;
    font-size: clamp(25px, 8vw, 30px);
  }

  .post-toc ul {
    flex-direction: column;
  }

  .promo-points {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .promo-points li {
    min-height: 58px;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .promo-block .cta-row .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .menu {
    justify-self: end;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }

  [data-reveal] {
    transition: none;
  }
}
