/* ==========================================================================
   Kakade Research — styles.css
   Palette: institutional navy on warm off-whites. Serif display, sans body.
   ========================================================================== */

:root {
  --navy: #0B1F3A;
  --navy-deep: #071525;
  --blue-inst: #123B66;
  --blue-accent: #1D5D91;
  --blue-soft: #EAF2F8;
  --off-white: #F7F8FA;
  --warm-white: #FCFCFA;
  --charcoal: #171B20;
  --grey: #68727D;
  --border: #DCE2E8;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section-tinted { background: var(--off-white); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.section-title { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn .arrow,
.text-link .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  margin-left: 0.25em;
}
.btn:hover .arrow,
.text-link:hover .arrow { transform: translateX(4px); }

.btn-light {
  background: var(--warm-white);
  color: var(--navy);
  border-color: var(--warm-white);
}
.btn-light:hover { background: var(--blue-soft); border-color: var(--blue-soft); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-dark {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-dark:hover { background: var(--blue-inst); border-color: var(--blue-inst); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--blue-soft); }

.text-link {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--blue-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.text-link:hover { border-bottom-color: var(--blue-accent); }

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: #fff;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.site-nav.is-solid {
  background: rgba(252, 252, 250, 0.96);
  color: var(--navy);
  border-bottom-color: var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark { display: inline-flex; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
}

.nav-links > a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav-links > a:hover { border-bottom-color: currentColor; }

.nav-cta {
  border: 1px solid currentColor;
  padding: 0.55rem 1.2rem !important;
  border-bottom-width: 1px !important;
  transition: background-color 0.25s ease, color 0.25s ease !important;
}
.site-nav:not(.is-solid) .nav-cta:hover { background: rgba(255,255,255,0.12); border-color: currentColor; }
.site-nav.is-solid .nav-cta { border-color: var(--navy); }
.site-nav.is-solid .nav-cta:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 21, 37, 0.55), rgba(7, 21, 37, 0.35) 40%, rgba(7, 21, 37, 0.72)),
    linear-gradient(105deg, rgba(7, 21, 37, 0.72) 0%, rgba(7, 21, 37, 0.28) 65%, rgba(7, 21, 37, 0.15) 100%);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  width: 100%;
  padding-block: clamp(8rem, 16vh, 11rem) clamp(4rem, 10vh, 6rem);
  max-width: var(--container);
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.6rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 17ch;
  margin-bottom: 1.8rem;
}

.hero-lede {
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.4vw, 1.1875rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Introduction ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 62rem;
}

.intro-rule {
  width: 3px;
  background: var(--blue-accent);
  margin-top: 0.9rem;
  min-height: 100%;
}

.intro .display { margin-bottom: 2rem; max-width: 16ch; }

.intro-copy {
  max-width: 62ch;
  font-size: 1.125rem;
  color: var(--charcoal);
}
.intro-copy p + p { margin-top: 1.2em; }

/* ---------- What We Do ---------- */

.numbered-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.numbered-item {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) 1fr;
  gap: clamp(1rem, 4vw, 4rem);
  padding-block: clamp(1.8rem, 4vw, 2.8rem);
  border-top: 1px solid var(--border);
  transition: background-color 0.3s ease;
}
.numbered-item:last-child { border-bottom: 1px solid var(--border); }

.item-number {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--blue-accent);
  line-height: 1.3;
}

.numbered-item h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  color: var(--navy);
  margin-bottom: 0.7rem;
  display: inline-block;
  background-image: linear-gradient(var(--blue-accent), var(--blue-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.35s ease;
  padding-bottom: 3px;
}
.numbered-item:hover h3 { background-size: 100% 1px; }

.numbered-item p {
  max-width: 58ch;
  color: var(--grey);
  font-size: 1.0625rem;
}

/* ---------- Philosophy ---------- */

.philosophy-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.philosophy-media {
  margin: 0;
  position: sticky;
  top: 6.5rem;
}
.philosophy-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.philosophy-text .display { margin-bottom: 1.6rem; }
.philosophy-text > p {
  max-width: 56ch;
  font-size: 1.125rem;
  margin-bottom: 2.8rem;
}

.principles { margin: 0; }

.principle {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

.principle dt {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.principle dt span {
  color: var(--blue-accent);
  font-size: 1rem;
  margin-right: 0.8rem;
}
.principle dd {
  margin: 0;
  color: var(--grey);
  max-width: 52ch;
}

/* ---------- Services ---------- */

.section-lede {
  max-width: 56ch;
  font-size: 1.125rem;
  color: var(--grey);
  margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem));
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-item {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding-block: clamp(2.2rem, 5vw, 3.4rem);
  border-top: 1px solid var(--border);
}
.service-item:last-child { border-bottom: 1px solid var(--border); }

.service-head .item-number {
  display: block;
  margin-bottom: 0.9rem;
}

.service-head h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 0.8rem;
  line-height: 1.15;
}

.service-pitch {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--blue-accent);
  max-width: 30ch;
}

.service-body > p:first-child {
  color: var(--charcoal);
  max-width: 62ch;
}

