/* Lip Blushing Decoded — an editorial "beauty-magazine" layer on top of Tailwind's Play CDN.
   Centred Playfair masthead, right-hand sidebar widgets (WordPress shape), long-form article
   typography, and a full set of motion primitives (scroll reveals, floating imagery, parallax,
   reading progress, lightbox, marquee) driven by js/lipblushing.js. */

:root {
  --line: #ecdcd6;
  --rose: #cd4f70;
  --berry: #872d4f;
  --plum: #3a2231;
  --gold: #cba24e;
  --blush-wash: #fdf3f2;
  --shadow-rose: 0 18px 44px -22px rgba(135, 45, 79, .45);
  --ease-silk: cubic-bezier(.22, 1, .36, 1);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100vw;
  background-image:
    radial-gradient(46rem 26rem at 82% -8%, rgba(222, 109, 139, .16), transparent 70%),
    radial-gradient(40rem 24rem at -6% 4%, rgba(189, 147, 177, .16), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
h1:focus, h2:focus, [tabindex="-1"]:focus { outline: none; }

.font-display { font-family: "Playfair Display", Georgia, serif; }
.font-script  { font-family: "Parisienne", cursive; }

/* ------------------------------------------------------------------ masthead */
.masthead-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: .98;
  word-break: break-word;
  overflow-wrap: break-word;
  background: linear-gradient(96deg, #6d2440 0%, #cd4f70 42%, #b98bad 74%, #cba24e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.masthead-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155, 59, 83, .55), transparent);
}
.kicker {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--berry);
}

/* ------------------------------------------------------------------ top nav bar */
.topbar-link { transition: color .18s ease, opacity .18s ease; }
.topbar-link:hover { color: #f6cfd2; }

/* ------------------------------------------------------------------ side nav */
.side-link {
  display: block;
  padding: .5rem .85rem;
  border-radius: .55rem;
  color: #5a3348;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.side-link:hover { background: var(--blush-wash); color: var(--berry); transform: translateX(3px); }
.side-link.active {
  background: linear-gradient(92deg, #fbe3e9, #f6cfd2);
  color: var(--berry);
  border-color: #f3bcc7;
  font-weight: 600;
}

/* ---- Mobile drawer nav (< md) ----------------------------------------
   CSS-only: the hidden #nav-toggle checkbox holds open/closed state; the
   hamburger <label> and the backdrop <label> both toggle it (no JS needed for
   the mechanism itself — wwwroot/nav.js only closes it on link-tap/Escape and
   makes the label keyboard-operable). Static SSR has no Blazor event handlers
   to drive this. #nav-toggle must stay a sibling of .mobile-topbar/
   .drawer-backdrop/.drawer for the `~` selectors below to reach them. */
.drawer {
  transform: translateX(-100%);
  transition: transform .2s ease-out;
}
#nav-toggle:checked ~ .drawer { transform: translateX(0); }

.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
#nav-toggle:checked ~ .drawer-backdrop { opacity: 1; pointer-events: auto; }

/* hamburger — three bars that morph to an X while the drawer is open */
.hb { display: flex; flex-direction: column; gap: 5px; width: 1.2rem; }
.hb > span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #2b1b24;
  transition: transform .2s ease, opacity .2s ease;
}
#nav-toggle:checked ~ .mobile-topbar .hb > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle:checked ~ .mobile-topbar .hb > span:nth-child(2) { opacity: 0; }
#nav-toggle:checked ~ .mobile-topbar .hb > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ article cards */
.post-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform .4s var(--ease-silk), box-shadow .4s var(--ease-silk), border-color .4s var(--ease-silk);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-rose);
  border-color: #f0b9c4;
}
.post-card .post-thumb { overflow: hidden; }
.post-card .post-thumb img { transition: transform .6s var(--ease-silk); }
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.cat-chip {
  display: inline-block;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--berry);
}

