/* ============================================
   HERBIG GROUP — Design Tokens
   ============================================ */
:root {
  --color-bg: #f3f4f7;
  --color-white: #ffffff;
  --color-ink: #21262d;
  --color-border: #e2e5e8;
  --color-green: #3ca169;
  --color-green-tint: #e8f5ee;
  --color-green-dark-tint: #1a3d2a;
  --color-dark: #21262d;
  --color-dark-footer: #0e2416;
  --color-card-dark: #2d333b;
  --color-card-dark-border: #444c56;

  --font-display: "Raleway", "Georgia", serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-btn: 0 4px 6px rgba(33, 38, 45, 0.05);
  --shadow-card: 0 16px 16px rgba(33, 38, 45, 0.05);
  --shadow-card-hover: 0 22px 28px rgba(33, 38, 45, 0.10);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;

  --container-pad: 20px;
}

@media (min-width: 900px) {
  :root { --container-pad: 80px; }
}

/* ============================================
   RESET
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
a, button, .btn, .nav-link { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   SHARED
   ============================================ */
.section { padding: 48px var(--container-pad); }
@media (min-width: 900px) { .section { padding: 120px var(--container-pad); } }

.eyebrow {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-green);
}

.tag {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-green);
}
.tag--light { background: var(--color-green-tint); }
.tag--dark { background: var(--color-green-dark-tint); }

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 32px;
}
@media (min-width: 900px) { .section-heading { gap: 16px; margin-bottom: 0; } }

.section-title {
  font-weight: 800;
  font-size: 26px;
  color: var(--color-ink);
}
.section-title--light { color: var(--color-white); }
.section-title--left { text-align: left; }
@media (min-width: 900px) { .section-title { font-size: 36px; } }

.section-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-white);
  opacity: 0.55;
  max-width: 640px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
  width: 100%;
}
@media (min-width: 900px) { .btn { width: auto; padding: 16px 32px; font-size: 15px; } }

.btn--primary { background: var(--color-green); color: var(--color-white); }
.btn--primary:hover { background: #349159; transform: translateY(-2px); box-shadow: 0 10px 18px rgba(60, 161, 105, 0.28); }
.btn--primary:active { transform: translateY(0); }

.btn--outline { background: var(--color-white); color: var(--color-green); border: 1.5px solid var(--color-green); }
.btn--outline:hover { background: var(--color-green-tint); transform: translateY(-2px); box-shadow: 0 10px 18px rgba(60, 161, 105, 0.15); }
.btn--outline:active { transform: translateY(0); }

.btn--nav { display: none; }
@media (min-width: 900px) { .btn--nav { display: inline-flex; width: auto; } }

.btn__arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--container-pad);
}
@media (min-width: 900px) { .navbar__inner { padding: 20px var(--container-pad); } }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon { width: 36px; height: 36px; }
@media (min-width: 900px) { .brand__icon { width: 62px; height: 62px; } }

.brand__text { display: flex; flex-direction: column; gap: 2px; text-transform: uppercase; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--color-ink); }
.brand__tagline { font-weight: 600; font-size: 7px; letter-spacing: 0.7px; opacity: 0.75; color: var(--color-ink); }
@media (min-width: 900px) {
  .brand__name { font-size: 20px; }
  .brand__tagline { font-size: 9px; letter-spacing: 1.08px; }
}
.brand--light .brand__name,
.brand--light .brand__tagline { color: var(--color-white); }

.nav-links {
  display: none;
  align-items: center;
  gap: 40px;
}
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-ink);
  padding-bottom: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width 0.25s var(--ease);
}
.nav-link:hover::after { width: 100%; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  background: none;
  border: none;
  padding: 0;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
.menu-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile dropdown nav */
@media (max-width: 899px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), max-height 0.3s var(--ease);
  }
  .nav-links.is-open {
    display: flex;
    transform: scaleY(1);
    opacity: 1;
    max-height: 400px;
  }
  .nav-link { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
  .nav-links .btn--nav { display: inline-flex; margin-top: 16px; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 20px 0;
}
.hero__content { display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }

.badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--color-green-tint);
  color: var(--color-green);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  line-height: 1.2;
  color: var(--color-ink);
}
.hero__headline em { font-family: var(--font-display); font-weight: 300; font-style: italic; }
.hero__headline .accent { color: var(--color-green); font-weight: 900; }

