/* =========================================================
   PRELANDER — "Mans Veselības Ceļojums"
   Editorial personal blog feel — NOT an affiliate lander.
   Redesign v2: Lora + Source Serif 4, 660px column, terracotta accent.
   ========================================================= */

/* ===== Design tokens ===== */
:root {
  --bg:            #f6f2eb;      /* aged paper */
  --bg-card:       #ffffff;
  --text-primary:  #1e1c19;
  --text-secondary:#6a6256;
  --text-muted:    #9a9284;
  --accent:        #8b3a18;      /* terracotta */
  --accent-soft:   #c7926d;
  --link:          #7a4020;      /* muted rust */
  --link-hover:    #3d1f0d;
  --border:        #ddd6c8;      /* warm hairline */
  --border-soft:   #ece5d4;
  --rule:          #cfc5b3;      /* timeline bar / dividers */
  --cta-bg:        #2c6e3f;      /* forest green, used ONCE */
  --cta-bg-hover:  #1f5530;
  --cta-shadow:    #1e4f2d;
  --final-dot:     #2c6e3f;      /* timeline last-dot resolution */
  --footer-bg:     #2a2520;
  --reading-bar:   #8b3a18;
  --selection:     #efd9c6;

  --serif-head: "Lora", Georgia, "Times New Roman", serif;
  --serif-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --col:      660px;
  --col-pad:  20px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
::selection { background: var(--selection); color: var(--text-primary); }

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--col-pad);
}

/* ===== Reading progress ===== */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.read-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--reading-bar);
  transition: width 120ms linear;
}

/* ===== Site header — minimal, non-sticky, non-promotional ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
}
.logo-mark {
  font-family: var(--serif-head);
  font-weight: 500;
  color: var(--accent);
  font-size: 19px;
}
.logo-text {
  font-family: var(--serif-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.005em;
}
.header-section {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
@media (max-width: 480px) {
  .header-section { display: none; }
  .site-header { padding: 12px 0; }
}

/* ===== Article ===== */
.article {
  padding: 28px 0 48px;
}
.article-rule {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0 0 22px;
}
.article-category {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.article-title {
  font-family: var(--serif-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 14px;
  hyphens: none;
}
.article-subtitle {
  font-family: var(--serif-head);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 22px;
}

/* Meta row: avatar + author + stats */
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 26px;
}
.author-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  border-radius: 2px;
  flex-shrink: 0;
  background: #d9d0bf;
}
.meta-text {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.meta-text .author { color: var(--text-primary); font-weight: 600; }
.meta-text .sep { margin: 0 6px; color: var(--text-muted); }
.meta-row-2 { color: var(--text-muted); font-size: 12px; display: flex; align-items: center; flex-wrap: wrap; }
.meta-row-2 svg { vertical-align: -1px; margin-right: 3px; }

/* ===== Hero image ===== */
.hero {
  margin: 0 calc(var(--col-pad) * -1) 28px;
  position: relative;
}
.hero img {
  width: 100%;
  display: block;
}
.hero::after {
  /* very subtle film grain for authenticity */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.04;
  mix-blend-mode: multiply;
}
.hero figcaption {
  padding: 10px var(--col-pad) 0;
  font-family: var(--serif-body);
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}
@media (min-width: 660px) {
  .hero {
    margin-left: 0;
    margin-right: 0;
    border: 2px solid var(--border);
  }
  .hero figcaption { padding-left: 0; padding-right: 0; }
  .hero::after { inset: 0; }
}

/* ===== Article typography ===== */
.article .lead {
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 18px;
  font-weight: 400;
}
.article p {
  margin: 0 0 18px;
}
.article h2 {
  font-family: var(--serif-head);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
  margin: 44px 0 14px;
  letter-spacing: -0.005em;
}
.article h2#pagrieziens {
  margin-top: 56px;
  text-align: center;
}
.section-ornament {
  display: block;
  color: var(--rule);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 400;
}
.article ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 22px;
}
.article li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
}
.article li::before {
  content: "·";
  position: absolute;
  left: 8px;
  top: -2px;
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
}
.article strong { color: var(--text-primary); font-weight: 600; }

/* Pullquote */
.pullquote {
  font-family: var(--serif-head);
  font-style: italic;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.45;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 20px;
  margin: 30px 0 30px;
}

/* Tried-list — slightly more prominent */
.tried-list li strong { color: var(--text-primary); }

/* Ingredients list — plain, no tinted card */
.ingredients-list {
  border-left: 3px solid var(--rule);
  padding-left: 18px !important;
  margin: 22px 0 24px;
}
.ingredients-list li { padding-left: 0 !important; }
.ingredients-list li::before { display: none; }

/* Product shot — floated right on desktop, stacked on mobile */
.product-shot {
  margin: 24px 0 24px;
  text-align: center;
}
.product-shot img {
  margin: 0 auto;
  max-height: 300px;
  width: auto;
}
.product-shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}
@media (min-width: 560px) {
  .product-shot {
    float: right;
    width: 200px;
    margin: 4px 0 12px 24px;
    text-align: center;
  }
  .product-shot img { max-height: 220px; }
  .product-shot figcaption { font-size: 12px; text-align: left; }
}

