/* HealthyHR.is — blog & cases.
   Design tokens and base components are lifted from the marketing pages so the
   section reads as part of the same site. */

:root {
  --dark:   #423018;
  --gold:   #c8860a;
  --beige:  #f5e6d3;
  --cream:  #fdf6ee;
  --mid:    #6b4820;
  --muted:  #9e8068;
  --light:  #ede0d0;
  --white:  #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4rem;
  background: rgba(253,246,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light);
  transition: all 0.3s;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--dark); text-decoration: none;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.current { color: var(--gold); }
.nav-cta {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; background: var(--gold);
  color: var(--white); padding: 0.6rem 1.4rem;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--dark); }

.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.lang-switcher { display: flex; gap: 0; }
.lang-switcher a {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; padding: 0.45rem 0.6rem;
  border: 1px solid var(--light); transition: all 0.2s;
  line-height: 1;
}
.lang-switcher a:first-child { border-radius: 3px 0 0 3px; }
.lang-switcher a:last-child { border-radius: 0 3px 3px 0; }
.lang-switcher a:not(:first-child) { border-left: none; }
.lang-switcher a:hover { color: var(--gold); border-color: var(--gold); }
.lang-switcher a.active {
  background: var(--gold); color: var(--white); border-color: var(--gold);
}

/* ── SECTION SHARED ── */
section { padding: 6rem 4rem; }
.section-eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700; line-height: 1.15; color: var(--dark);
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 0.95rem; line-height: 1.7; color: var(--muted);
  max-width: 560px; margin-bottom: 3rem;
}

.btn-primary {
  display: inline-block; padding: 0.9rem 2rem;
  background: var(--gold); color: var(--white);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  border: none; cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.btn-primary:hover { background: var(--dark); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--dark);
  padding: 9rem 4rem 4.5rem;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--gold);
}
.page-hero::after {
  content: '';
  position: absolute; bottom: -110px; right: -70px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(200,134,10,0.15);
  pointer-events: none;
}
.page-hero .section-title { color: var(--white); max-width: 780px; }
.page-hero .section-title em { font-style: italic; color: var(--gold); }
.page-hero .section-sub { color: var(--beige); margin-bottom: 0; }

/* ── TABS ── */
.tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--light);
  margin-bottom: 3rem;
}
.tab {
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  padding: 1rem 1.6rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab:hover { color: var(--gold); }
.tab.active { color: var(--dark); border-bottom-color: var(--gold); }
.tab-count {
  display: inline-block; margin-left: 0.5rem;
  font-size: 0.65rem; color: var(--muted);
}

/* ── POST GRID ── */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  align-items: stretch;
}
.post-card {
  background: var(--white);
  padding: 2.4rem 2.2rem;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  text-align: left; text-decoration: none; color: inherit;
  border: none; font-family: inherit; cursor: pointer;
  transition: transform 0.3s;
}
.post-card:hover { transform: translateY(-4px); }
.post-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.post-card:hover::before { transform: scaleX(1); }
.post-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.8rem;
}
.post-title {
  font-size: 1.25rem; font-weight: 800; color: var(--dark);
  line-height: 1.3; margin-bottom: 0.9rem;
}
.post-excerpt {
  font-size: 0.85rem; line-height: 1.65; color: var(--mid);
  margin-bottom: 1.6rem; flex: 1;
}
.post-metric {
  font-size: 1.9rem; font-weight: 900; color: var(--gold);
  line-height: 1; margin-bottom: 0.9rem;
  font-family: 'Playfair Display', serif;
}
.post-meta {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  padding-top: 1.1rem; border-top: 1px solid var(--light);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

.empty-state {
  background: var(--white); padding: 3.5rem 2.5rem;
  border-left: 3px solid var(--gold);
  font-size: 0.9rem; line-height: 1.7; color: var(--mid);
}

/* ── POLL ── */
.poll { background: var(--beige); }
.poll-card {
  background: var(--white); padding: 2.8rem 2.6rem;
  max-width: 720px;
}
.poll-question {
  font-size: 1.25rem; font-weight: 800; color: var(--dark);
  line-height: 1.35; margin-bottom: 1.8rem;
}
.poll-options { display: flex; flex-direction: column; gap: 0.6rem; }
.poll-option {
  position: relative; width: 100%;
  background: var(--cream); border: 1px solid var(--light);
  padding: 0.95rem 1.2rem; cursor: pointer;
  font-family: inherit; text-align: left;
  overflow: hidden; transition: border-color 0.2s;
}
.poll-option:hover { border-color: var(--gold); }
.poll-option.voted { border-color: var(--gold); }
.poll-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(200,134,10,0.16);
  width: 0; transition: width 0.6s ease;
}
.poll-option-row {
  position: relative; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem;
}
.poll-label { font-size: 0.88rem; font-weight: 600; color: var(--dark); line-height: 1.4; }
.poll-option.voted .poll-label::after { content: ' ✓'; color: var(--gold); }
.poll-share {
  font-size: 0.8rem; font-weight: 800; color: var(--gold);
  flex-shrink: 0; min-width: 3.2rem; text-align: right;
}
.poll-total {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-top: 1.4rem;
}
.poll-suggest { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--light); }
.poll-suggest-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}

