/* ==========================================================
   Kovai Group LLP — Apple-inspired design system
   ========================================================== */

:root {
  --ink: #0c0e12;
  --charcoal: #1d1d1f;
  --grey-900: #1d1d1f;
  --grey-600: #6e6e73;
  --grey-400: #86868b;
  --grey-200: #d2d2d7;
  --grey-100: #f5f5f7;
  --white: #ffffff;
  --gold: #b3872f;
  --gold-light: #e4c577;
  --blue: #0071e3;
  --blue-dark: #0058b0;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max: 1200px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--grey-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

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

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s var(--ease);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--grey-900);
  opacity: 0.85;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 24px;
  height: 18px;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--grey-900);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.nav-mobile a {
  padding: 16px 24px;
  font-size: 17px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-mobile.open { display: flex; }

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

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 100px;
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 60%);
}
.hero-eyebrow {
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 920px;
}
.hero h1 span { color: var(--gold); }
.hero p.lead {
  margin-top: 26px;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--grey-600);
  max-width: 640px;
  line-height: 1.5;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: transparent; color: var(--blue); border-color: rgba(0,113,227,0.35); }
.btn-secondary:hover { border-color: var(--blue); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #9a7327; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-tight { padding: 80px 0; }
.section-dark { background: var(--ink); color: var(--white); }
.section-grey { background: var(--grey-100); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-head.left { text-align: left; margin: 0 0 56px; }
.section-head h2 {
  font-size: clamp(30px, 4.5vw, 52px);
  letter-spacing: -0.025em;
}
.section-head p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--grey-600);
  line-height: 1.5;
}
.section-dark .section-head p { color: rgba(255,255,255,0.6); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 70px 0;
}
.stat { text-align: center; }
.stat-value {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--gold-light);
}
.stat-label {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 34px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.18);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--grey-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: var(--gold);
  margin-bottom: 24px;
}
.card-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-400); margin-bottom: 8px; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--grey-600); font-size: 15px; line-height: 1.55; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; font-size: 14px; color: var(--blue); font-weight: 500;
}

/* dark card variant */
.card-dark {
  background: #17171a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s;
}
.card-dark:hover { border-color: rgba(228,197,119,0.4); }
.card-dark h3 { color: var(--gold-light); font-size: 22px; margin-bottom: 10px; }
.card-dark p { color: rgba(255,255,255,0.6); font-size: 15px; line-height: 1.55; }

/* ---------- Sector tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-left: 1px solid rgba(255,255,255,0.1);
}
.tile {
  border-right: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 30px;
  transition: background 0.3s;
}
.tile:hover { background: rgba(255,255,255,0.03); }
.tile h4 { color: var(--white); font-size: 17px; margin-bottom: 8px; }
.tile p { color: rgba(255,255,255,0.45); font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.025em; }
.split p { color: var(--grey-600); font-size: 17px; line-height: 1.6; margin-top: 20px; }
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pillar { background: var(--white); padding: 28px; }
.pillar-label { color: var(--gold); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.pillar p { color: var(--grey-600); font-size: 14.5px; line-height: 1.55; margin: 0; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 20px; left: 0; right: 0;
  height: 1px;
  background: var(--grey-200);
}
.timeline-item { position: relative; padding-top: 44px; }
.timeline-dot {
  position: absolute; top: 14px; left: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--white);
}
.timeline-year { color: var(--gold); font-weight: 700; font-size: 20px; display: block; margin-bottom: 6px; }
.timeline-item h4 { font-size: 15px; margin-bottom: 6px; }
.timeline-item p { color: var(--grey-600); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
}

/* ---------- Leadership ---------- */
.leader-photo {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #1d1d1f, #2c2c2e);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.25);
  font-size: 40px; font-weight: 700;
  margin-bottom: 20px;
}
.leader h3 { font-size: 18px; }
.leader .role { color: var(--gold); font-size: 14px; margin: 6px 0 10px; }
.leader p.bio { color: var(--grey-600); font-size: 14.5px; line-height: 1.55; }

/* ---------- News ---------- */
.news-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--grey-100), #e8e8ea);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  transition: transform 0.5s var(--ease);
  overflow: hidden;
}
.news-card:hover .news-image { transform: scale(1.02); }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--grey-400); margin-bottom: 10px; }
.news-meta .cat { color: var(--gold); font-weight: 600; }
.news-card h3 { font-size: 19px; line-height: 1.35; margin-bottom: 10px; }
.news-card p { color: var(--grey-600); font-size: 15px; line-height: 1.55; margin-bottom: 14px; }

/* ---------- CTA banners ---------- */
.cta {
  text-align: center;
  padding: 120px 24px;
}
.cta h2 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -0.03em; max-width: 780px; margin: 0 auto; line-height: 1.1; }
.cta p { margin-top: 20px; color: var(--grey-600); font-size: 18px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta .hero-actions { margin-top: 36px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 16px; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid.two-col { grid-template-columns: 1fr; } }
.field {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  transition: border-color 0.2s;
}
.field:focus { outline: none; border-color: var(--blue); }
textarea.field { resize: vertical; }
.form-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--grey-600);
  background: var(--grey-100);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
}
.form-note.success { color: #1a7a3d; background: #e9f8ee; }
.form-note.error { color: #b3261e; background: #fdeceb; }

/* ---------- Careers list ---------- */
.job-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--grey-200); gap: 16px; flex-wrap: wrap;
}
.job-row:first-child { border-top: 1px solid var(--grey-200); }
.job-row h3 { font-size: 18px; }
.job-row .meta { color: var(--grey-600); font-size: 14px; margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.6); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 70px 24px 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-logo { height: 34px; width: auto; margin-bottom: 16px; filter: brightness(1.4); }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.45); }
.footer-col h4 { color: var(--white); font-size: 13px; margin-bottom: 18px; font-weight: 600; }
.footer-col a, .footer-col span { display: block; font-size: 14px; margin-bottom: 12px; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0; display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 10px;
}
.footer-legal { display: flex; gap: 22px; }
.footer-legal a:hover { color: rgba(255,255,255,0.7); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: var(--ink);
  color: var(--white);
  padding: 160px 24px 90px;
  text-align: left;
}
.page-header h1 { font-size: clamp(34px, 5.5vw, 60px); letter-spacing: -0.03em; max-width: 700px; }
.page-header p { margin-top: 18px; color: rgba(255,255,255,0.55); font-size: 17px; max-width: 560px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 60px; }
