/* ==========================================================================
   HRight Consulting - design tokens
   Palette drawn from the HRight brand mark: deep forest green, indigo,
   a single lime-green accent reserved for one moment per view.
   Display serif (Fraunces) for editorial weight; Sora for UI and body.
   ========================================================================== */

:root {
  --forest: #1b5850;
  --forest-dark: #123f38;
  --indigo: #4a5fa0;
  --indigo-soft: #5371b9;
  --lime: #5fa84a;
  --paper: #f3f5f1;
  --paper-raised: #ffffff;
  --ink: #16221d;
  --ink-soft: #4a564f;
  --line: #dde3dd;

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --font-body: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --wrap-narrow: 720px;

  --radius-sm: 4px;
  --radius-md: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0; top: -48px;
  background: var(--forest); color: #fff;
  padding: 12px 18px; z-index: 100;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 28px;
}
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 780px) {
  .wrap--split { grid-template-columns: 1fr; gap: 28px; }
}

.section { padding-block: 88px; }
.section--muted { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.section__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.section__body { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; margin-top: 16px; }

.link-arrow {
  font-weight: 600;
  border-bottom: 1px solid var(--forest);
  padding-bottom: 2px;
  white-space: nowrap;
}
.link-arrow:hover { color: var(--forest); }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn--primary {
  background: var(--forest); color: #fff;
}
.btn--primary:hover { background: var(--forest-dark); transform: translateY(-1px); }
.btn--ghost {
  border: 1px solid var(--ink); color: var(--ink);
}
.btn--ghost:hover { border-color: var(--forest); color: var(--forest); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(243, 245, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { border-radius: 6px; }
.brand__word {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav__menu {
  display: flex; align-items: center; gap: 32px;
  font-size: 0.95rem; font-weight: 500;
}
.nav__menu > li { position: relative; }
@media (min-width: 781px) {
  .nav__menu > li + li::before {
    content: "·";
    position: absolute;
    left: -19px;
    color: var(--ink-soft);
  }
}
.nav__menu a:hover { color: var(--forest); }
.nav__cta {
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}
.nav__cta:hover { border-color: var(--forest); color: var(--forest); }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 8px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 780px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--paper-raised);
    flex-direction: column; align-items: flex-start;
    padding: 20px 28px 28px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__cta { align-self: flex-start; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 64px 96px; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center;
}
.hero__kicker {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--forest); margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.6rem, 2rem + 3vw, 4.2rem);
  line-height: 1.04; letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero__lede {
  font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__visual { position: relative; width: 100%; }
.hero__panel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--forest);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  overflow: hidden;
}
.hero__photo {
  position: absolute; inset: 14% 10% 10% 24%;
  width: auto; height: auto;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(10, 30, 26, 0.28);
}
.hero__line {
  position: absolute; left: -18%; bottom: -8%; width: 72%; height: auto;
  color: var(--lime);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}
.hero__line-path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-line 1.6s var(--ease) 0.3s forwards;
}
.hero__line-dot {
  opacity: 0;
  animation: dot-in 0.4s var(--ease) 1.7s forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes dot-in { to { opacity: 1; } }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 340px; margin-inline: auto; }
}

/* ---------- Intro / split section ---------- */
.section--intro { padding-top: 8px; }

/* ---------- Service list ---------- */
.service-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-list__item {
  background: var(--paper);
  padding: 34px 32px;
  position: relative;
}
.service-list__mark {
  display: block; width: 30px; height: 3px;
  background: var(--lime);
  margin-bottom: 20px;
}
.service-list__title {
  font-family: var(--font-display); font-weight: 500; font-size: 1.25rem;
  margin-bottom: 10px;
}
.service-list__desc { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 700px) {
  .service-list { grid-template-columns: 1fr; }
}

/* ---------- Service detail list (services page) ---------- */
.service-detail-list { display: flex; flex-direction: column; }
.service-detail {
  display: grid; grid-template-columns: 90px 1fr;
  gap: 24px;
  padding-block: 40px;
  border-bottom: 1px solid var(--line);
}
.service-detail:first-child { padding-top: 0; }
.service-detail__index {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--lime);
}
.service-detail h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.5rem;
  margin-bottom: 12px;
}
.service-detail p { color: var(--ink-soft); max-width: 62ch; }
@media (max-width: 600px) {
  .service-detail { grid-template-columns: 1fr; }
}

/* ---------- Article cards / grid ---------- */
.article-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.article-grid--full { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .article-grid, .article-grid--full { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .article-grid, .article-grid--full { grid-template-columns: 1fr; }
}

.article-card {
  display: flex; flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.article-card:hover { border-color: var(--forest); transform: translateY(-2px); }
.article-card__image {
  aspect-ratio: 16 / 10; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 88% 100%, 0 100%);
}
.article-card__image img { width: 100%; height: 100%; object-fit: cover; }
.article-card__date { font-size: 0.82rem; color: var(--ink-soft); padding: 20px 22px 0; }
.article-card__title {
  font-family: var(--font-display); font-weight: 500; font-size: 1.18rem;
  line-height: 1.3;
  padding: 8px 22px 0;
}
.article-card__excerpt { color: var(--ink-soft); font-size: 0.94rem; padding: 10px 22px 22px; }

/* ---------- Article detail ---------- */
.article { padding-block: 56px 96px; }
.article__eyebrow { font-size: 0.85rem; font-weight: 600; color: var(--forest); margin-bottom: 18px; }
.article__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.7rem);
  line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.article__meta { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 32px; }
