/* Clean Beauty Journal — Design 4 (final, all skills) */
/* Skill stack: ui-ux-pro-max + seo-audit + schema-markup + page-cro + copywriting + site-architecture */

:root {
  /* Color system from ui-ux-pro-max (beauty/wellness) */
  --deep-forest: #1a3a2a;
  --forest: #2d5a3d;
  --sage: #6b8f71;
  --sage-light: #a8c4a0;
  --warm-cream: #faf8f2;
  --cream: #f0ece4;
  --gold: #c9a84e;
  --gold-light: #e8d88a;
  --gold-pale: #f5ecd8;
  --text-primary: #1e2d28;
  --text-muted: #5a6b57;
  --border: #e0dcd4;
  --white: #ffffff;

  /* Spacing */
  --nav-width: 17.5rem;
  --header-h: 3.25rem;
  --radius: 0.6rem;
  --shadow: 0 4px 20px rgba(26, 58, 42, 0.06);

  /* Typography (ui-ux-pro-max wellness stack: Lora + Raleway) */
  --font-display: "Lora", Georgia, serif;
  --font-ui: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Comfortaa", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0.75rem); }

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--warm-cream);
}

/* Brand: Le Pur in Comfortaa */
.le-pur {
  font-family: var(--font-brand);
  font-weight: 400;
}

/* Links */
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
a:hover { color: var(--sage); }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 0; z-index: 9999;
  padding: 0.75rem 1rem; background: var(--deep-forest); color: var(--warm-cream);
}
.skip-link:focus { top: 0; }

/* --- Sidebar (site-architecture: persistent left nav on desktop) --- */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(26, 58, 42, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.sidebar-overlay.is-visible { opacity: 1; visibility: visible; }

.sidebar {
  position: fixed; top: 0; left: 0; z-index: 300;
  width: min(85vw, var(--nav-width)); height: 100dvh;
  padding: calc(var(--header-h) + 0.75rem) 1rem 1.5rem;
  background: var(--deep-forest);
  color: var(--warm-cream);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.sidebar.is-open { transform: translateX(0); }

.sidebar-brand { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(201, 168, 78, 0.25); }
.sidebar-brand .journal {
  font-size: 0.72rem; color: var(--sage-light);
  letter-spacing: 0.04em; display: block; margin-top: 0.2rem;
}

.nav-section { margin-bottom: 0.75rem; }
.nav-section-title {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--gold);
  margin-bottom: 0.35rem; padding-left: 0.5rem;
}

.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 0.05rem; }
.sidebar-nav a {
  display: block; padding: 0.5rem 0.65rem;
  color: var(--warm-cream); text-decoration: none;
  border-radius: var(--radius); font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a:focus-visible { background: rgba(201, 168, 78, 0.15); outline: none; }
.sidebar-nav a.nav-active { background: rgba(201, 168, 78, 0.2); }
.sidebar-nav a.nav-child { font-size: 0.84rem; padding-left: 1rem; opacity: 0.9; }

/* About → submenu (e.g. Journey) */
.sidebar-nav.nav-submenu {
  margin-left: 0.5rem;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(201, 168, 78, 0.35);
}
.sidebar-nav.nav-submenu .nav-child {
  padding-left: 0.85rem;
  font-size: 0.82rem;
}

.nav-cta { margin-top: 1rem; }
.nav-cta a {
  display: block; text-align: center; padding: 0.65rem 1rem;
  background: var(--gold); color: var(--deep-forest);
  font-weight: 700; border-radius: var(--radius);
  text-decoration: none; font-size: 0.85rem;
}
.nav-cta a:hover { background: var(--gold-light); }

/* --- Header --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  background: rgba(250, 248, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo { font-size: 1rem; font-weight: 600; color: var(--deep-forest); text-decoration: none; }
.logo .pur-accent { color: var(--gold); }

.menu-toggle {
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px; width: 2.2rem; height: 2.2rem; padding: 0.4rem;
  border: none; background: transparent; color: var(--deep-forest); cursor: pointer;
}
.menu-toggle span {
  display: block; height: 1.5px; background: var(--deep-forest); border-radius: 2px;
  transition: 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --- Canvas (fluid) --- */
.main-wrap { padding-top: var(--header-h); min-height: 100vh; }

.canvas { width: 100%; max-width: none; padding: clamp(0.75rem, 3vw, 2rem); padding-bottom: 3rem; }

.preview-tag {
  font-size: 0.7rem; text-align: center; padding: 0.4rem 0.75rem;
  margin-bottom: 1rem; background: var(--gold-pale);
  border: 1px dashed var(--gold); border-radius: var(--radius);
  color: var(--text-muted);
}

/* --- Hero (copywriting: story-led hook) --- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.hero-editorial {
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
}

.hero-editorial .tagline {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--sage);
  margin-bottom: 0.5rem;
}

.hero-editorial h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  line-height: 1.15; color: var(--deep-forest);
  font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.hero-editorial p.lead {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 40ch; margin-bottom: 1rem;
}

.hero-editorial .cta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--forest);
  color: var(--warm-cream);
  font-weight: 700;
}
.btn-primary:hover { background: var(--deep-forest); color: var(--warm-cream); }
.btn-ghost {
  background: var(--white);
  color: var(--forest);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-pale); }
.founder .cta-row { margin-top: 1rem; }

/* --- Featured story (page-cro: above fold conversion) --- */
.featured {
  position: relative;
  min-height: 18rem;
  padding: 1.75rem;
  border-radius: calc(var(--radius) + 0.15rem);
  background: linear-gradient(160deg, var(--deep-forest) 0%, var(--forest) 50%, var(--sage) 100%);
  color: var(--warm-cream);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.featured::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(201, 168, 78, 0.1), transparent 50%);
}
.featured > * { position: relative; z-index: 1; }

