/* ===========================================================================
   Home page overrides — loaded last so these win over the layered styles.
   - Every home section fills one screen (viewport height minus the sticky header)
   - Titles and section headings in capitals, no text shadows on the hero copy
   - Technologies / Industry verticals: heading, cards and button fit one screen
   - "Why enterprises trust us" + client marquee share one screen, no gaps
   =========================================================================== */

:root {
  --frame: calc(100vh - var(--header-real, var(--header)));
}
@supports (height: 100svh) {
  :root {
    --frame: calc(100svh - var(--header-real, var(--header)));
  }
}
/* Set by the inline script in index.html: viewport minus the real header,
   rounded up to a whole pixel so no sliver of the next section shows. */
:root[style*="--frame-px"] {
  --frame: var(--frame-px);
}

/* ---- 1. Carousel: full screen, capital titles, no shadows ---------------- */
#home .home-carousel {
  min-height: max(420px, var(--frame));
  height: var(--frame);
}
#home .home-carousel-copy,
#home .home-carousel-copy h2,
#home .home-carousel-copy p {
  text-shadow: none;
}
#home .home-carousel-copy h2 {
  max-width: 1100px;
  font-size: clamp(32px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* ---- 2. Video hero: fill the screen, capital title, no shadows ----------- */
#home .hero-grid {
  min-height: max(460px, var(--frame));
}
#home .hero-copy h1,
#home .hero-copy > p {
  text-shadow: none;
}
body #home .hero-copy h1 {
  font-size: clamp(32px, 5.4vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: uppercase;
}
body #home .hero-copy > p {
  font-size: clamp(18px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.45;
}

/* ---- 3. Section headings in capitals ------------------------------------- */
/* (Introducing Akshaa keeps its original mixed-case headings.) */
#home .section:not(.change-section):not(.tech-bento) h2 {
  text-transform: uppercase;
}
#home .home-tech-heading {
  letter-spacing: 0.03em;
}

/* ---- 4. Technologies + Industry verticals: one screen each ---------------
   The grid width is derived from the screen height so that heading, two rows
   of cards and the "Explore" button always fit together. Roughly 380px of the
   frame goes to padding, heading, card labels, row gap and the button (about 360px, which leaves breathing room between sections); the
   rest is split between two rows of 16:10 images (3 cards + 2 gaps per row). */
#home .home-technologies {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--frame);
  padding-block: clamp(16px, 3.2vh, 40px);
}
#home .home-technologies .shell {
  width: calc(100% - var(--gutter) * 2);
  max-width: min(1440px, max(560px, calc((var(--frame) - 360px) * 2.4 + 76px)));
}
#home .home-tech-heading {
  margin-bottom: clamp(10px, 2vh, 22px);
}
#home .home-technologies .home-section-actions {
  margin-top: clamp(12px, 2vh, 22px);
}

/* Two columns, three rows */
@media (max-width: 1100px) {
  #home .home-technologies .shell {
    max-width: min(1180px, max(360px, calc((var(--frame) - 420px) * 1.067 + 20px)));
  }
}
@media (max-width: 560px) {
  /* Cards are limited by the phone's width, so size these sections to their
     content instead of stretching them (which only added empty space). */
  #home .home-technologies {
    min-height: 0;
    padding-block: 40px;
  }
  #home .home-technologies .shell {
    max-width: min(1180px, max(300px, calc((var(--frame) - 300px) * 1.067 + 12px)));
  }
}

/* ---- 5. Introducing Akshaa: one screen ----------------------------------- */
#home .change-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--frame);
  padding-block: clamp(28px, 6vh, 96px);
}

/* ---- 6. Enterprise trust + client marquee share one screen ---------------
   The trust block grows to fill the space; the marquee sits flush beneath it
   and flush with the bottom of the screen. */
#home .trust-frame {
  display: flex;
  flex-direction: column;
  min-height: var(--frame);
}
#home .enterprise-trust {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#home .client-band {
  flex: 0 0 auto;
  padding: 0;
  border-top: 0;
}
#home .client-band .marquee {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-block: clamp(18px, 3vh, 30px);
}



/* Equal-height cards in each row; labels stay on one or two tidy lines */
#home .home-tech-card,
#home .home-technologies .tech-flip,
#home .home-technologies .tech-front {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#home .home-technologies .home-tech-card-label {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
@media (max-width: 560px) {
  #home .home-technologies .home-tech-card-label {
    padding: 9px 6px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }
}




