/* ==========================================================================
   KrishTech — static rebuild of the Squarespace 7.1 site (krishtech.dev)
   The layout mirrors Squarespace's "fluid engine": every section is a
   26-column CSS grid (24 content columns + 2 gutter columns) on desktop and a
   10-column grid (8 + 2) on mobile. Each block declares its grid area with
   --gm (mobile) and --gd (desktop), exactly like the original site.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Oxanium";
  src: url("../fonts/oxanium-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("../fonts/hind-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("../fonts/hind-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (from the Squarespace site palette) ---------- */
:root {
  --white: #ffffff;
  --black: #000000;
  --accent: hsl(241.8, 64.9%, 40.2%);        /* #2824a9 */
  --light-accent: hsl(45, 11.8%, 86.7%);
  --dark-accent: hsl(111.4, 11.1%, 12.4%);
  --field-bg: #fafafa;

  --heading-font: "Oxanium", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body-font: "Hind", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max-page-width: 1500px;
  --site-gutter: 4vw;          /* pagePadding */
  --header-vpad: 1vw;          /* header-vert-padding */
  --logo-height: 50px;
  --header-height: calc(var(--logo-height) + 2 * var(--header-vpad));

  --tsv: 1.4;                  /* default text size value (paragraph) */
}
@media (max-width: 767px) {
  :root {
    --site-gutter: 6vw;
    --header-vpad: 6vw;        /* mobile-header-vert-padding */
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 13px;             /* Squarespace base font size */
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--body-font);
  font-weight: 400;
  font-style: normal;
  letter-spacing: .01em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }

/* ---------- Responsive type scale (Squarespace 7.1 formulas) ----------
   Each element sets --tsv (its "size value" in rem). The font size is:
   mobile portrait: (tsv - 1) * .012 * min(100vh, 900px) + 1rem
   desktop:         min((tsv - 1) * 1.2vw + 1rem, max((tsv - 1) * .012 * maxPageWidth + 1rem, tsv * 1rem))
*/
body, h1, h2, h3, h4, h5, h6, p, li, .btn,
.header-nav a, .form-title, .form-caption, .form-required, .form-input, .form-msg,
.accordion-trigger, .accordion-body {
  font-size: calc((var(--tsv) - 1) * calc(.012 * min(100vh, 900px)) + 1rem);
  line-height: 1.6em;
}
@media screen and (min-width: 768px), screen and (orientation: landscape) {
  body, h1, h2, h3, h4, h5, h6, p, li, .btn,
  .header-nav a, .form-title, .form-caption, .form-required, .form-input, .form-msg,
  .accordion-trigger, .accordion-body {
    font-size: min(
      calc((var(--tsv) - 1) * 1.2vw + 1rem),
      max(calc((var(--tsv) - 1) * 0.012 * var(--max-page-width) + 1rem), calc(var(--tsv) * 1rem))
    );
  }
}
h1 { --tsv: 6.1; }
h2 { --tsv: 3.6; }
h3 { --tsv: 2.4; }
h4 { --tsv: 1.6; }
p, li { --tsv: 1.4; }
p.large { --tsv: 2.4; }
p.small { --tsv: 1.2; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.02em;
  text-transform: none;
  line-height: calc(1.4em * (1 + (1 - var(--tsv)) / 25));
  margin: 0;
}
p { margin: 0; }
strong, b { font-weight: 700; }

/* Text blocks keep Squarespace's vertical rhythm */
.text-block > h1, .text-block > h2, .text-block > h3, .text-block > h4 { margin: 2rem 0; }
.text-block > p { margin: 1rem 0; }
.text-block > :first-child { margin-top: 0; }
.text-block > :last-child { margin-bottom: 0; }
.text-block { width: 100%; }
.text-block > * { white-space: pre-wrap; }
.text-center { text-align: center; }
.text-white { color: var(--white); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -150%);
  z-index: 200;
  padding: .75em 1.5em;
  background: var(--white);
  color: var(--black);
  font-family: var(--heading-font);
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: transform .2s;
}
.skip-link:focus { transform: translate(-50%, 0); outline: 2px solid var(--accent); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Header (fixed, "gradient" style, branding centered) ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  color: var(--white);
}
.header-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--black), rgba(0, 0, 0, 0));
  opacity: .98;
  pointer-events: none;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--header-vpad) var(--site-gutter);
}
.header-nav { flex: 1 1 0; }
.header-nav-list { display: inline-flex; align-items: center; }
.header-nav-item { margin-right: 1.5vw; }
.header-nav a {
  --tsv: 1.4;
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  padding-bottom: .1em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - .1em);
  transition: background-size .2s ease;
}
.header-nav a:hover,
.header-nav a:focus-visible,
.header-nav-item.is-active a {
  background-size: 100% 1px;
}
.header-logo { flex: 0 0 auto; }
.header-logo a { display: block; line-height: 0; }
.header-logo img {
  display: block;
  width: auto;
  height: var(--logo-height);
  max-height: 320px;
}
.header-actions { flex: 1 1 0; display: flex; justify-content: flex-end; align-items: center; }
.header-icon {
  display: block;
  width: 30px; height: 30px;
  color: var(--white);
  transition: opacity .2s;
}
.header-icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.header-icon:hover { opacity: .75; }

