/* ===================================================================
   Seral Labs — McKinsey-Inspired Light Theme
   =================================================================== */

:root {
  --white: #ffffff;
  --off-white: #f7f6f3;
  --warm-bg: #f2efe9;
  --light-gray: #edeae5;
  --border: #ddd8d0;
  --mid-gray: #9a938a;
  --charcoal: #2d2d2d;
  --near-black: #1a1a1a;
  --deep-dark: #0f0f0f;
  --signal-red: #e01b1b;
  --signal-red-deep: #c41818;
  --signal-red-light: rgba(224, 27, 27, 0.08);
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--charcoal);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: min(90%, var(--max));
  margin: 0 auto;
}

/* ---------------------------------------------------------------
   Skip Link
   --------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1.2rem;
  background: var(--signal-red);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 42px;
  width: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--signal-red);
  transition: width 0.25s ease;
}

.nav-list a:hover {
  color: var(--near-black);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  width: 100%;
}

.nav-list a:focus-visible {
  outline: 2px solid var(--signal-red);
  outline-offset: 4px;
  color: var(--near-black);
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  background: var(--off-white);
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) contrast(1.05);
  opacity: 0.18;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: clamp(200px, 22vw, 300px);
  height: auto;
  margin: 0 auto 2rem;
}

.red-line {
  width: 64px;
  height: 3px;
  background: var(--signal-red);
  margin: 0 auto 2.4rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #706b63;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero .eyebrow {
  color: #b81818;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.2;
  color: var(--near-black);
}

h1 {
  max-width: 18ch;
  margin: 0 auto;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  max-width: 20ch;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  color: var(--near-black);
}

p {
  margin: 0;
  color: var(--charcoal);
  font-size: 1.05rem;
}

.lead {
  margin: 1.8rem auto 0;
  max-width: 58ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: #555;
  line-height: 1.75;
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */

.section {
  padding: 6.5rem 0;
  border-bottom: 1px solid var(--light-gray);
  background: var(--white);
}

.section-alt {
  background: var(--off-white);
}

.section-dark {
  background: var(--deep-dark);
  border-bottom-color: #222;
}

.section-dark h2,
.section-dark h3 {
  color: #f2f4f7;
}

.section-dark p,
.section-dark li {
  color: #b6bcc7;
}

.section-dark .eyebrow {
  color: var(--signal-red);
}

/* ---------------------------------------------------------------
   Grid Layout
   --------------------------------------------------------------- */

.grid-two {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.3fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.grid-two-reverse {
  display: grid;
  grid-template-columns: minmax(340px, 1.3fr) minmax(280px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.grid-image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.stack > * + * {
  margin-top: 1.1rem;
}

/* ---------------------------------------------------------------
   Section Images (McKinsey-style treatment)
   --------------------------------------------------------------- */

.section-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.section-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) contrast(1.08);
  transition: filter 0.4s ease;
}

.section-image-wrap:hover img {
  filter: grayscale(40%) contrast(1.05);
}

.section-image-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(224, 27, 27, 0.06));
  pointer-events: none;
}

/* ---------------------------------------------------------------
   Lists
   --------------------------------------------------------------- */

ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--charcoal);
}

li + li {
  margin-top: 0.6rem;
}

li::marker {
  color: var(--signal-red);
}

/* ---------------------------------------------------------------
   Phase Grid
   --------------------------------------------------------------- */

.phase-grid {
  margin-top: 2.8rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

.phase-card {
  grid-column: span 4;
  min-height: 200px;
  padding: 1.6rem 1.4rem 1.8rem;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-left: 4px solid var(--signal-red);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.phase-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.phase-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.08rem;
}

.phase-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.65;
}

/* ---------------------------------------------------------------
   CTA / Contact
   --------------------------------------------------------------- */

.cta {
  border-bottom: none;
  background: var(--deep-dark);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 27, 27, 0.15), transparent 70%);
  pointer-events: none;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta .eyebrow {
  color: var(--signal-red);
}

.cta h2 {
  max-width: 24ch;
  color: #f2f4f7;
}

.cta p {
  margin-top: 1rem;
  max-width: 60ch;
  color: #c4ccd7;
  font-size: 1.08rem;
}

.cta-inner {
  max-width: 840px;
}

.button {
  display: inline-block;
  margin-top: 2.2rem;
  text-decoration: none;
  color: #ffffff;
  background: var(--signal-red);
  border: none;
  padding: 0.85rem 1.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-family: "Public Sans", sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.button:hover {
  background: var(--signal-red-deep);
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.brand:focus-visible {
  outline: 2px solid var(--signal-red);
  outline-offset: 4px;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.site-footer {
  background: var(--near-black);
  color: #a0a0a0;
  padding: 2.2rem 0;
  font-size: 0.82rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: #aaa;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------
   Scroll Animations
   --------------------------------------------------------------- */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero animations */
.hero .hero-logo,
.hero .red-line,
.hero .eyebrow,
.hero h1,
.hero .lead {
  animation: rise 600ms ease-out both;
}

.hero .red-line {
  animation-delay: 60ms;
}

.hero .eyebrow {
  animation-delay: 120ms;
}

.hero h1 {
  animation-delay: 200ms;
}

.hero .lead {
  animation-delay: 300ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

@media (max-width: 980px) {
  .grid-two,
  .grid-two-reverse,
  .grid-image-text {
    grid-template-columns: 1fr;
  }

  .phase-card {
    grid-column: span 6;
  }

  .section {
    padding: 4.5rem 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 0;
    gap: 0.8rem;
  }

  .nav-list {
    gap: 0.7rem 1.1rem;
    flex-wrap: wrap;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero-logo {
    width: 180px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .phase-grid {
    margin-top: 1.6rem;
  }

  .phase-card {
    grid-column: 1 / -1;
    min-height: 0;
  }

  h1 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }

  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
}

/* ---------------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------------- */

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

  html {
    scroll-behavior: auto;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }
}
