/* ================================================================
   RUNNOVATE — styles.css

   Contents:
   01. Custom Properties
   02. Reset & Base
   03. Skip Link
   04. Sidebar
   05. Top Bar  (mobile header)
   06. Mobile Nav Drawer
   07. Main Content
   08. Sections — shared base
   09. Section — Home
   10. Button (CTA)
   11. Service List
   12. Step List
   13. Group List
   14. Prose  (About section)
   15. Tally Placeholder
   16. Focus States
   17. Reduced Motion
   18. Responsive — ≤ 768 px (tablet / mobile)
   19. Responsive — ≤ 480 px (small mobile)
================================================================ */


/* ── 01. CUSTOM PROPERTIES ────────────────────────────────────── */

:root {
  /* Brand colors */
  --c-bg:       #111111;
  --c-text:     #EAEAEA;
  --c-muted:    #B0B0B0;
  --c-accent:   #FFE872;
  --c-border:   #222222;       /* structural borders — sidebar edge, section dividers */
  --c-divider:  rgba(255, 255, 255, 0.06); /* lighter content dividers within sections */

  /* Layout */
  --sidebar-w:      240px;
  --topbar-h:       60px;
  --content-max:    800px;   /* max readable column width          */
  --section-px:     72px;    /* horizontal padding inside sections */
  --section-py:     100px;   /* vertical padding inside sections   */

  /* Typography */
  --font: 'Mulish', sans-serif;

  /* Misc */
  --radius: 4px;
  --ease:   150ms ease;
}


/* ── 02. RESET & BASE ─────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul  { list-style: none; }
ol  { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}


/* ── 03. SKIP LINK ────────────────────────────────────────────── */

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background-color: var(--c-accent);
  color: #111111;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: top 0ms;
}

.skip-link:focus {
  top: 16px;
}


/* ── 04. SIDEBAR ──────────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 40px 28px;
  background-color: var(--c-bg);
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
  z-index: 100;
}

/* Logo */
.sidebar__logo {
  margin-bottom: 40px;
}

.sidebar__logo a {
  display: inline-block;
  line-height: 0;
}

.sidebar__logo .logo {
  height: 60px;
  width: 60px;
}

/* Nav list */
.sidebar .nav__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar .nav__link {
  display: block;
  padding: 8px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-muted);
  border-radius: var(--radius);
  transition:
    color var(--ease),
    background-color var(--ease);
}

.sidebar .nav__link:hover {
  color: var(--c-text);
  background-color: rgba(255, 255, 255, 0.04);
}

.sidebar .nav__link.is-active {
  color: var(--c-accent);
  font-weight: 600;
}


/* ── 05. TOP BAR (mobile header) ──────────────────────────────── */

.topbar {
  display: none; /* shown in mobile media query */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background-color: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  z-index: 200;
}

.topbar__logo-link {
  display: inline-block;
  line-height: 0;
}

.topbar__logo-link .logo {
  height: 40px;
  width: 40px;
}

/* Hamburger button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius);
  min-width: 40px;
  min-height: 40px;
}

.hamburger__bar {
  display: block;
  height: 2px;
  background-color: var(--c-text);
  border-radius: 2px;
  transition:
    transform var(--ease),
    opacity   var(--ease),
    width     var(--ease);
}

.hamburger__bar:nth-child(1) { width: 22px; }
.hamburger__bar:nth-child(2) { width: 16px; }
.hamburger__bar:nth-child(3) { width: 22px; }

/* Morph to × when open */
.hamburger.is-open .hamburger__bar:nth-child(1) {
  width: 22px;
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open .hamburger__bar:nth-child(3) {
  width: 22px;
  transform: translateY(-7px) rotate(-45deg);
}


/* ── 06. MOBILE NAV DRAWER ────────────────────────────────────── */

.mobile-nav {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--c-bg);
  z-index: 190;
  padding: 28px 24px;
  /* closed state */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity   200ms ease,
    transform 200ms ease;
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav .nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav .nav__link {
  display: block;
  padding: 12px 10px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--c-muted);
  border-radius: var(--radius);
  transition:
    color var(--ease),
    background-color var(--ease);
}

.mobile-nav .nav__link:hover {
  color: var(--c-text);
  background-color: rgba(255, 255, 255, 0.04);
}

.mobile-nav .nav__link.is-active {
  color: var(--c-accent);
  font-weight: 600;
}


/* ── 07. MAIN CONTENT ─────────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar-w);
}


/* ── 08. SECTIONS — shared base ───────────────────────────────── */

.section {
  padding: var(--section-py) var(--section-px);
  border-bottom: 1px solid var(--c-border);
}

.section:last-child {
  border-bottom: none;
}

/* Content column — constrains to readable max-width */
.section__inner {
  max-width: var(--content-max);
}