.featured .badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0;
}

.featured h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 1.2;
  color: var(--warm-cream);
  margin: 0;
  max-width: 22ch;
}

.featured p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--sage-light);
  margin: 0;
  max-width: 38ch;
}

.featured .meta {
  font-size: 0.75rem;
  color: var(--sage-light);
  opacity: 0.8;
  margin: 0.25rem 0 0;
}

/* --- Section heads --- */
.section-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1rem;
  padding-bottom: 0.5rem; border-bottom: 2px solid var(--gold);
}
.section-h h2 {
  font-family: var(--font-display); font-size: 1.3rem;
  color: var(--deep-forest); font-weight: 600;
}
.section-h a { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }

/* --- Article cards (seo-audit: structured for featured snippets) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.2s;
  cursor: pointer;
}
.card:hover { transform: translateY(-2px); border-color: var(--sage-light); }

.card-thumb {
  height: 8rem;
  background: linear-gradient(135deg, var(--sage) 0%, var(--forest) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  color: var(--warm-cream); letter-spacing: 0.06em;
}

.card-body { padding: 0.75rem; flex: 1; display: flex; flex-direction: column; }
.card-body .tag {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  color: var(--sage); margin-bottom: 0.3rem;
}
.card-body h3 {
  font-family: var(--font-display); font-size: 1rem;
  line-height: 1.3; color: var(--deep-forest); margin-bottom: 0.3rem;
}
.card-body p {
  font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-body .meta { font-size: 0.72rem; color: var(--text-muted); margin-top: auto; }

/* --- Topic chips (legacy pill style — other previews) --- */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.chip {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem; font-weight: 600;
  color: var(--forest);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--gold); background: var(--gold-pale); }

/* --- Homepage topic tiles (portal branch navigation) --- */
body.home-hero-page .home-topics {
  margin-bottom: 2.5rem;
}

body.home-hero-page .home-topic-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 40rem) {
  body.home-hero-page .home-topic-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 64rem) {
  body.home-hero-page .home-topic-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 75rem) {
  body.home-hero-page .home-topic-tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

body.home-hero-page .home-topic-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-height: 8.5rem;
  padding: 1.15rem 1rem 1rem;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(165deg, var(--white) 0%, var(--warm-cream) 100%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.1rem);
  box-shadow: 0 4px 18px rgba(26, 58, 42, 0.07);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.22s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

body.home-hero-page .home-topic-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 55%, rgba(201, 168, 78, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

body.home-hero-page .home-topic-tile:hover,
body.home-hero-page .home-topic-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(26, 58, 42, 0.14);
  background: linear-gradient(165deg, var(--white) 0%, var(--gold-pale) 120%);
}

body.home-hero-page .home-topic-tile:hover::after,
body.home-hero-page .home-topic-tile:focus-visible::after {
  opacity: 1;
}

body.home-hero-page .home-topic-tile:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

body.home-hero-page .home-topic-tile__icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sage);
}