/* ---- 8. Equal spacing between Technologies and Industry verticals --------
   Technologies has equal space above and below its content, so with Industry
   verticals starting its heading at the very top, the gap from the end of the
   Technologies grid to INDUSTRY VERTICALS equals the gap after the video hero. */
#home .home-solutions-verticals {
  justify-content: flex-start;
  padding-top: 0;
}
@media (max-width: 560px) {
  #home .home-solutions-verticals {
    padding-top: 0;
    padding-bottom: 40px;
  }
}

/* ---- 9. Technologies: bento grid -----------------------------------------
   4 columns: Lidar and AI are wide (2x1) tiles, the other four are 1x1.
   Labels sit over the images on a navy-to-transparent gradient. The grid fills
   whatever height is left under the heading row, so the whole section is one
   screen on any viewport. */
#home .tech-bento {
  --bento-cyan: #22b8e6; /* logo cyan: hover borders and focus ring */
  --bento-gap: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--frame);
  --bento-pad: clamp(40px, 8vh, 80px);
  padding-top: var(--bento-pad);
  padding-bottom: calc(var(--bento-pad) / 2);
  background: var(--mist);
}
#home .tech-bento-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--gutter) * 2);
  max-width: 1240px;
  max-height: 760px;
}

/* Heading row: OUR TECHNOLOGIES on the left, outlined button on the right */
#home .tech-bento-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title cta";
  align-items: center;
  column-gap: 32px;
  margin-bottom: clamp(28px, 4.4vh, 48px);
}
#home .tech-bento-title { grid-area: title; }
#home .tech-bento-cta { grid-area: cta; justify-self: end; }
#home .tech-bento-title {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display); /* Barlow, same as the other section headings */
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
/* Same colours as the header's "Talk to us" button */
#home .tech-bento-cta {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: var(--white);
  font-size: 16px;
}
#home .tech-bento-cta:hover,
#home .tech-bento-cta:focus-visible,
#home .tech-bento-cta:active {
  border-color: var(--navy2);
  background: var(--navy2);
  color: var(--white);
}

/* Grid */
#home .tech-bento-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  grid-template-rows: repeat(2, minmax(140px, 1fr));
  gap: var(--bento-gap);
  min-height: 0;
}
#home .bento-wide {
  grid-column: span 2;
}

/* Tiles */
#home .bento-tile {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(10, 30, 60, 0.12);
  color: #fff;
  text-decoration: none;
  transition:
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 400ms ease,
    border-color 200ms ease;
}
#home .bento-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
#home .bento-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(8, 29, 54, 0.92) 0%,
    rgba(8, 29, 54, 0.6) 34%,
    rgba(8, 29, 54, 0) 68%
  );
  content: "";
}
#home .bento-tile:hover,
#home .bento-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--bento-cyan);
  box-shadow: 0 14px 32px rgba(10, 30, 60, 0.2);
}
#home .bento-tile:hover img,
#home .bento-tile:focus-visible img {
  transform: scale(1.05);
}
#home .bento-tile:focus-visible {
  outline: 2px solid var(--bento-cyan);
  outline-offset: 3px;
}
#home .bento-text {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#home .bento-name {
  font: 700 clamp(20px, 1.7vw, 26px)/1.15 var(--font-body);
  color: #fff;
}
/* Description is hidden until the tile is hovered or keyboard-focused */
#home .bento-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-height: 0;
  opacity: 0;
  transform: translateY(6px);
  color: rgba(255, 255, 255, 0.85);
  font: 400 14px/1.35 var(--font-body);
  transition:
    max-height 350ms ease,
    opacity 300ms ease,
    transform 350ms ease;
}
#home .bento-tile:hover .bento-desc,
#home .bento-tile:focus-visible .bento-desc {
  max-height: 3em;
  opacity: 1;
  transform: none;
}
#home .bento-tile::after {
  transition: opacity 300ms ease;
}
#home .bento-wide .bento-desc {
  max-width: 46ch;
}

@media (prefers-reduced-motion: reduce) {
  #home .bento-tile,
  #home .bento-tile img,
  #home .bento-desc {
    transition: none;
  }
  #home .bento-tile:hover,
  #home .bento-tile:focus-visible,
  #home .bento-tile:hover img,
  #home .bento-tile:focus-visible img {
    transform: none;
  }
}