.article__figure { margin: 0 0 36px; }
.article__figure img { width: 100%; border-radius: var(--radius-sm); }
.article__body { font-size: 1.08rem; }
.article__body p { margin-bottom: 22px; color: var(--ink); }
.article__body h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.4rem;
  margin: 40px 0 16px;
}
.article__author {
  display: flex; align-items: center; gap: 16px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line);
}
.article__author-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.article__author-name { font-weight: 600; }
.article__author-role { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- CTA section ---------- */
.section--cta { background: var(--forest); color: #fff; }
.section--cta .section__heading,
.section--cta .section__body { color: #fff; }
.section--cta .section__body { color: rgba(255,255,255,0.78); }
.cta {
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.cta__photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,0.35);
}
.cta .btn--primary { background: var(--lime); color: var(--forest-dark); margin-top: 22px; }
.cta .btn--primary:hover { background: #74bb5f; }

/* ---------- Page hero (about / services / articles / contact) ---------- */
.page-hero { padding-block: 64px 40px; }
.page-hero__kicker { font-weight: 600; color: var(--forest); font-size: 0.85rem; margin-bottom: 14px; }
.page-hero__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.1rem, 1.7rem + 2vw, 3.2rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.page-hero__role { font-size: 1.05rem; color: var(--ink-soft); }
.page-hero__role--sub { margin-top: 4px; }
.page-hero__grid {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
}
.page-hero__photo {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  clip-path: none;
}
@media (max-width: 620px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__photo { width: 120px; height: 120px; }
}

.about-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Contact form ---------- */
.contact-form { display: flex; flex-direction: column; gap: 20px; max-width: 480px; }
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 0.92rem; }
.field input, .field textarea {
  border: 1px solid var(--line); background: var(--paper-raised);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-weight: 400;
}
.field select {
  border: 1px solid var(--line); background: var(--paper-raised);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-weight: 400;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--forest); }
.hidden-field { position: absolute; left: -9999px; }
.form-status {
  min-height: 1.35em;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.contact-card {
  background: var(--paper-raised); border: 1px solid var(--line);
  padding: 32px; display: flex; flex-direction: column; gap: 10px;
  max-width: 340px;
}
.contact-card__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.contact-card__name { font-weight: 700; }
.contact-card__role { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 8px; }
.contact-card a { font-weight: 600; border-bottom: 1px solid transparent; }
.contact-card a:hover { border-color: currentColor; color: var(--forest); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 24px; margin-top: 40px; }
.site-footer__row {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
  padding-bottom: 32px;
}
.site-footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.site-footer__name { font-weight: 700; }
.site-footer__by { color: var(--ink-soft); font-size: 0.9rem; }
.site-footer__links, .site-footer__social { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.site-footer__links a:hover, .site-footer__social a:hover { color: var(--forest); }
.site-footer__legal { color: var(--ink-soft); font-size: 0.82rem; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- Mobile spacing and typography tuning ---------- */
@media (max-width: 780px) {
  body { line-height: 1.62; }
  .wrap { padding-inline: 22px; }
  .section { padding-block: 64px; }
  .section__header { margin-bottom: 30px; }
  .section__heading { line-height: 1.24; max-width: 18ch; }
  .section__body { font-size: 1rem; line-height: 1.72; margin-top: 14px; max-width: 48ch; }
  .lede { line-height: 1.62; }

  .hero { padding-block: 44px 72px; }
  .hero__kicker { margin-bottom: 14px; line-height: 1.55; }
  .hero__title { margin-bottom: 18px; }
  .hero__lede { font-size: 1.04rem; line-height: 1.72; margin-bottom: 26px; }

  .page-hero { padding-block: 48px 30px; }
  .page-hero__title { line-height: 1.12; }
  .page-hero__role { font-size: 1rem; line-height: 1.65; }

  .service-list__item { padding: 28px 24px; }
  .service-detail { padding-block: 30px; gap: 16px; }
  .service-detail p { line-height: 1.7; }

  .article { padding-block: 44px 72px; }
  .article__body { font-size: 1.02rem; line-height: 1.76; }
  .article__body p { margin-bottom: 18px; }

  .contact-form { gap: 16px; }
  .field { gap: 6px; }
  .contact-card { padding: 24px; }

  .site-footer { padding-block: 40px 20px; margin-top: 28px; }
  .site-footer__row { gap: 24px; padding-bottom: 24px; }
  .site-footer__links, .site-footer__social { gap: 8px; }
}

@media (max-width: 480px) {
  .wrap { padding-inline: 18px; }
  .section { padding-block: 56px; }
  .btn { padding: 12px 20px; }
  .hero__kicker { font-size: 0.78rem; line-height: 1.45; margin-bottom: 12px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .service-list__item { padding: 24px 20px; }
  .page-hero__title { font-size: clamp(1.85rem, 6.8vw, 2.35rem); }
  .page-hero__role { font-size: 0.97rem; }
  .article-card__title { font-size: 1.12rem; line-height: 1.34; }
  .article__title { line-height: 1.18; }
  .article__meta { margin-bottom: 24px; }
}
