/* ================================================================
   Hygge Journey — design system
   Warm Scandinavian: cream, sand, terracotta, sage, pine.
   ================================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #faf6f0;
  --bg-card: #f1e9de;
  --ink: #2b2622;
  --ink-soft: #6b6157;
  --accent: #c05f3c;
  --accent-hover: #a84e2e;
  --sage: #7a8b6f;
  --pine: #31473a;
  --pine-ink: #f4efe6;
  --line: #e3d9ca;
  --shadow: 0 1px 2px rgb(43 38 34 / 0.06), 0 8px 24px -12px rgb(43 38 34 / 0.18);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211d1a;
    --bg-card: #2c2723;
    --ink: #ede6dc;
    --ink-soft: #b3a99d;
    --accent: #e08a66;
    --accent-hover: #eb9f7f;
    --sage: #93a588;
    --pine: #26362c;
    --pine-ink: #ede6dc;
    --line: #3a342e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

/* ---- Reset-ish ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, iframe { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -100vw; top: 0;
  background: var(--pine); color: var(--pine-ink);
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px;
}
.skip-link:focus { left: 0; }

/* ---- Buttons & links ------------------------------------------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff8f2;
  font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  transition: background 160ms ease, transform 160ms ease;
}
.button:hover { background: var(--accent-hover); color: #fff8f2; transform: translateY(-1px); }
.button-ghost { background: transparent; border-color: currentColor; color: inherit; }
.button-ghost:hover { background: rgb(255 255 255 / 0.12); transform: translateY(-1px); }
.text-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.text-link-light { color: var(--pine-ink); opacity: 0.85; text-decoration: none; }
.text-link-light:hover { color: var(--pine-ink); opacity: 1; }

.tag-pill {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: capitalize;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  transition: border-color 160ms ease, color 160ms ease;
}
.tag-pill span { opacity: 0.6; font-weight: 400; }
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 1rem 2rem; }

/* ---- Header ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.wordmark span { color: var(--accent); font-style: italic; font-weight: 600; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
.site-nav .nav-yt { color: var(--accent); font-weight: 600; }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  list-style: none; cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.2rem;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.burger {
  display: inline-block; width: 18px; height: 2px; background: var(--ink);
  position: relative;
}
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.mobile-nav ul {
  position: absolute; right: 0; top: calc(100% + 0.6rem);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 0.5rem; min-width: 11rem;
}
.mobile-nav li a {
  display: block; padding: 0.6rem 0.9rem; text-decoration: none;
  color: var(--ink); font-weight: 500; border-radius: 8px;
}
.mobile-nav li a:hover { background: var(--bg-card); }

@media (max-width: 46rem) {
  .site-nav { display: none; }
  .mobile-nav { display: block; }
}

/* ---- Hero (home) ------------------------------------------------- */
.hero {
  position: relative;
  background: var(--pine);
  color: var(--pine-ink);
  overflow: hidden;
  display: grid;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
  opacity: 0.45;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(26 38 32 / 0.55) 0%, rgb(26 38 32 / 0.25) 55%, rgb(26 38 32 / 0.75) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding-block: clamp(5rem, 14vw, 10rem);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.hero-kicker, .section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.hero-kicker { color: color-mix(in srgb, var(--pine-ink) 80%, transparent); }
.section-kicker { color: var(--accent); margin-bottom: 0.6rem; }
.hero h1 { font-size: clamp(2.6rem, 2rem + 4vw, 4.6rem); margin-bottom: 0.4em; }
.hero h1 em { font-style: italic; color: #e8b48c; }
.hero-lede { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem); opacity: 0.92; max-width: 38rem; margin-inline: auto; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---- Home sections ----------------------------------------------- */
section { scroll-margin-top: 5rem; }
.home-about { padding-block: clamp(3rem, 8vw, 6rem); }
.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
}
.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  rotate: -1.5deg;
}
@media (max-width: 46rem) {
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 22rem; margin-inline: auto; }
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.6rem;
}
.section-head h2 { margin: 0; }