.hero__sub {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.8;
}

.hero__actions { display: flex; flex-direction: column; gap: 12px; }

.hero__media {
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: 64px;
    padding: 82px 0 0 80px;
    overflow: hidden;
  }
  .hero__content { flex: 1; min-width: 0; padding-bottom: 0; gap: 40px; }
  .badge { padding: 8px 16px; font-size: 11px; letter-spacing: 1.5px; }
  .hero__headline { font-size: 56px; }
  .hero__sub { font-size: 18px; }
  .hero__actions { flex-direction: row; gap: 16px; }
  .hero__media {
    flex-shrink: 0;
    width: 640px;
    height: 680px;
    border-radius: 40px 0 0 40px;
  }
}

/* ============================================
   CORE EQUATION
   ============================================ */
.core { background: var(--color-white); display: flex; justify-content: center; }
.core__folder {
  width: 100%;
  background: var(--color-dark);
  border-radius: var(--radius-xl);
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) { .core__folder { padding: 120px 80px; gap: 80px; } }

.card-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
@media (min-width: 900px) { .card-grid { flex-direction: row; gap: 24px; } }

.core-card {
  background: var(--color-card-dark);
  border: 1px solid var(--color-card-dark-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
@media (min-width: 900px) { .core-card { flex: 1; padding: 40px; gap: 24px; } }
.core-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-green);
  background: #333a44;
}
.core-card__head { display: flex; flex-direction: column; gap: 6px; }
.core-card__head h3 { font-weight: 800; font-size: 24px; color: var(--color-white); }
@media (min-width: 900px) { .core-card__head h3 { font-size: 32px; } }
.core-card__formula { font-weight: 700; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-green); }
.core-card__body { font-size: 14px; line-height: 1.6; color: var(--color-white); opacity: 0.7; }
@media (min-width: 900px) { .core-card__body { font-size: 15px; line-height: 1.7; opacity: 0.65; } }

/* ============================================
   PILLARS
   ============================================ */
.pillars { background: var(--color-white); display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 900px) { .pillars { gap: 80px; } }

.pillar-doc {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 8px rgba(33, 38, 45, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.pillar-doc:hover { box-shadow: 0 16px 24px rgba(33, 38, 45, 0.09); transform: translateY(-3px); }

.pillar-doc__image { border-radius: var(--radius-sm); overflow: hidden; height: 180px; position: relative; }
.pillar-doc__image::after { content: ""; position: absolute; inset: 0; background: rgba(33, 38, 45, 0.15); }
.pillar-doc__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pillar-doc:hover .pillar-doc__image img { transform: scale(1.05); }

.pillar-doc__content { display: flex; flex-direction: column; gap: 12px; }
.pillar-doc__eyebrow { font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--color-green); }
.pillar-doc__title { font-weight: 800; font-size: 20px; color: var(--color-ink); }
.pillar-doc__body { font-size: 14px; line-height: 1.5; opacity: 0.8; }

@media (min-width: 900px) {
  .pillar-doc { flex-direction: row; align-items: center; gap: 64px; padding: 48px; border-radius: 0 16px 16px 16px; }
  .pillar-doc--reverse { flex-direction: row-reverse; border-radius: 16px 0 16px 16px; }
  .pillar-doc__image { width: 540px; height: 400px; flex-shrink: 0; }
  .pillar-doc__content { flex: 1; gap: 24px; }
  .pillar-doc__title { font-size: 32px; }
  .pillar-doc__body { font-size: 16px; line-height: 1.65; }
}

/* ============================================
   ROOTS
   ============================================ */
.roots { background: var(--color-bg); display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 900px) { .roots { flex-direction: row; gap: 80px; } }

.roots__left { display: flex; flex-direction: column; gap: 12px; }
.roots__desc { font-size: 14px; line-height: 1.5; opacity: 0.8; }
@media (min-width: 900px) {
  .roots__left { width: 480px; flex-shrink: 0; gap: 24px; }
  .roots__desc { font-size: 16px; line-height: 1.6; }
}

.roots__right { display: flex; flex-direction: column; gap: 16px; flex: 1; }
@media (min-width: 900px) { .roots__right { gap: 24px; } }

.timeline-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 8px rgba(33, 38, 45, 0.04);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.timeline-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 20px rgba(33, 38, 45, 0.08);
  border-color: var(--color-green);
}
@media (min-width: 900px) { .timeline-item { padding: 32px; gap: 16px; } }

