/* Sanjai Katari portfolio: additions on top of the Webflow base styles. */

:root {
  --k-ink: #1f1f1f;
  --k-paper: #f5f2f3;
  --k-white: #ffffff;
  --k-dark: #0f0f0f;
  --k-card-dark: #181818;
  --k-line: rgba(31, 31, 31, 0.14);
  --k-line-dark: rgba(245, 242, 243, 0.14);
  --k-orange: #eb381c;
  --k-gold: #ffcd71;
  --k-radius: 1.25rem;
}

body { background-color: var(--k-paper); }

/* nav wordmark (full name) */
.k-nav-logo { display: block; width: clamp(13rem, 21vw, 21rem); height: auto; }
@media (max-width: 991px) {
  .k-nav-logo { width: 13rem; }
  .bold-nav-full__logo { aspect-ratio: auto; width: 13rem; }
}
@media (max-width: 479px) {
  .k-nav-logo, .bold-nav-full__logo { width: 11.5rem; }
}

/* loader: "SANJAI [image] KATARI" is twelve letters, so size the word to the
   viewport instead of the template's fixed 12.5em, and keep the image box in
   proportion to the letters */
.willem__h1 { font-size: min(12.5rem, 9.4vw); }
.willem__letter { font-size: inherit; }
.willem-loader__box { height: 0.72em; top: calc(2.4rem - 0.06em); }
@media (max-width: 479px) {
  .willem-loader__box { margin-right: 0.15rem; }
}

/* section header modifier: same grid as the template's `{ LABEL }` header */
.k-head__icon { grid-area: 1 / 4 / 2 / 6; justify-self: center; }
.k-head__r { grid-area: 1 / 7 / 2 / 8; }
.k-head__b { grid-area: 1 / 8 / 2 / 9; justify-self: end; }
.k-head--tight { margin-bottom: 4rem; }

/* intro rows reuse .article-wrapper */
.k-intro { margin-bottom: 4rem; }
.k-intro__text { grid-area: 1 / 4 / 2 / 9; }
@media (max-width: 767px) {
  .k-intro { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2.5rem; }
  .k-head--tight { margin-bottom: 2.5rem; }
}