/* Burger (mobile only) */
.burger {
  display: none;
  position: relative;
  width: 35px; height: 35px;
  margin: 0; padding: 0;
  background: none; border: 0;
  cursor: pointer;
  color: var(--white);
}
.burger span {
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 1px;
  background: currentColor;
  transition: transform .3s ease;
}
.burger .bun-top { transform: translateY(-5.5px); }
.burger .bun-bottom { transform: translateY(5.5px); }
body.menu-open .burger .bun-top { transform: rotate(45deg); }
body.menu-open .burger .bun-bottom { transform: rotate(-45deg); }

/* Mobile menu overlay (black-bold theme) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--header-height) var(--site-gutter) var(--site-gutter);
  background: var(--black);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.mobile-menu-list {
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
  transform: translateY(20px);
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.mobile-menu a {
  display: block;
  padding: .15em 0;
  text-align: center;
  font-size: 8.5vmin;
  line-height: 1.2;
  color: var(--white);
  text-decoration: none;
}
.mobile-menu .is-active a { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.mobile-menu-social { margin-top: 2em; }
.mobile-menu-social .header-icon { width: 40px; height: 40px; }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
body.menu-open .mobile-menu-list { transform: translateY(0); }

@media (max-width: 767px) {
  .header-nav, .header-actions { display: none; }
  .header-inner { justify-content: space-between; }
  .header-logo img { max-height: 80px; }
  .burger { display: block; }
}
@media (min-width: 768px) {
  .mobile-menu { display: none; }
}

/* ---------- Sections ---------- */
#page { position: relative; }
.page-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* vertical-alignment--middle */
  width: 100%;
  background: var(--white);
  color: var(--black);
}
main > .page-section:first-child { padding-top: var(--header-height); } /* room for the fixed header */

.theme-white { background: var(--white); color: var(--black); }
.theme-black-bold { background: var(--black); color: var(--white); }
.theme-bright { background: var(--accent); color: var(--white); }

.section-height--small { min-height: 33vh; }
.section-height--medium { min-height: 66vh; }
.section-height--custom-10 { min-height: 10vh; }
.section-height--small > .content-wrapper { padding-top: 3.3vmax; padding-bottom: 3.3vmax; }
.section-height--medium > .content-wrapper { padding-top: 6.6vmax; padding-bottom: 6.6vmax; }
.section-height--custom-10 > .content-wrapper { padding-top: 1vmax; padding-bottom: 1vmax; }

.section-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.section-background img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.section-overlay {
  position: absolute;
  inset: 0;
  background: var(--black);
}
.content-wrapper { position: relative; z-index: 1; width: 100%; }

/* ---------- Fluid engine grid ---------- */
.fluid-engine {
  --grid-gutter: calc(var(--site-gutter) - 11px);
  --cell-max-width: calc((var(--max-page-width) - (11px * (24 - 1))) / 24);
  --container-width: min(var(--max-page-width), calc(100vw - var(--site-gutter) * 2));
  --row-height-scaling-factor: 0.0215;
  --rows-m: 1;
  --rows-d: 1;
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(var(--grid-gutter), 1fr)
    repeat(24, minmax(0, var(--cell-max-width)))
    minmax(var(--grid-gutter), 1fr);
  grid-template-rows: repeat(var(--rows-d), minmax(calc(var(--container-width) * var(--row-height-scaling-factor)), auto));
  row-gap: 11px;
  column-gap: 11px;
  overflow-x: clip;
}
@media (max-width: 767px) {
  .fluid-engine {
    --cell-max-width: calc((var(--max-page-width) - (11px * (8 - 1))) / 8);
    grid-template-columns:
      minmax(var(--grid-gutter), 1fr)
      repeat(8, minmax(0, var(--cell-max-width)))
      minmax(var(--grid-gutter), 1fr);
    grid-template-rows: repeat(var(--rows-m), minmax(24px, auto));
  }
}
.fe-block {
  grid-area: var(--gm);
  display: flex;
  flex-direction: column;
  justify-content: var(--jc, flex-start);
  min-width: 0;
}
@media (min-width: 768px) {
  .fe-block {
    grid-area: var(--gd);
    justify-content: var(--jcd, var(--jc, flex-start));
  }
}