.timeline-item__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-item__head h3 { font-weight: 700; font-size: 18px; color: var(--color-ink); }
@media (min-width: 900px) { .timeline-item__head h3 { font-size: 22px; } }

.pill {
  background: var(--color-green-tint);
  color: var(--color-green);
  font-weight: 700;
  font-size: 9px;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (min-width: 900px) { .pill { font-size: 10px; padding: 4px 12px; } }

.timeline-item p { font-size: 13px; line-height: 1.5; opacity: 0.85; }
@media (min-width: 900px) { .timeline-item p { font-size: 15px; line-height: 1.6; } }

/* ============================================
   TEAM
   ============================================ */
.team { background: var(--color-white); display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 900px) { .team { gap: 64px; } }

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.team-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 900px) {
  .team-grid { gap: 32px; }
  .team-row {
    flex-direction: row;
    gap: 32px;
  }
  .team-row .team-card { flex: 1; min-width: 0; }
  .team-row--offset { justify-content: center; }
  .team-row--offset .team-card { flex: 0 1 405px; }
}

.team-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 12px rgba(33, 38, 45, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
@media (min-width: 900px) { .team-card { padding: 24px; gap: 20px; flex: 1; } }

.team-card__photo { height: 220px; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.team-card__photo::after { content: ""; position: absolute; inset: 0; background: rgba(33, 38, 45, 0.05); }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.team-card:hover .team-card__photo img { transform: scale(1.05); }
@media (min-width: 900px) { .team-card__photo { height: 260px; } }

.team-card h3 { font-weight: 800; font-size: 18px; color: var(--color-ink); }
@media (min-width: 900px) { .team-card h3 { font-size: 22px; } }
.team-card__role { font-weight: 700; font-size: 12px; text-transform: uppercase; color: var(--color-green); margin-top: -10px; }
.team-card__bio { font-size: 13px; line-height: 1.5; opacity: 0.8; }
@media (min-width: 900px) { .team-card__bio { font-size: 14px; line-height: 1.55; opacity: 0.75; } }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-dark-footer);
  color: var(--color-white);
  padding: 48px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 900px) { .footer { background: var(--color-dark); padding: 80px 80px 40px; gap: 64px; } }

.footer__header { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) { .footer__header { flex-direction: row; align-items: center; justify-content: space-between; } }

.footer__meta { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .footer__meta { align-items: flex-end; text-align: right; gap: 4px; } }
.footer__meta-title { font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.footer__meta-desc { font-size: 13px; opacity: 0.8; }
@media (min-width: 900px) { .footer__meta-desc { font-size: 14px; } }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 12px;
}
@media (min-width: 900px) {
  .footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 32px; font-size: 13px; }
}
.footer__bottom p { opacity: 0.6; }
.footer__links { display: flex; gap: 8px; margin: -12px -12px -12px 0; }
.footer__links a {
  opacity: 0.6;
  transition: opacity 0.2s var(--ease);
  padding: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (min-width: 900px) {
  .footer__links { margin: 0; gap: 8px; }
  .footer__links a { padding: 4px 8px; min-height: auto; }
}
.footer__links a:hover { opacity: 1; text-decoration: underline; }

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal,
.reveal-stagger {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-visible,
.reveal-stagger.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* stagger delays applied via JS inline style using nth-child order within a parent */
.reveal-stagger:nth-child(1) { transition-delay: 0s; }
.reveal-stagger:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger:nth-child(5) { transition-delay: 0.32s; }