body.home-hero-page .home-topic-tile__label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--deep-forest);
  letter-spacing: -0.01em;
}

body.home-hero-page .home-topic-tile__teaser {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Founder strip --- */
.founder {
  display: flex; gap: 1.25rem; padding: 1.25rem;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.founder blockquote {
  font-family: var(--font-display); font-size: 1.05rem;
  font-style: italic; color: var(--forest);
  line-height: 1.5; flex: 1;
}
.founder cite {
  font-style: normal; font-weight: 700; font-size: 0.9rem;
  color: var(--deep-forest); margin-top: 0.5rem; display: block;
}
.founder span { font-size: 0.82rem; color: var(--sage); }

/* --- Home trust badges (core 4-icon row) --- */
body.home-hero-page .home-trust-strip {
  margin: 0 0 2.25rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
}

body.home-hero-page .home-trust-badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 36rem) {
  body.home-hero-page .home-trust-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (min-width: 56rem) {
  body.home-hero-page .home-trust-badges {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

body.home-hero-page .home-trust-badge {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
  text-align: left;
  background: var(--warm-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--deep-forest);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.home-hero-page .home-trust-badge:hover {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(26, 58, 42, 0.08);
}

body.home-hero-page .home-trust-badge__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-pale), var(--gold-light));
  border: 1px solid rgba(201, 168, 78, 0.4);
  color: var(--forest);
}

body.home-hero-page .home-trust-badge__icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

body.home-hero-page .home-trust-badge__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

body.home-hero-page .home-trust-badge__title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--deep-forest);
  letter-spacing: 0.02em;
}

body.home-hero-page .home-trust-badge__sub {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* --- Footer --- */
.footer {
  padding: 1.5rem 0; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted); text-align: center;
}
.footer a { font-weight: 600; }

/* --- Article page (schema-markup + seo-audit) --- */
.article-page { max-width: 72ch; margin: 0 auto; }
.article-page .breadcrumb {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.5rem;
}
.article-page .breadcrumb a { font-weight: 600; }

.article-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15; color: var(--deep-forest);
  font-weight: 600; margin-bottom: 0.75rem;
}

.article-page .author-box {
  display: flex; gap: 1rem; padding: 1.25rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin: 1.5rem 0;
}
.article-page .author-box .avatar {
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--forest));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--warm-cream);
}
.article-page .author-box .bio h3 { font-size: 1rem; color: var(--deep-forest); }
.article-page .author-box .bio span { font-size: 0.82rem; color: var(--sage); }

.article-page .article-body { font-size: 1.05rem; line-height: 1.75; }
.article-page .article-body h2 {
  font-family: var(--font-display); font-size: 1.35rem;
  color: var(--deep-forest); margin: 1.5rem 0 0.75rem;
}
.article-page .article-body h3 {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--forest); margin: 1.25rem 0 0.5rem;
}
.article-page .article-body p { margin-bottom: 1rem; }
.article-page .article-body blockquote {
  font-family: var(--font-display); font-style: italic;
  border-left: 3px solid var(--gold); padding: 0.75rem 0 0.75rem 1.15rem;
  margin: 1rem 0; background: var(--gold-pale); color: var(--forest);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-page .toc {
  padding: 1rem 1.25rem; background: var(--warm-cream);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 1.5rem; font-size: 0.88rem;
}
.article-page .toc strong { display: block; margin-bottom: 0.5rem; color: var(--deep-forest); }
.article-page .toc ol { padding-left: 1.25rem; }

/* --- Responsive --- */
@media (min-width: 40rem) {
  .hero { grid-template-columns: 1.1fr 1fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .founder { flex-direction: row; align-items: center; }
}

@media (min-width: 64rem) {
  .menu-toggle, .sidebar-overlay { display: none; }
  body:not(.portal-layout) .sidebar { transform: translateX(0); width: var(--nav-width); padding-top: 2rem; }
  body:not(.portal-layout) .site-header { left: var(--nav-width); width: calc(100% - var(--nav-width)); }
  body:not(.portal-layout) .main-wrap { margin-left: var(--nav-width); }
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar, .sidebar-overlay, .menu-toggle span, .card { transition: none; }
}
