/* Desktop-wide layout refinements for IDSI Lab website.
   Homepage refinements follow the reference layout: vertical feature cards,
   full-image research cards, and compact application cards. */

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  width: 280px;
  height: auto;
  max-height: 76px;
  object-fit: contain;
  display: block;
}

.footer-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
}

.hero-copy h1 {
  white-space: nowrap;
  font-size: clamp(44px, 4.35vw, 68px);
}

.hero-visual img {
  width: min(100%, 560px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 24px 42px rgba(13, 27, 61, .12));
}

.home-feature-section {
  padding-top: 30px;
  padding-bottom: 28px;
  background: #fff;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.home-feature-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 18px;
  row-gap: 14px;
  min-height: 220px;
  padding: 30px 28px 26px;
  background: #fff;
  border: 1px solid #E4EBF4;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(13, 27, 61, .08);
  position: relative;
  overflow: hidden;
}

.home-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #0F7F8C, rgba(15, 127, 140, .18));
}

.home-feature-card.accent::before {
  background: linear-gradient(90deg, #F5A623, rgba(245, 166, 35, .18));
}

.home-feature-icon {
  grid-column: 1;
  grid-row: 1;
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.home-feature-content {
  display: contents;
}

.home-feature-content h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
  color: #0D1B3D;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
}

.home-feature-content p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  color: #485871;
  font-size: 16px;
  line-height: 1.88;
}

.home-about-section {
  padding-top: 22px;
  padding-bottom: 34px;
  background: linear-gradient(180deg, #fff 0%, #F8FBFE 100%);
}

.home-about-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px 40px;
  border: 1px solid #E3EAF3;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13, 27, 61, .98) 0%, rgba(8, 61, 153, .96) 54%, rgba(15, 127, 140, .92) 100%);
  box-shadow: 0 18px 42px rgba(13, 27, 61, .13);
  overflow: hidden;
  position: relative;
}

.home-about-card::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 62%);
}

.home-about-heading,
.home-about-body {
  position: relative;
  z-index: 1;
}

.home-about-heading span {
  display: inline-block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-about-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: .08em;
}

.home-about-body p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
  line-height: 1.86;
}

.home-about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-about-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: rgba(255, 255, 255, .95);
  background: rgba(255, 255, 255, .09);
  font-size: 14px;
  font-weight: 800;
}

.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
  color: #0D1B3D;
  text-align: center;
}

.home-section-heading .line {
  width: 116px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #93B7D0);
  position: relative;
}

.home-section-heading .line::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0F7F8C;
  transform: translateY(-50%);
}

.home-section-heading .line:last-child {
  transform: scaleX(-1);
}

.home-section-heading h2 {
  margin: 0;
  color: #0D1B3D;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: .14em;
  font-weight: 900;
}

.home-section-heading p {
  margin: 7px 0 0;
  color: #334767;
  font-size: 17px;
  line-height: 1.2;
}

.home-research-section {
  padding-top: 18px;
  padding-bottom: 34px;
  background: linear-gradient(180deg, #fff 0%, #F8FBFE 100%);
}

.home-research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-research-card {
  position: relative;
  min-height: 210px;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  color: #fff;
  background: #0D1B3D;
  box-shadow: 0 14px 30px rgba(13, 27, 61, .12);
}

.home-research-image {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: none;
}

.home-research-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-research-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(5, 22, 58, .16) 0%, rgba(5, 22, 58, .52) 38%, rgba(5, 22, 58, .92) 100%);
}

.home-research-card.teal::after {
  background: linear-gradient(90deg, rgba(4, 67, 87, .90) 0%, rgba(4, 67, 87, .70) 46%, rgba(4, 67, 87, .16) 100%);
}

.home-research-content {
  position: relative;
  z-index: 2;
  max-width: 64%;
  padding: 28px 28px 24px 28px;
  color: #fff;
}

.home-research-card:not(.teal) .home-research-content {
  margin-left: auto;
}

.home-research-card.teal .home-research-content {
  margin-left: 0;
}

.home-research-content h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 900;
}

.home-research-desc {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .94);
  font-size: 15px;
  line-height: 1.74;
}

.home-research-more {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  opacity: .95;
  text-decoration: none;
}