/* Tablets / narrow laptops: 2 columns, wide tiles span the full row */
@media (max-width: 900px) {
  #home .tech-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(120px, 1fr);
  }
  #home .tech-bento-shell {
    max-height: none;
  }
}

/* Phones: natural height, fixed tile heights */
@media (max-width: 560px) {
  #home .tech-bento {
    min-height: 0;
    padding-block: 40px;
  }
  #home .tech-bento-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "cta";
    row-gap: 0;
  }
  #home .tech-bento-cta {
    justify-self: start;
    margin-top: 16px;
  }
  #home .tech-bento-grid {
    grid-auto-rows: 150px;
    gap: 10px;
  }
  #home .bento-name {
    font-size: 17px;
  }
  #home .bento-desc {
    font-size: 12.5px;
  }
}

/* ---- 10. Industry verticals: same bento grid as Technologies -------------
   Mirrored pattern: the 3rd (Rural & Urban) and 4th (Agriculture) tiles are
   wide. Technologies ends with half a gap and this section starts with half a
   gap, so the space between them equals the space above the Technologies
   heading, and neither section's content sits right on the boundary. */
#home .industry-bento {
  justify-content: flex-start;
  padding-top: calc(var(--bento-pad) / 2);
  padding-bottom: var(--bento-pad);
}
@media (max-width: 560px) {
  #home .tech-bento {
    padding-top: 64px;
    padding-bottom: 32px;
  }
  #home .industry-bento {
    padding-top: 32px;
    padding-bottom: 64px;
  }
}

/* Tiles in both sections: slightly rounded corners */
#home .tech-bento .bento-tile {
  border-radius: 6px;
}

/* Footer: X (Twitter) icon in its brand black, like the other brand icons */
.socials a[title="X (Twitter)"],
.socials a[title="X (Twitter)"]:hover {
  color: #000000;
}

/* ===========================================================================
   Solutions page: hero title, SECTORS heading and every sector title in capitals
   =========================================================================== */
#solutions .solutions-hero h1,
#solutions .solution-portfolio h2 {
  text-transform: uppercase;
}

/* ===========================================================================
   Akshaa page: the hero fills exactly the screen below the header on landing,
   with its content centred, so no white space shows underneath.
   =========================================================================== */
#akshaa .ak-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--frame);
}
#akshaa .ak-hero > .shell {
  width: min(var(--content), calc(100% - var(--gutter) * 2));
}

/* Solutions hero: "SURVEY AND MAPPING" on one line, "SERVICES" centred below.
   The line break in the markup splits the two lines; nowrap stops the first
   line from wrapping, and the size scales with the screen so it always fits. */
#solutions .solutions-hero h1 {
  max-width: none;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(2rem, 6vw, 5.5rem);
}
#solutions .solutions-hero-copy {
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

/* Technology page: every heading in capitals, except "LiDAR", which keeps its
   standard mixed-case spelling. */
#technology h1,
#technology h2:not(.keep-case) {
  text-transform: uppercase;
}

/* Technology hero: "PRECISION FROM SKY TO GROUND" on one line, sized to fit */
#technology .page-hero h1 {
  max-width: none;
  white-space: nowrap;
}
body #technology .page-hero h1 {
  font-size: clamp(22px, 4.6vw, 64px);
}

/* Client strip: every logo is sized to the same visual footprint. Each
   logo's inline size comes from its measured drawn area (padding in the file
   ignored): equal area, capped at 64px tall and 210px wide, with the same
   32px of space on each side, so square badges and long wordmarks read as
   one even row. */
.client-band .client-logo-art {
  overflow: hidden;
}

/* Navigation bar hide-on-scroll (toggled by nav-hide.js): slides up smoothly */
.site-header {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.site-header.nav-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* Solutions page: hand-drawn black brush underline under each sector name.
   One tapered marker stroke (thick in the middle, thin at the ends, slight
   upward sweep), drawn on an inline span with box-decoration-break so a name
   that wraps gets its own stroke under each line, sized to the words. */
#solutions .solution-portfolio .sketch-underline {
  padding-bottom: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13.5 C 60 10.5, 140 8.2, 220 7.6 C 290 7.1, 350 6.4, 397 4.6 C 399 5.4, 398 6.6, 396 7.4 C 350 10.6, 290 11.6, 222 12.4 C 150 13.2, 80 15.2, 6 17.2 C 2.5 16.8, 1.6 14.6, 3 13.5 Z' fill='%23111'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 10px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
#solutions .solution-portfolio h2:has(.sketch-underline) {
  line-height: 1.4;
  padding-bottom: 12px;
}