.home-latest { padding-block: clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
}
.card-grid-index { margin-block: 0.5rem 2.5rem; }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-card-media { background: var(--pine); }
.post-card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-placeholder {
  display: grid; place-items: center; aspect-ratio: 16 / 9;
  font-size: 2.4rem; color: var(--pine-ink);
}
.post-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.45rem; }
.post-card-body .tag-pill { align-self: flex-start; background: var(--bg); }
.post-card-body h3 { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.post-card-meta { margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
.post-card-desc {
  margin: 0; color: var(--ink-soft); font-size: 0.94rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.quote-band { background: var(--bg-card); border-block: 1px solid var(--line); padding-block: clamp(3rem, 7vw, 5rem); }
.quote-band blockquote { margin: 0; text-align: center; }
.quote-band p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.2rem);
  line-height: 1.35; margin-bottom: 0.6em;
}
.quote-band cite { color: var(--ink-soft); font-style: normal; font-size: 0.95rem; }

.home-video { padding-block: clamp(3rem, 7vw, 5rem); }
.home-video-inner { max-width: 56rem; }
.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  margin-block: 1rem 1.5rem;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.home-topics { padding-block: 0 clamp(3rem, 7vw, 5rem); }

/* ---- Post & page ------------------------------------------------- */
.post-hero { background: var(--pine); color: var(--pine-ink); }
.post-hero-inner {
  max-width: 50rem; margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
}
.post-hero h1 { margin-bottom: 0.3em; }
.post-hero-tags { margin-bottom: 1rem; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.post-hero .tag-pill { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.25); color: var(--pine-ink); }
.post-hero .tag-pill:hover { border-color: var(--pine-ink); }
.post-meta { color: color-mix(in srgb, var(--pine-ink) 75%, transparent); font-size: 0.92rem; margin: 0; }
.post-hero-lede { color: color-mix(in srgb, var(--pine-ink) 85%, transparent); max-width: 34rem; margin-inline: auto; }

.post-featured { max-width: 53rem; margin-top: -2px; }
.post-featured img {
  width: 100%; max-height: 28rem; object-fit: cover;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

.prose { max-width: 44rem; padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow); margin-block: 0.5rem; }
.prose li { margin-bottom: 0.5em; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1.2em; }
.prose blockquote {
  margin: 1.5em 0; padding: 0.2rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 1.08em;
}
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; margin-bottom: 1.2em; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.8rem; text-align: left; }
.prose th { background: var(--bg-card); font-family: var(--sans); }
.prose .video-frame { margin-block: 1.5rem; }
.prose .button { margin-block: 0.4rem; }

.post-footnote { max-width: 44rem; padding-block: 0.5rem; }
.post-footnote p { color: var(--ink-soft); font-size: 0.88rem; font-style: italic; }

/* ---- Comments ----------------------------------------------------- */
.comments { max-width: 44rem; padding-block: 1.5rem; }
.comments-note { color: var(--ink-soft); font-size: 0.92rem; }
.comment {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-block: 1rem;
}
.comment-meta { margin-bottom: 0.4rem; font-size: 0.9rem; }
.comment-meta time { color: var(--ink-soft); margin-left: 0.5rem; font-size: 0.85rem; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-body { font-size: 0.97rem; }
.comment-replies { margin-top: 0.8rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.comment-replies .comment { margin-block: 0.6rem; background: var(--bg); }

/* ---- Related / pagination ------------------------------------------ */
.related { padding-block: clamp(2rem, 5vw, 3.5rem); }
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 1rem 3rem; gap: 1rem;
}
.pagination a { font-weight: 600; text-decoration: none; }
.pagination-status { color: var(--ink-soft); font-size: 0.92rem; }

/* ---- Newsletter band ------------------------------------------------ */
.newsletter { background: var(--bg-card); border-top: 1px solid var(--line); }
.newsletter-inner {
  max-width: 40rem; text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.newsletter h2 { margin-bottom: 0.3em; }
.newsletter p { color: var(--ink-soft); }
.newsletter-form { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.newsletter-form input {
  flex: 1 1 16rem; max-width: 22rem;
  font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.65rem 1.2rem;
}
.newsletter-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--pine); color: var(--pine-ink); }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}
.footer-brand .wordmark { color: var(--pine-ink); }
.footer-brand p { color: color-mix(in srgb, var(--pine-ink) 78%, transparent); font-size: 0.95rem; max-width: 26rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: color-mix(in srgb, var(--pine-ink) 88%, transparent); text-decoration: none; }
.site-footer a:hover { color: var(--pine-ink); text-decoration: underline; }
.footer-legal {
  border-top: 1px solid rgb(255 255 255 / 0.14);
  padding-block: 1.3rem;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.footer-legal p { margin: 0; font-size: 0.84rem; color: color-mix(in srgb, var(--pine-ink) 65%, transparent); }
.footer-legal a { color: inherit; text-decoration: underline; }
@media (max-width: 46rem) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---- Motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
