/* CS Shruti Pandey — Krit Corp
   Light mode only • Brand: Navy / Red / White • Sans-serif throughout */

:root {
  /* Brand palette — Krit Corp */
  --brand-navy:  #0C1A30;
  --brand-red:   #E00000;
  --brand-white: #FFFFFF;

  /* Color — Material 3 style scheme, mapped to brand */
  --md-primary: #0C1A30;
  --md-primary-container: #e3e7ef;
  --md-on-primary: #ffffff;
  --md-on-primary-container: #0C1A30;

  --md-secondary: #0C1A30;
  --md-secondary-container: #e3e7ef;
  --md-on-secondary: #ffffff;
  --md-on-secondary-container: #0C1A30;

  --md-tertiary: #E00000;
  --md-tertiary-container: #fde0e0;
  --md-on-tertiary: #ffffff;
  --md-on-tertiary-container: #5a0000;

  --md-surface: #ffffff;
  --md-surface-dim: #f4f4f7;
  --md-surface-bright: #ffffff;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #fafafa;
  --md-surface-container: #f3f4f7;
  --md-surface-container-high: #ebedf1;
  --md-surface-container-highest: #e3e6eb;

  --md-on-surface: #0C1A30;
  --md-on-surface-variant: #4a5566;
  --md-outline: #c4c8d0;
  --md-outline-variant: #e0e2e7;

  --md-error: #E00000;
  --md-on-error: #ffffff;
  --md-error-container: #fde0e0;

  /* Type scale (Material 3) */
  --md-display-large: clamp(40px, 6vw, 57px);
  --md-display-medium: clamp(34px, 4.5vw, 45px);
  --md-display-small: clamp(28px, 3.5vw, 36px);
  --md-headline-large: clamp(26px, 3vw, 32px);
  --md-headline-medium: clamp(22px, 2.4vw, 28px);
  --md-headline-small: clamp(20px, 2vw, 24px);
  --md-title-large: 22px;
  --md-title-medium: 16px;
  --md-title-small: 14px;
  --md-body-large: 17px;
  --md-body-medium: 15px;
  --md-body-small: 13px;
  --md-label-large: 14px;
  --md-label-medium: 12px;

  /* Shape */
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 28px;
  --md-shape-full: 999px;

  /* Elevation */
  --md-elev-1: 0 1px 2px rgba(15,20,25,0.06), 0 1px 3px rgba(15,20,25,0.04);
  --md-elev-2: 0 2px 6px rgba(15,20,25,0.08), 0 1px 2px rgba(15,20,25,0.04);
  --md-elev-3: 0 6px 12px rgba(15,20,25,0.10), 0 2px 4px rgba(15,20,25,0.06);

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 112px);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.3, 0, 0, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Roboto Flex', system-ui, sans-serif;
  font-size: var(--md-body-large);
  line-height: 1.6;
  color: var(--md-on-surface);
  background: var(--md-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Clip any horizontal overflow without creating a scroll context (which would
     break position:sticky on the services LHS). Modern browsers only. */
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: 'Roboto Flex', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--md-on-surface);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

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

/* ===== LAYOUT PRIMITIVES ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--tinted {
  background: var(--md-surface-container-low);
}

.section__head {
  max-width: 760px;
  margin-bottom: 48px;
}
.section__eyebrow {
  display: inline-block;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--md-label-large);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--md-error);
  margin-bottom: 14px;
}
.section__title {
  font-size: var(--md-display-small);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section__lead {
  font-size: var(--md-body-large);
  color: var(--md-on-surface-variant);
  max-width: 640px;
}
/* Single-line variant — used in section heads where the copy fits on one line */
.section__lead--inline {
  max-width: none;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .section__lead--inline { white-space: normal; }
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--md-outline-variant);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

