/* Dachshund Decoded — editorial layer on top of Tailwind's Play CDN.
   Tailwind covers layout/spacing/colour utilities; this file owns the long-form
   article typography (there is no Typography plugin on the CDN build) and a few
   WordPress-blog flourishes. */

:root {
  --rule: #e7e0d5;
  --accent: #b45309; /* amber-700 */
}

html { scroll-behavior: smooth; }

body { text-rendering: optimizeLegibility; }

.font-display { font-family: "Playfair Display", Georgia, serif; }

/* ---- Masthead ------------------------------------------------------------ */
.masthead-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  transition: right .18s ease;
}
.nav-link:hover::after,
.nav-link.active::after { right: 0; }

/* ---- 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, unlike the interactive-WASM version this replaced. #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: #1c1917;
  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); }

.drawer-link {
  display: block;
  padding: .6rem .85rem;
  border-radius: .55rem;
  color: #44403c;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background .15s ease, color .15s ease;
}
.drawer-link:hover { background: #f5efe6; color: var(--accent); }
.drawer-link.active { background: #fdf6ec; color: var(--accent); }

/* ---- Long-form article body ------------------------------------------- */
.article-body { font-size: 1.075rem; line-height: 1.78; color: #2b2622; }
.article-body > * + * { margin-top: 1.15rem; }

.article-body h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 0.25rem;
  color: #1c1917;
}
.article-body h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 0.9rem;
}

.article-body p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.article-body .drop-cap:first-letter {
  float: left;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 0.82;
  padding: 0.1rem 0.6rem 0 0;
  color: var(--accent);
}

.article-body figure { margin: 1.9rem 0; }
.article-body figure img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--rule);
}
.article-body figcaption {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: #8a8175;
  margin-top: 0.5rem;
  text-align: center;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  font-style: italic;
  color: #4b443c;
}

/* Broken remote image -> show nothing rather than a torn-icon box */
img.img-fallback { object-fit: cover; background: #efe9df; }