.home-research-more span {
  color: #F5A623;
  font-size: 22px;
  line-height: 0;
  transition: transform .18s ease;
}

.home-research-more:hover span {
  transform: translateX(3px);
}

.home-app-section {
  padding-top: 26px;
  padding-bottom: 58px;
  background: #fff;
}

.home-app-section .home-section-heading {
  margin-bottom: 22px;
}

.home-app-section .home-section-heading h2 {
  font-size: 34px;
}

.home-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-app-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #E3EAF3;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(13, 27, 61, .06);
}

.home-app-icon {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  align-self: center;
}

.home-app-content {
  align-self: center;
}

.home-app-content h3 {
  margin: 0 0 6px;
  color: #0D1B3D;
  font-size: 20px;
  line-height: 1.32;
  font-weight: 900;
}

.home-app-content p {
  margin: 0;
  color: #5B6980;
  font-size: 15px;
  line-height: 1.62;
}

.home-app-arrow {
  color: #D4A017;
  font-size: 28px;
  line-height: 1;
}

@media (min-width: 1181px) {
  .container {
    width: min(1320px, 92vw);
  }

  .header-inner {
    min-height: 96px;
  }

  .brand img {
    width: 310px;
    max-height: 82px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    gap: 72px;
    min-height: 620px;
    padding: 66px 0 108px;
  }

  .hero-copy h1 {
    white-space: nowrap;
    font-size: clamp(44px, 4.35vw, 68px);
  }

  .hero-en {
    max-width: 760px;
  }

  .hero-visual {
    height: 500px;
  }

  .hero-visual svg,
  .hero-visual img {
    width: min(100%, 640px);
  }

  .footer-grid {
    gap: 48px;
  }
}

@media (min-width: 1480px) {
  .container {
    width: min(1360px, 90vw);
  }

  .hero-grid {
    gap: 86px;
  }
}

@media (max-width: 1180px) {
  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-about-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home-research-grid,
  .home-app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .brand img {
    width: 220px;
    max-height: 62px;
  }

  .hero-copy h1 {
    white-space: nowrap;
    font-size: clamp(28px, 7.2vw, 42px);
    letter-spacing: -0.04em;
  }

  .hero-visual img {
    width: min(92vw, 390px);
    filter: drop-shadow(0 14px 28px rgba(13, 27, 61, .10));
  }

  .home-feature-section {
    padding-top: 34px;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-feature-card {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: auto;
    padding: 22px 20px 20px;
  }

  .home-feature-icon {
    width: 58px;
    height: 58px;
  }

  .home-about-card {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .home-about-heading h2 {
    font-size: 30px;
  }

  .home-about-body p {
    font-size: 15px;
    line-height: 1.78;
  }

  .home-section-heading .line {
    display: none;
  }

  .home-section-heading h2 {
    font-size: 30px;
    letter-spacing: .08em;
  }

  .home-research-card {
    min-height: 240px;
  }

  .home-research-content,
  .home-research-card:not(.teal) .home-research-content,
  .home-research-card.teal .home-research-content {
    max-width: 100%;
    margin-left: 0;
    padding: 24px 22px;
  }

  .home-research-card::after,
  .home-research-card.teal::after {
    background: linear-gradient(180deg, rgba(5, 22, 58, .84) 0%, rgba(5, 22, 58, .48) 100%);
  }

  .home-research-content h3 {
    font-size: 18px;
  }

  .home-research-desc {
    font-size: 14px;
    line-height: 1.68;
  }

  .home-research-more {
    font-size: 14px;
  }

  .home-app-card {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    min-height: 108px;
    padding: 18px;
  }

  .home-app-icon {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 190px;
    max-height: 54px;
  }

  .hero-copy h1 {
    white-space: nowrap;
    font-size: clamp(24px, 6.6vw, 30px);
    letter-spacing: -0.05em;
  }

  .hero-visual img {
    width: 92vw;
  }

  .home-feature-card,
  .home-app-card {
    grid-template-columns: 1fr;
  }

  .home-feature-content h3,
  .home-feature-content p {
    grid-column: 1;
  }

  .home-app-arrow {
    display: none;
  }

  .home-feature-content h3,
  .home-app-content h3 {
    font-size: 21px;
  }

  .home-feature-content p,
  .home-app-content p {
    font-size: 15px;
  }
}