/* Brand: SVG wordmark + small subtitle */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--md-on-surface);
  flex-shrink: 1;
  min-width: 0;
}
.brand__logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}
.brand__logo--img {
  height: 38px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
.brand__logo-word {
  font-family: 'Roboto Flex', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900;
  font-size: 104px;
  letter-spacing: -2px;
}
.brand__logo-navy { fill: var(--brand-navy); }
.brand__logo-accent { fill: var(--brand-red); }
.brand__sub {
  display: none;
  font-family: 'Roboto Flex', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--md-on-surface-variant);
  white-space: nowrap;
  border-left: 2px solid var(--md-outline-variant);
  padding-left: 12px;
  line-height: 1.2;
}
@media (min-width: 720px) {
  .brand__sub { display: inline-block; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.nav__links li { flex-shrink: 0; }
.nav__links a {
  display: inline-block;
  padding: 10px 11px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--md-on-surface);
  border-radius: var(--md-shape-sm);
  transition: background 160ms var(--ease-standard), color 160ms;
  white-space: nowrap;
}
.nav__links a:hover {
  background: var(--md-surface-container);
  color: var(--md-error);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--md-shape-full);
  background: var(--md-error);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms;
}
.nav__cta:hover { background: #b80000; }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  border-radius: 8px;
}
.nav__toggle-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--md-on-surface);
  border-radius: 1px;
  transition: transform 220ms var(--ease-standard, ease), opacity 180ms;
}
/* Animate hamburger → X when open */
.nav__toggle.is-open .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.is-open .nav__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}
.nav__toggle.is-open .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 880px) {
  .nav { height: 64px; gap: 16px; }
  .brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 56px); /* leave room for the 40px hamburger + 16px gap */
    overflow: hidden;
  }
  .brand__logo--img { height: 28px; max-height: 100%; }
  .nav .nav__links { display: none !important; }
  .nav .nav__cta { display: none !important; }
  .nav .nav__toggle {
    display: flex !important;
    flex-shrink: 0;
    margin-left: auto; /* always pin hamburger to the right */
  }
}
@media (max-width: 380px) {
  .brand__logo--img { height: 24px; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
}
@media (max-width: 880px) {
  .mobile-nav {
    display: block;
    position: fixed;
    top: var(--header-height, 64px);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-height, 64px));
    overflow-y: auto;
    background: var(--md-surface);
    border-top: 1px solid var(--md-outline-variant);
    border-bottom: 1px solid var(--md-outline-variant);
    padding: 20px var(--gutter) 28px;
    /* Fade + small slide in (no longer travels behind the translucent navbar,
       so menu items can't appear over the logo during animation). */
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 220ms var(--ease-standard), transform 220ms var(--ease-standard);
    z-index: 49;
    pointer-events: none;
    box-shadow: var(--md-elev-2);
  }
  .mobile-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
.mobile-nav ul,
.mobile-nav .mobile-nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav a {
  display: block;
  padding: 16px 4px;
  font-family: 'Roboto Flex', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  color: var(--md-on-surface);
  border-bottom: 1px solid var(--md-outline-variant);
}
.mobile-nav .nav__cta,
.mobile-nav .mobile-nav__cta {
  margin-top: 16px;
  height: 48px;
  padding: 0 24px;
  display: inline-flex;
  width: 100%;
  justify-content: center;
}

/* Lock background scroll while the drawer is open */
body.has-mobile-nav-open { overflow: hidden; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--md-label-large);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--md-shape-full);
  border: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10),
    0 1px 2px rgba(12, 26, 48, 0.10),
    0 8px 20px rgba(12, 26, 48, 0.14);
  transition: background 200ms, color 200ms, transform 200ms, box-shadow 200ms, border-color 200ms;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--filled {
  background: rgba(12, 26, 48, 0.55);
  color: var(--md-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn--filled:hover {
  background: rgba(26, 42, 69, 0.70);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(12, 26, 48, 0.14),
    0 12px 28px rgba(12, 26, 48, 0.20);
}
.btn--accent {
  background: rgba(214, 16, 33, 0.58);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn--accent:hover {
  background: rgba(184, 0, 0, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 4px rgba(184, 0, 0, 0.20),
    0 12px 28px rgba(184, 0, 0, 0.28);
}
.btn--outlined {
  background: rgba(255, 255, 255, 0.22);
  color: var(--md-on-surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(12, 26, 48, 0.06),
    0 6px 16px rgba(12, 26, 48, 0.08);
}
.btn--outlined:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(12, 26, 48, 0.35);
  color: var(--md-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 2px 4px rgba(12, 26, 48, 0.08),
    0 10px 22px rgba(12, 26, 48, 0.14);
}

/* Text-only links don't get glass — they're inline, not chips */
.btn--text {
  background: transparent;
  color: var(--md-error);
  height: auto;
  padding: 8px 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border: none;
}
.btn--text:hover { color: #b80000; transform: none; }

.btn .icon { width: 18px; height: 18px; stroke-width: 2; }

/* ===== ICONS ===== */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-standard), transform 600ms var(--ease-standard);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 600ms var(--ease-standard), transform 600ms var(--ease-standard);
}
.reveal-words .word + .word { margin-left: 0.28em; }
/* After a hard break, don't push the next word in by the inter-word margin */
.reveal-words br + .word { margin-left: 0; }
.reveal-words.is-visible .word { opacity: 1; transform: none; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  left: 0; right: 0;
  top: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: var(--md-error);
  transition: width 80ms linear;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-words .word { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