.service-includes {
  font-size: 0.9375rem;
  color: var(--grey);
  max-width: 62ch;
  padding-left: 1.1rem;
  border-left: 2px solid var(--blue-accent);
  margin-bottom: 1.4rem;
}

/* ---------- How engagements work ---------- */

.engagement-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.engagement-grid .display { margin-bottom: 1.6rem; max-width: 14ch; }
.engagement-grid > div > p {
  max-width: 52ch;
  font-size: 1.125rem;
}

.term {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}
.term:last-child { border-bottom: 1px solid var(--border); }

.term h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.term p {
  color: var(--grey);
  max-width: 56ch;
}

/* ---------- Research products ---------- */

.research-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.research-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
  border-top: 1px solid var(--border);
}
.research-item:last-child { border-bottom: 1px solid var(--border); }

.research-info h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.research-info p {
  color: var(--grey);
  max-width: 60ch;
}

.research-item .text-link { flex-shrink: 0; white-space: nowrap; }

/* ---------- Insights ---------- */

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 5rem);
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--grey);
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}
.article-category {
  color: var(--blue-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.article h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}
.article h3 a {
  color: var(--navy);
  text-decoration: none;
  background-image: linear-gradient(var(--navy), var(--navy));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.35s ease;
  padding-bottom: 2px;
}
.article h3 a:hover { background-size: 100% 1px; }

.article > p {
  color: var(--grey);
  max-width: 52ch;
  margin-bottom: 1.1rem;
}

/* ---------- Consulting (dark) ---------- */

.consulting {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
}

.consulting-inner {
  max-width: 56rem;
  text-align: left;
}

.consulting .display {
  color: #fff;
  max-width: 18ch;
  margin-bottom: 1.8rem;
}

.consulting p {
  max-width: 58ch;
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 2.6rem;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.about-text .display { margin-bottom: 1.8rem; }
.about-text p {
  max-width: 58ch;
  font-size: 1.125rem;
}
.about-text p + p { margin-top: 1.2em; }

.about-media { margin: 0; }
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Stats ---------- */

.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat { text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }

.stat-value {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--grey);
  font-size: 0.9375rem;
  margin: 0;
}

/* ---------- Final CTA ---------- */

.cta-inner {
  max-width: 54rem;
  text-align: center;
  margin-inline: auto;
}

.cta .display {
  margin-bottom: 1.6rem;
}

.cta p {
  max-width: 52ch;
  margin-inline: auto;
  font-size: 1.125rem;
  color: var(--grey);
  margin-bottom: 2.6rem;
}

.cta .hero-actions { justify-content: center; }

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

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.brand-footer { color: #fff; }

.footer-tagline {
  margin-top: 1.2rem;
  font-size: 0.9375rem;
  max-width: 30ch;
}

.footer-contact { font-size: 0.9375rem; }
.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.footer-contact a:hover { color: #fff; border-bottom-color: #fff; }

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.4rem;
}

.footer-links { display: flex; flex-direction: column; align-items: flex-start; }
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease;
}
.footer-links a:hover { color: #fff; }

.footer-note {
  font-size: 0.9375rem;
  max-width: 34ch;
  margin-bottom: 1.4rem;
}

.signup-form {
  display: flex;
  max-width: 24rem;
}

.signup-form input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
}
.signup-form input::placeholder { color: rgba(255, 255, 255, 0.45); }
.signup-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.signup-form button {
  padding: 0.75rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy-deep);
  background: var(--warm-white);
  border: 1px solid var(--warm-white);
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.signup-form button:hover { background: var(--blue-soft); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom p { margin: 0; }

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-legal a:hover { color: #fff; }
.footer-legal span { margin-inline: 0.5rem; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

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

@media (max-width: 960px) {
  .philosophy-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .philosophy-media { position: static; order: -1; }
  .philosophy-media img,
  .about-media img { aspect-ratio: 16 / 10; }

  .about-media { order: -1; }

  .article-grid { grid-template-columns: 1fr; gap: 3rem; }

  .service-item { grid-template-columns: 1fr; gap: 1.2rem; }
  .service-pitch { max-width: none; }

  .engagement-grid { grid-template-columns: 1fr; }

  .research-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(22rem, 85vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 6rem 2.2rem 2.2rem;
    background: var(--navy-deep);
    color: #fff;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    visibility: hidden;
  }
  .nav-links.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-links > a {
    font-size: 1.15rem;
    padding-block: 0.7rem;
  }
  .nav-cta { margin-top: 1.4rem; }

  .site-nav.menu-open { color: #fff; }
  .site-nav.menu-open .nav-toggle { position: relative; z-index: 20; }
  .nav-links { z-index: 10; }

  .hero { min-height: 78vh; }

  .intro-grid { grid-template-columns: auto 1fr; gap: 1.2rem; }
  .intro-rule { width: 2px; }

  .numbered-item { grid-template-columns: 1fr; gap: 0.5rem; }

  .stats-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--border); padding-top: 2.4rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; text-align: center; }
  .cta .hero-actions .btn { width: 100%; }
  .signup-form { flex-direction: column; }
  .signup-form input { border-right: 1px solid rgba(255,255,255,0.25); }
  .signup-form button { margin-top: 0.6rem; }
}