/* Image block (stretched to its grid area, rounded like the original) */
.image-block {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 50px;
}
.image-block img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.image-block--contain img { object-fit: contain; }

/* Map block */
.map-block {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: #e5e3df;
}
.map-block iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ---------- Buttons (primary, outline, pill) ---------- */
.btn {
  --tsv: 1.4;
  display: inline-block;
  font-family: var(--heading-font);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.2em;
  text-transform: capitalize;
  text-decoration: none;
  text-align: center;
  padding: 1.9em 1.5em;
  border: 2px solid var(--accent);
  border-radius: 300px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--white); }
.theme-black-bold .btn { border-color: var(--white); color: var(--white); }
.theme-black-bold .btn:hover, .theme-black-bold .btn:focus-visible { background: var(--white); color: var(--black); }
.theme-bright .btn { border-color: var(--white); color: var(--white); }
.theme-bright .btn:hover { background: var(--white); color: var(--accent); }

/* Button block stretched to fill its grid area */
.button-block { flex: 1 1 auto; display: flex; width: 100%; min-height: 0; }
.button-block .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- Form (contact) ---------- */
.form-block { width: 100%; }
.form-item { margin: 0 0 20px; }
.form-fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.form-fieldset legend { padding: 0; }
.form-title { --tsv: 1.4; display: block; }
.form-caption { --tsv: 1.2; display: block; margin-top: 4px; }
.form-required { --tsv: 1.2; margin-left: .4em; }
.form-caption .form-required { margin-left: .3em; }
.name-fields { display: flex; gap: 0 10px; margin-top: 4px; }
.name-fields > div { flex: 1 1 0; min-width: 0; }
.name-fields .form-caption { margin-top: 0; }
.name-fields .form-input { margin-top: 0; }
.form-input {
  --tsv: 1.4;
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: var(--field-bg);
  color: var(--black);
  font-family: var(--body-font);
  line-height: 1.6em;
  letter-spacing: .01em;
}
.form-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-black-bold .form-input:focus { outline-color: var(--white); }
textarea.form-input { height: 100px; resize: vertical; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-button-wrapper { margin-top: 8px; }
.form-msg { --tsv: 1.2; margin-top: 1rem; display: none; }
.form-msg.is-visible { display: block; }
.form-msg.is-error { color: #ffb4b4; }
.form-block.is-sent form { display: none; }
.form-block.is-sent .form-msg { display: block; }

/* ---------- Social icons ---------- */
.social-links { display: flex; justify-content: center; gap: 8px; width: 100%; }
.social-links a {
  display: block;
  width: 28px; height: 28px;
  color: var(--white);
  transition: opacity .2s;
}
.social-links a:hover { opacity: .8; }
.social-links svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* ---------- Accordion ---------- */
.accordion {
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
  border-top: 1px solid currentColor;
}
.accordion-item { border-bottom: 1px solid currentColor; }
.accordion-heading { margin: 0; line-height: normal; }
.accordion-trigger {
  --tsv: 1.6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 30px 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font-family: var(--heading-font);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: normal;
  cursor: pointer;
}
.accordion-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.accordion-title { white-space: pre-wrap; }
.accordion-icon {
  position: relative;
  flex: 0 0 14px;
  width: 14px; height: 14px;
  margin-left: 1em;
  transition: transform .25s ease;
}
.accordion-icon::before {
  content: "";
  position: absolute;
  left: 2px; top: -1px;
  width: 9.9px; height: 9.9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.accordion-panel > div { overflow: hidden; }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }
.accordion-body { --tsv: 1.4; padding: 0 0 30px; }
.accordion-body p { margin: .5em 0; }
.accordion-body ul { margin: 0; padding-left: 40px; list-style: disc; }
.accordion-body li { --tsv: 1.4; }
.accordion-body li p { margin: .5em 0; }

/* ---------- Plain links (phone numbers) ---------- */
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer-email { text-decoration: none; }
.footer-email:hover { text-decoration: underline; }

/* ---------- Fade-in animations (site uses "fade", 0.9s ease) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .anim {
    opacity: 0;
    transition: opacity .9s ease;
    transition-delay: var(--delay, 0s);
  }
  .js .anim.is-in { opacity: 1; }
}
@media print {
  .js .anim { opacity: 1 !important; transition: none !important; }
  .header { position: absolute; }
}

/* ---------- Simple page (404) ---------- */
.simple-page { padding: calc(var(--header-height) + 6vmax) var(--site-gutter) 6vmax; text-align: center; min-height: 60vh; }
.simple-page h1 { --tsv: 3.6; margin-bottom: 1rem; }
.simple-page p { --tsv: 1.4; margin: 1rem 0 2rem; }