/* ── FORMS ── */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem;
}
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 0.9rem;
  color: var(--dark); background: var(--cream);
  border: 1px solid var(--light); border-radius: 0;
  padding: 0.8rem 1rem; transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field-hint { font-size: 0.7rem; color: var(--muted); margin-top: 0.4rem; line-height: 1.5; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  font-size: 0.8rem; line-height: 1.6; padding: 0.9rem 1.1rem;
  margin-top: 1rem; border-left: 3px solid var(--gold);
  background: var(--beige); color: var(--mid);
}
.form-note.error { border-left-color: #b3261e; background: #fbeae8; color: #7a1c15; }

/* ── ARTICLE VIEW ── */
.article { background: var(--cream); }
.article-inner { max-width: 720px; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  padding: 0; margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 700; line-height: 1.2; color: var(--dark);
  margin-bottom: 1.2rem;
}
.article-meta {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 2rem; border-bottom: 1px solid var(--light);
  margin-bottom: 2.5rem;
}
.article-metric {
  background: var(--dark); color: var(--beige);
  padding: 1.6rem 1.8rem; margin-bottom: 2.5rem;
  border-left: 4px solid var(--gold);
}
.article-metric strong {
  display: block; font-size: 2rem; font-weight: 900;
  color: var(--gold); line-height: 1; margin-bottom: 0.4rem;
  font-family: 'Playfair Display', serif;
}
.article-body p {
  font-size: 1rem; line-height: 1.8; color: var(--mid);
  margin-bottom: 1.4rem;
}
.article-body h2 {
  font-size: 1.3rem; font-weight: 800; color: var(--dark);
  margin: 2.4rem 0 1rem;
}

/* ── COMMENTS ── */
.comments { background: var(--beige); }
.comments-inner { max-width: 720px; }
.comment-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 3rem; }
.comment {
  background: var(--white); padding: 1.6rem 1.8rem;
  border-left: 3px solid var(--gold);
}
.comment-head {
  display: flex; gap: 1rem; align-items: baseline;
  flex-wrap: wrap; margin-bottom: 0.7rem;
}
.comment-author { font-size: 0.9rem; font-weight: 800; color: var(--dark); }
.comment-date { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.comment-body { font-size: 0.9rem; line-height: 1.7; color: var(--mid); white-space: pre-wrap; }
.comment-form { background: var(--white); padding: 2.4rem 2.2rem; }
.comment-form-title {
  font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 0.6rem;
}
.comment-form-sub { font-size: 0.8rem; line-height: 1.6; color: var(--muted); margin-bottom: 1.8rem; }

/* ── CONTACT + FOOTER ── */
.contact { background: var(--dark); padding: 6rem 4rem; text-align: center; }
.contact .section-title { color: var(--white); margin-bottom: 1rem; }
.contact .section-sub { color: var(--beige); margin: 0 auto 3rem; text-align: center; }
.contact-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 2rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; transition: all 0.2s;
}
.contact-link-primary { background: var(--gold); color: var(--white); }
.contact-link-primary:hover { background: var(--white); color: var(--dark); }
.contact-link-ghost { border: 1px solid rgba(245,230,211,0.3); color: var(--beige); }
.contact-link-ghost:hover { border-color: var(--gold); color: var(--gold); }

footer {
  background: var(--dark); border-top: 1px solid rgba(200,134,10,0.2);
  padding: 1.8rem 4rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-size: 0.9rem; font-weight: 800; color: var(--white); letter-spacing: -0.01em; }
.footer-logo span { color: var(--gold); }
.footer-info { text-align: right; }
.footer-copy { font-size: 0.72rem; color: var(--muted); }
.footer-legal { font-size: 0.68rem; color: var(--muted); opacity: 0.8; margin-top: 0.25rem; }

/* ── UTIL ── */
.hidden { display: none !important; }
.loading {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 4rem 1.8rem; }
  .page-hero { padding: 7rem 1.8rem 3.5rem; }
  .post-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .poll-card, .comment-form { padding: 2rem 1.6rem; }
  .contact { padding: 4rem 1.8rem; }
  footer { padding: 1.5rem; flex-direction: column; text-align: center; }
  .footer-info { text-align: center; }
}