/* ------------------------------------------------------------------ sidebar widgets */
.widget {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fdf7f5);
  padding: 1.35rem;
  box-shadow: 0 12px 30px -24px rgba(90, 51, 72, .5);
}
.widget h2 { font-family: "Playfair Display", Georgia, serif; }
.widget .widget-accent {
  width: 2.25rem; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
}
.tag-pill {
  border-radius: 999px;
  border: 1px solid #f0cdd5;
  background: #fff;
  padding: .28rem .7rem;
  font-size: .72rem;
  color: #7a2941;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.tag-pill:hover { background: var(--rose); color: #fff; transform: translateY(-2px); }

/* ------------------------------------------------------------------ hero */
.hero-wrap { position: relative; overflow: hidden; border-radius: 1.5rem; }
.hero-art {
  position: absolute;
  inset: -14% 0;
  width: 100%;
  height: 128%;
  object-fit: cover;
  will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(31, 18, 27, .92) 4%, rgba(31, 18, 27, .35) 48%, rgba(31, 18, 27, .05) 82%);
}
.hero-grain {
  position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ decorative floating blobs */
.petal {
  position: absolute;
  z-index: 0;
  border-radius: 60% 40% 55% 45% / 55% 50% 50% 45%;
  filter: blur(2px);
  opacity: .5;
  pointer-events: none;
  animation: petal-drift 22s var(--ease-silk) infinite alternate;
}
@keyframes petal-drift {
  from { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  to   { transform: translate3d(28px, -40px, 0) rotate(24deg) scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  .petal { animation: none; }
}

/* ------------------------------------------------------------------ scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-silk), transform .8s var(--ease-silk);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-38px); }
[data-reveal="right"] { transform: translateX(38px); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal="float"] { transform: translateY(46px) rotate(-2deg); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* floating side figures inside long articles */
.float-fig {
  margin: .4rem 0 1.4rem;
}
@media (min-width: 900px) {
  .float-fig.right { float: right; width: 19rem; margin: .3rem 0 1.1rem 2rem; }
  .float-fig.left  { float: left;  width: 19rem; margin: .3rem 2rem 1.1rem 0; }
}
.float-fig img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -30px rgba(135, 45, 79, .55);
}
.float-fig figcaption {
  margin-top: .5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: .95rem;
  color: #7c5768;
}

/* ------------------------------------------------------------------ reading progress */
#readbar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 90;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  box-shadow: 0 0 14px rgba(205, 79, 112, .7);
  transition: width .12s linear;
}

/* ------------------------------------------------------------------ back to top */
#totop {
  position: fixed;
  right: 1.1rem; bottom: 1.1rem;
  z-index: 80;
  height: 2.9rem; width: 2.9rem;
  display: grid; place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--berry));
  box-shadow: var(--shadow-rose);
  opacity: 0; transform: translateY(14px) scale(.8); pointer-events: none;
  transition: opacity .3s var(--ease-silk), transform .3s var(--ease-silk);
}
#totop.show { opacity: 1; transform: none; pointer-events: auto; }
#totop:hover { transform: translateY(-3px); }

/* ------------------------------------------------------------------ lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: none;
  align-items: center; justify-content: center;
  padding: 5vw;
  background: rgba(24, 12, 18, .86);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .28s ease;
}
#lightbox.open { display: flex; opacity: 1; }
#lightbox img {
  max-width: 100%; max-height: 90vh;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  transform: scale(.94); transition: transform .28s var(--ease-silk);
}
#lightbox.open img { transform: scale(1); }

/* ------------------------------------------------------------------ marquee */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: inline-flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ------------------------------------------------------------------ counters */
.stat-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ long-form article body */
.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #38222f;
  overflow-wrap: break-word;
}
.article-body > * + * { margin-top: 1.15rem; }
.article-body h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2.6rem;
  margin-bottom: .3rem;
  color: var(--berry);
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  clear: both;
}
.article-body h2::first-letter { color: var(--rose); }
.article-body h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem; font-weight: 600; color: var(--plum);
  margin-top: 1.6rem;
}
.article-body p a { color: var(--berry); text-decoration: underline; text-underline-offset: 2px; }
.article-body p a:hover { color: var(--rose); }
.article-body .lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.5;
  font-style: italic;
  color: #6d2440;
}
.article-body .lead::before {
  content: "";
  display: block;
  width: 3rem; height: 3px;
  margin-bottom: 1rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
}
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul li {
  position: relative;
  padding-left: 1.5rem;
}
.article-body ul li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: .5rem; height: .5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--gold));
}
.article-body ol { list-style: decimal; padding-left: 1.4rem; }
.article-body li + li { margin-top: .4rem; }
.article-body figure { margin: 1.9rem 0; }
.article-body figure img { width: 100%; border-radius: 1rem; border: 1px solid var(--line); cursor: zoom-in; }
.article-body figcaption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: .95rem; color: #7c5768; margin-top: .55rem;
}
.article-body blockquote {
  border-left: 3px solid var(--rose);
  padding: .2rem 0 .2rem 1.15rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
  color: #5a3348;
}
.drop-cap::first-letter {
  float: left;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3.6rem;
  line-height: .82;
  padding: .35rem .5rem 0 0;
  color: var(--rose);
}

img.img-fallback { object-fit: cover; background: #f6cfd2; }

/* ------------------------------------------------------------------ blazor error strip */
#blazor-error-ui {
  background: #fbe3e9; color: #7a2941; bottom: 0;
  box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0;
  padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