/* ---- Footer spacing -------------------------------------------------------
   1. Breathing room between the incubation/association logos and the blue
      copyright band below.
   2. Address sits a little higher (no extra gap above it).
   3. On desktop, "Open map" lines up with the "In incubation with" /
      "In associations with" labels, and the social icons line up with the
      logo row: same 20px label line, 8px gap, 46px tiles on both sides. */
.site-footer .footer-top {
  padding-bottom: 36px;
}
.footer-links .address {
  padding-top: 0;
}
@media (min-width: 1001px) {
  .footer-top > .footer-col:nth-of-type(4) .footer-links > a:last-child {
    line-height: 20px;
  }
  .footer-top > .footer-col:nth-of-type(4) .socials {
    margin-top: 8px;
  }
  .footer-top > .footer-col:nth-of-type(4) .socials a {
    width: 46px;
    height: 46px;
  }
}

/* Footer logos blend into the footer background: no white tiles behind the
   incubation, association and social marks (the image files are transparent). */
.site-footer .association-link,
.site-footer .footer-top .socials a {
  background: transparent;
  box-shadow: none;
}
.site-footer .footer-top .socials a {
  border-color: transparent;
}

/* Footer logos: larger on desktop so each mark is easy to read. The size
   scales with the screen width (46px tiles at 1280px, up to 58px on wide
   screens) so the row never runs into the social icons. The social icons use
   the same row height so they stay lined up with the logos. */
@media (min-width: 1001px) {
  .site-footer {
    --footer-logo: clamp(46px, 3.6vw, 58px);
  }
  .site-footer .association-list {
    gap: clamp(10px, 0.9vw, 14px);
  }
  .site-footer .association-link {
    width: var(--footer-logo);
    height: var(--footer-logo);
    padding: 3px;
  }
  .site-footer .association-link img {
    max-height: calc(var(--footer-logo) - 6px);
  }
  .site-footer .association-link-wordmark {
    width: calc(var(--footer-logo) * 2.1);
  }
  .site-footer .association-link-wide {
    width: calc(var(--footer-logo) * 2.9);
  }
  .footer-top > .footer-col:nth-of-type(4) .socials a {
    height: var(--footer-logo);
  }
}

/* "Why Enterprises Trust Us": larger heading, same size as "Our Technologies" */
#home .enterprise-trust-heading {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  margin-bottom: clamp(28px, 3vw, 40px);
}

/* Clientele strip: the scrolling logos pause while the pointer is over them
   (or a logo inside has keyboard focus) and resume when it leaves. */
.client-band .marquee:hover .marquee-track,
.client-band .marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

/* "In association with" logos: a step smaller than the incubation logos */
@media (min-width: 1001px) {
  .site-footer .partner-group {
    --footer-logo: clamp(40px, 2.6vw, 48px);
  }
  /* keep them centred on the same line as the larger incubation logos */
  .site-footer .partner-group .association-list {
    min-height: clamp(46px, 3.6vw, 58px);
  }
}

/* Entrance for cards that have their own hover lift (home bento tiles, case
   study cards). Their hover transitions would cancel the standard fade, so
   they rise in with a one-off animation instead; the hover lift is untouched. */
[data-reveal="rise"] {
  transform: none;
}
[data-reveal="rise"].in-view {
  animation: reveal-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms) backwards;
}
@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal="rise"].in-view {
    animation: none;
  }
}

/* GDG logo: a wide 10:1 wordmark, so give it a wider slot to read larger */
@media (min-width: 1200px) {
  .site-footer .partner-group .association-link-wide {
    width: calc(var(--footer-logo) * 3.4);
  }
}
@media (min-width: 1400px) {
  .site-footer .partner-group .association-link-wide {
    width: min(calc(var(--footer-logo) * 4.1), 168px);
  }
}

/* IAHE seal: a step larger than the other round logos */
@media (min-width: 1001px) {
  .site-footer .partner-group .association-link-iahe {
    width: calc(var(--footer-logo) * 1.22);
    height: calc(var(--footer-logo) * 1.22);
  }
  .site-footer .partner-group .association-link-iahe img {
    max-height: calc(var(--footer-logo) * 1.22 - 6px);
  }
}