/* ---------------------------------------------------------------- key numbers */
.k-stats { padding-top: 2rem; }
.k-stats__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--k-line);
}
.k-stat { padding: 1.75rem 1.5rem 0 0; }
.k-stat + .k-stat { border-left: 1px solid var(--k-line); padding-left: 1.5rem; }
.k-stat__num {
  margin: 0 0 1rem;
  font-size: clamp(2.75rem, 5vw, 5.25rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.k-stat__label {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
@media (max-width: 991px) {
  .k-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .k-stat, .k-stat + .k-stat { padding: 1.5rem 1rem 1.5rem 0; border-left: 0; border-bottom: 1px solid var(--k-line); }
  .k-stat:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--k-line); }
  .k-stat:last-child { grid-column: span 2; }
}

/* ---------------------------------------------------------------- map */
.k-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #0f0f0f; }

/* ---------------------------------------------------------------- venture / project slides */
.case-content.k-sky { background-color: #dce8f2; }
.case-content.k-sage { background-color: #d9e4cc; }
.case-content.k-brown { background-color: #5a3b26; color: #fff; }
.case-content.k-navy { background-color: #0d2a4a; color: #fff; }
.case-content.k-aqua { background-color: #d6ebee; }
.case-content.k-mint { background-color: #d8eee6; }
.case-content.k-wheat { background-color: #f4dfb2; }
.case-content.k-forest { background-color: #2f4a2a; color: #fff; }

.section-case .case-content { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.section-case .case-content_warpper { grid-row-gap: 2.5rem; }
.k-case { align-items: start; }
.k-case-left { grid-area: 1 / 1 / 2 / 9; gap: 2rem; }
.k-case-media {
  grid-area: 1 / 10 / 2 / 17;
  justify-self: end;
  width: 100%;
  max-height: calc(100vh - 15rem);
  max-width: calc(100vh - 15rem);
}
.k-case-media .case-content_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
}
.k-case-kicker {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.k-case-desc { font-size: 1.375rem; line-height: 1.35; max-width: 34ch; margin: 0; }
.k-facts { margin: 2rem 0 0; max-width: 40rem; }
.k-facts > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 22%, transparent);
}
.k-facts dt {
  font-size: 0.7rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}
.k-facts dd { margin: 0; font-size: 0.95rem; line-height: 1.45; font-weight: 500; }
.k-case-link { font-size: 1.5rem; }

@media (max-width: 991px) {
  .section-case .case-content { padding-top: 5rem; }
  .section-case .case-content_warpper { grid-row-gap: 1rem; }
  .k-case-left { gap: 1rem; }
  .k-case-media { max-width: none; max-height: none; height: 24vh; aspect-ratio: auto; }
  .k-case-desc { font-size: 1.05rem; }
  .k-facts { margin-top: 1rem; }
  .k-facts > div { grid-template-columns: 6.5rem 1fr; padding: 0.4rem 0; gap: 0.75rem; }
  .k-facts dd { font-size: 0.82rem; }
  .k-case-link { font-size: 1.1rem; }
}
@media (max-width: 479px) {
  .k-facts > div:nth-child(n+4) { display: none; }
  .k-case-media { height: 20vh; }
}

/* ---------------------------------------------------------------- Saathviga */
/* sections that follow a slide deck sit above its pinned last slide and slide over it */
.k-farm,
.k-group { position: relative; z-index: 2; }
.k-farm { background-color: var(--k-paper); }
.k-farm__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 0.75rem;
  align-items: stretch;
}
.k-farm__map {
  margin: 0;
  background: #fbf6ee;
  border-radius: var(--k-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.k-farm__map img { width: 100%; height: auto; display: block; flex: 1; object-fit: cover; }
.k-farm__map figcaption { padding: 1rem 1.25rem 1.25rem; line-height: 1.6; opacity: 0.7; }
.k-farm__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.k-tile {
  background: var(--k-white);
  border-radius: var(--k-radius);
  padding: 1.5rem;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}
.k-tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.k-tile__label {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--k-orange);
}
.k-tile__icon { width: 3.25rem; height: 3.25rem; }
.k-tile__num { margin: 0; font-size: 2.6rem; line-height: 1; font-weight: 500; letter-spacing: -0.03em; }
.k-tile__unit { margin: 0.4rem 0 0; font-size: 0.85rem; font-weight: 500; }
.k-tile__note { margin: 0; font-size: 0.82rem; line-height: 1.45; opacity: 0.7; }
.k-farm__team { margin: 1.5rem 0 0; text-align: right; }
@media (max-width: 991px) {
  .k-farm__grid { grid-template-columns: 1fr; }
  .k-farm__tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
  .k-farm__tiles { grid-template-columns: 1fr; }
  .k-tile { min-height: 0; }
  .k-farm__team { text-align: left; }
}

/* ---------------------------------------------------------------- projects intro */
.k-projects-intro { padding-bottom: 2rem; }

/* ---------------------------------------------------------------- group companies */
.k-group { background: var(--k-dark); color: var(--k-paper); }
.k-group .mwg-044_header-icon-2 { color: var(--k-orange); }
.k-group__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.k-gcard {
  background: var(--k-card-dark);
  border: 1px solid #242424;
  border-radius: var(--k-radius);
  padding: 1.5rem;
  min-height: 19rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, transform 0.3s;
}
.k-gcard:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.k-gcard__top { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.k-gcard__idx { opacity: 0.5; }
.k-gcard__sector { color: var(--k-gold); text-align: right; }
.k-gcard__icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.9rem;
  background: var(--k-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}
.k-gcard__icon img { width: 82%; height: 82%; }
.k-gcard__name { margin: 0; font-size: 1.2rem; line-height: 1.25; font-weight: 500; }
.k-gcard__brief { margin: 0; font-size: 0.85rem; line-height: 1.5; opacity: 0.68; }
.k-gcard--summary { background: var(--k-orange); border-color: var(--k-orange); color: #fff; justify-content: space-between; }
.k-gcard--summary .k-gcard__idx { opacity: 0.85; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.k-gcard__sectors { margin: 0; font-size: 1.6rem; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 991px) { .k-group__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .k-group__grid { grid-template-columns: 1fr; } .k-gcard { min-height: 0; } }

/* ---------------------------------------------------------------- earlier ventures */
.k-rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--k-line); }
.k-row {
  display: grid;
  grid-template-columns: 2fr 5fr 6fr;
  gap: 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--k-line);
  align-items: baseline;
}
.k-row__period { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-orange); }
.k-row__name { margin: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.k-row__text { margin: 0; font-size: 0.98rem; line-height: 1.5; font-weight: 500; opacity: 0.8; }
@media (max-width: 767px) {
  .k-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .k-row__name { font-size: 1.3rem; }
}

/* ---------------------------------------------------------------- heritage */
.k-heritage__grid { display: grid; grid-template-columns: 7fr 5fr; gap: 4rem; align-items: center; }
.k-heritage__art { margin: 0; border-radius: var(--k-radius); overflow: hidden; }
.k-heritage__art img { width: 100%; height: auto; display: block; }
.k-heritage__copy .u-h3 { margin: 1rem 0 1.25rem; }
.k-heritage__copy .u-copy { margin: 0 0 1.75rem; max-width: 40ch; }
.k-units { list-style: none; margin: 0; padding: 0; }
.k-units li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--k-line);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 991px) { .k-heritage__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------------------------------------------------------------- journey cards */
.k-era-title { font-size: 1.85rem; line-height: 1.15; }
.k-era-text { font-size: 0.95rem; line-height: 1.45; }
.k-era-list { line-height: 1.9; }

/* ---------------------------------------------------------------- footer / contact */
.k-form { margin: 0 0 15px; }
.k-foot-text { margin: 0; }
.mwg044-footer_top-email.k-foot-markets {
  font-size: 1.4rem;
  line-height: 1.25;
  text-decoration: none;
  margin: 0;
  max-width: 34ch;
}
@media (max-width: 767px) { .mwg044-footer_top-email.k-foot-markets { font-size: 1.15rem; } }

.single-rain-emoji-image-crab,
.single-rain-emoji-image-mango {
  background-position: 50%;
  background-size: contain;
  background-repeat: no-repeat;
  width: 100%;
  padding-top: 100%;
}
.single-rain-emoji-image-crab { background-image: url("/assets/svg/rain-crab.svg"); }
.single-rain-emoji-image-mango { background-image: url("/assets/svg/rain-mango.svg"); }

@media (prefers-reduced-motion: reduce) {
  .k-gcard { transition: none; }
}

/* ---------------------------------------------------------------- fallback
   Applied by the inline check at the end of <body> when GSAP or ScrollTrigger
   never arrived (slow or blocked network). Shows a static hero and makes
   every element the animations would have revealed visible. */
.k-fallback .willem-header,
.k-fallback .willem-header.is--loading.is--hidden {
  visibility: visible;
  min-height: 100vh;
  background: #1a1a1a url("/assets/img/sanjai-hero-2048.webp") center 20% / cover no-repeat;
}
.k-fallback .willem-loader { display: none; }
.k-fallback .nav-anim,
.k-fallback [cards-anim] > *,
.k-fallback [data-k-reveal] > *,
.k-fallback .mwg046-letter span,
.k-fallback .case-text,
.k-fallback .case-content_left p,
.k-fallback .case-content_link {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
.k-fallback .case-content_image-warpper { clip-path: none !important; }
.k-fallback .scaling-element-video .k-map,
.k-fallback .scaling-video { transform: none !important; }

/* hero loader image framing & mobile responsiveness */
.willem__growing-image-wrap img {
  object-fit: cover !important;
  object-position: 50% 20% !important;
}
@media (max-width: 767px) {
  .willem__growing-image-wrap img {
    object-position: 50% 18% !important;
  }
}