/* Eyebrow label above each heading */
.section__eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Section heading — h2 on all sections except Home */
.section__heading {
  margin-bottom: 16px;
  font-size: clamp(1.875rem, 2.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

/* Intro / lead paragraph beneath a section heading */
.section__lead {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--c-muted);
  max-width: 560px;
}


/* ── 09. SECTION — HOME ───────────────────────────────────────── */

.section--home {
  min-height: 100vh;
  min-height: 100svh; /* accounts for mobile browser chrome */
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

/* Larger headline for the hero */
.section--home .section__heading {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.12;
  margin-bottom: 28px;
  max-width: 700px;
}

/* Larger, slightly more prominent lead on the hero */
.section--home .section__lead {
  font-size: 1.0625rem;
  max-width: 520px;
}

/* Bridge line — the connector sentence before the CTA */
.section__bridge {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-muted);
  max-width: 520px;
}


/* ── 10. BUTTON (CTA) ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  padding: 16px 36px;
  background-color: var(--c-accent);
  color: #111111;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    opacity   var(--ease),
    transform var(--ease);
}

.btn:hover {
  opacity: 0.85;
}

.btn:active {
  transform: translateY(1px);
}

/* Helper text below a CTA button */
.btn-helper {
  margin-top: 14px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--c-muted);
}


/* ── 11. SERVICE LIST ─────────────────────────────────────────── */

.service-list {
  margin-top: 52px;
}

.service {
  padding: 32px 0;
  border-top: 1px solid var(--c-divider);
}

.service:last-child {
  border-bottom: 1px solid var(--c-divider);
}

.service__title {
  margin-bottom: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--c-text);
}

.service__body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-muted);
  max-width: 580px;
}

.service__body + .service__body {
  margin-top: 10px;
}


/* ── 12. STEP LIST ────────────────────────────────────────────── */

.step-list {
  margin-top: 52px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--c-divider);
}

.step:last-child {
  border-bottom: 1px solid var(--c-divider);
}

/* Step number — accent is used sparingly; only here and for active nav state */
.step__number {
  padding-top: 4px; /* optical alignment with the title baseline */
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  line-height: 1;
}

.step__title {
  margin-bottom: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--c-text);
}

.step__content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-muted);
  max-width: 560px;
}

.step__content p + p {
  margin-top: 10px;
}


/* ── 13. GROUP LIST (Who it's for) ────────────────────────────── */

.group-list {
  margin-top: 46px;
}

.group {
  padding: 28px 0;
  border-top: 1px solid var(--c-divider);
}

.group:last-child {
  border-bottom: 1px solid var(--c-divider);
}

.group__title {
  margin-bottom: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--c-text);
}

.group p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--c-muted);
  max-width: 540px;
}


/* ── 14. PROSE (About section) ────────────────────────────────── */

.prose {
  margin-top: 8px; /* heading already has margin-bottom: 20px */
}

.prose p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-text);
  max-width: 640px;
}

.prose p + p {
  margin-top: 20px;
}

.prose-link {
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(234, 234, 234, 0.3);
  transition: text-decoration-color var(--ease);
}

.prose-link:hover {
  text-decoration-color: var(--c-accent);
}


/* ── 15. TALLY PLACEHOLDER ────────────────────────────────────── */

.tally-placeholder {
  margin-top: 40px;
  padding: 48px 40px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(234, 234, 234, 0.15);
  border-radius: var(--radius);
}

.tally-placeholder__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(176, 176, 176, 0.45);
}


/* ── 16. FOCUS STATES ─────────────────────────────────────────── */

/*
  Single consistent focus ring across all interactive elements.
  :focus-visible means keyboard users get the ring;
  mouse clicks do not trigger it.
*/
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

:focus:not(:focus-visible) {
  outline: none;
}


/* ── 17. REDUCED MOTION ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ── 18. RESPONSIVE — tablet / mobile (≤ 768 px) ─────────────── */

@media (max-width: 768px) {

  /* Offset anchor scroll targets to clear the fixed topbar */
  html {
    scroll-padding-top: calc(var(--topbar-h) + 16px);
  }

  /* Swap sidebar ↔ topbar */
  .sidebar { display: none; }
  .topbar  { display: flex; }

  /* Push content below the fixed topbar */
  .main-content {
    margin-left: 0;
    padding-top: var(--topbar-h);
  }

  /* Scaled-down section padding for tablet / mobile */
  .section {
    padding: 72px 32px;
  }

  /* Home — subtract topbar so it still fills the visible screen */
  .section--home {
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100svh - var(--topbar-h));
    padding-top: 0;
    padding-bottom: 0;
  }

}


/* ── 19. RESPONSIVE — small mobile (≤ 480 px) ────────────────── */

@media (max-width: 480px) {

  .section {
    padding: 52px 20px;
  }

  .section--home .section__heading {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  /* Step list: stack number above content on very small screens */
  .step {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .tally-placeholder {
    padding: 36px 20px;
    min-height: 160px;
  }

}