/* ===== Inline mid-article CTA ===== */
.inline-cta-line {
  padding: 14px 16px;
  background: rgba(139, 58, 24, 0.04);
  border-left: 3px solid var(--accent-soft);
  margin: 22px 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}
.inline-cta {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.inline-cta:hover { color: var(--link-hover); }

/* ===== Timeline ===== */
.timeline {
  border-left: 3px solid var(--rule);
  padding-left: 22px;
  margin: 24px 0 28px;
}
.timeline-item {
  position: relative;
  margin-bottom: 22px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline-item--final::before {
  background: var(--final-dot);
  box-shadow: 0 0 0 1px var(--final-dot);
}
.timeline-item .week {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 5px;
}
.timeline-item--final .week { color: var(--final-dot); }
.timeline-item p { margin: 0 0 10px; }
.timeline-item p:last-child { margin-bottom: 0; }

.timeline-inline-cta {
  margin-top: 10px !important;
  padding: 10px 14px;
  background: rgba(44, 110, 63, 0.06);
  border-left: 3px solid var(--final-dot);
  font-size: 15px;
}
.timeline-inline-cta .inline-cta { color: var(--final-dot); }
.timeline-inline-cta .inline-cta:hover { color: #1f5530; }

/* ===== Editorial close (no boxed CTA) ===== */
.editorial-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0 24px;
}
.editorial-close {
  font-family: var(--serif-head);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 24px !important;
}
.editorial-button-wrap {
  margin: 0 0 14px !important;
  text-align: center;
}
.cta-btn {
  display: inline-block;
  background: var(--cta-bg);
  color: #fff !important;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--cta-shadow);
  transition: background 140ms ease, transform 80ms ease;
  min-width: 280px;
  text-align: center;
}
.cta-btn:hover {
  background: var(--cta-bg-hover);
  color: #fff !important;
}
.cta-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--cta-shadow);
}
.cta-caveat {
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 30px !important;
  line-height: 1.6;
}

/* ===== Disclaimer ===== */
.disclaimer {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border-left: 2px solid var(--border);
  padding: 12px 0 12px 16px;
  margin: 26px 0 0;
  line-height: 1.55;
}
.disclaimer strong { color: var(--text-primary); font-weight: 600; }

/* ===== Comments ===== */
.comments {
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  padding: 34px 0 36px;
  font-family: var(--sans);
}
.comments-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.comments h2 {
  font-family: var(--serif-head);
  font-size: 22px;
  margin: 0;
  color: var(--text-primary);
}
.comments h2 .count { color: var(--text-muted); font-weight: 400; }
.comments-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.comments-meta .reactions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
}
.comments-meta .sep { color: var(--text-muted); margin: 0 2px; }

.comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.comment:last-of-type { border-bottom: none; }

/* avatars — polaroid photo or flat letter fallback */
.avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}
.avatar-photo {
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  border-radius: 2px;
  background: #d9d0bf;
}
.avatar-letter {
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
}
.avatar.sm, .avatar-letter.sm {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 4px;
}
.comment-head strong { color: var(--text-primary); font-weight: 600; }
.comment-head .time { color: var(--text-muted); font-size: 12px; }
.author-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 4px;
  vertical-align: 2px;
}
.comment p {
  margin: 4px 0 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-primary);
}
.reply-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.reply-btn:hover { color: var(--accent); }

.reply {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 4px;
}
.reply p { font-size: 14px; }

.load-more-wrap {
  text-align: center;
  padding-top: 18px;
}
.load-more {
  background: none;
  border: none;
  color: var(--link);
  padding: 8px 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  letter-spacing: 0.02em;
}
.load-more:hover { color: var(--link-hover); }

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: #a8a196;
  padding: 28px 0;
  font-family: var(--sans);
  font-size: 12px;
  text-align: center;
}
.site-footer p { margin: 6px 0; }
.site-footer .small { color: #776e60; font-size: 11px; line-height: 1.5; }

/* ===== Responsive ===== */
@media (max-width: 380px) {
  :root { --col-pad: 16px; }
  body { font-size: 16px; line-height: 1.70; }
  .article-title { font-size: 26px; }
  .article-subtitle { font-size: 17px; }
  .article .lead { font-size: 17.5px; }
  .article h2 { font-size: 20px; margin-top: 40px; }
  .pullquote { font-size: 19px; }
  .cta-btn { min-width: 100%; padding: 14px 22px; font-size: 16px; }
}

@media (min-width: 520px) {
  .article-title { font-size: 30px; }
  .article-subtitle { font-size: 19px; }
  .article .lead { font-size: 20px; }
  .article h2 { font-size: 24px; }
}

@media (min-width: 720px) {
  body { font-size: 18px; }
  .article-title { font-size: 36px; line-height: 1.18; }
  .article-subtitle { font-size: 20px; }
  .article .lead { font-size: 21px; }
  .article h2 { font-size: 26px; }
  .pullquote { font-size: 22px; }
}

/* Print / accessibility fallbacks */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .read-progress > span { transition: none; }
  .cta-btn { transition: none; }
}
