/* Shared typography, page content and navigation refinements. */
.hero h1,
.about-hero h1,
.internal-hero h1 {
  font-size: clamp(2.5rem, 4.1vw, 4.5rem);
  line-height: 1.12;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hero-inner,
.about-hero-inner {
  min-height: 0;
  padding-block: 72px;
  gap: 56px;
}

.hero-text,
.about-hero-copy>p:not(.eyebrow) {
  font-size: 1rem;
}

.growth-diagram {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: clamp(24px, 3vw, 44px);
  color: #fff;
  background: linear-gradient(135deg, #10294d, #061a44);
  border: 1px solid #315776;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(3, 18, 47, .14);
}

.growth-diagram h2 {
  margin: 12px 0 28px;
  font-size: clamp(1.8rem, 2.7vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.growth-diagram ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.growth-diagram li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid #315776;
  font-size: .95rem;
}

.growth-diagram li span {
  color: #00c9c6;
  font-size: .8rem;
}

.growth-diagram>p:last-child {
  color: #c2d2e6;
  font-size: .95rem;
  margin-bottom: 0;
}

.content-section {
  padding-block: 72px;
  background: #f7f9fc;
}

.content-section+.content-section {
  border-top: 1px solid #d8e1ec;
}

.content-section h2 {
  max-width: 800px;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  margin: 0 0 28px;
}

.content-section p {
  max-width: 760px;
  color: #4b5b70;
  font-size: 1rem;
}

.content-intro {
  margin-bottom: 32px;
}

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

.detail-card {
  display: block;
  min-width: 0;
  padding: 30px;
  background: white;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
}

.detail-card h3 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 0 0 14px;
}

.detail-card p {
  margin: 0 0 20px;
}

a.detail-card:hover {
  border-color: #00817f;
  box-shadow: 0 10px 24px #061a4410;
}

.detail-card strong {
  overflow-wrap: anywhere;
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 5px;
}

.submenu-toggle {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
}

.nav-dropdown {
  display: flex;
  align-items: center;
  padding-block: 12px;
}

.nav-dropdown>a {
  display: inline-block;
}

.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
  display: grid;
}

.main-nav {
  gap: 18px;
}

.dropdown-menu a {
  font-size: .85rem;
  min-height: 44px;
}

.footer-grid p,
.footer-grid span,
.footer-grid a {
  font-size: .85rem;
}

.footer-grid a {
  padding-block: 3px;
}

.footer-bottom {
  font-size: .8rem;
}

.internal-hero {
  min-height: 0;
}

.internal-hero-copy {
  padding-block: 72px;
}

section[id] {
  scroll-margin-top: 100px;
}

@media (max-width: 1000px) {
  .header-cta {
    display: none;
  }

  .main-nav {
    gap: 12px;
  }
}

@media (max-width: 760px) {

  .detail-grid,
  .contact-options {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding-block: 48px;
  }

  .hero-inner,
  .about-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 48px;
  }

  .hero h1,
  .about-hero h1,
  .internal-hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.6rem);
    letter-spacing: -.035em;
  }
}

@media (max-width: 640px) {
  .main-nav {
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
  }

  .nav-dropdown {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0;
  }

  .dropdown-menu {
    grid-column: 1 / -1;
  }

  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    display: none;
  }

  .nav-dropdown.is-open .dropdown-menu {
    display: grid;
  }

  .main-nav a {
    min-height: 44px;
  }

  .hero-actions,
  .about-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button,
  .about-hero-actions .button {
    width: 100%;
  }

  .internal-hero-copy {
    padding-block: 48px;
  }
}

/* Pointer and keyboard handlers keep visibility and aria-expanded in sync. */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: none;
}

.nav-dropdown.is-open .dropdown-menu {
  display: grid;
}

.hero {
  min-height: 0;
  padding-bottom: 32px;
}

.scroll-cue {
  display: none;
}

.site-header {
  background: #061a44;
}

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

.portfolio-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
}

.portfolio-card img {
  display: block;
  width: 100%;
  height: auto;
}

.portfolio-card>div {
  padding: 24px;
}

.portfolio-card h3 {
  margin: 8px 0 12px;
  font-size: 1.2rem;
}

.portfolio-card p {
  margin: 0;
}

.portfolio-card .eyebrow {
  color: #007b79;
  font-size: .75rem;
}

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

@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* Existing brand artwork and reference-inspired value cards. */
.editorial-visual {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.editorial-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.values {
  background: var(--off);
  color: var(--navy);
}

.values .section-heading h2 {
  color: var(--navy);
}

.values .section-heading h2 span {
  color: var(--turquoise);
}

.value-grid {
  gap: 24px;
  align-items: stretch;
}

.value-card,
.principle-card {
  padding: 32px;
  border: 1px solid #23466e;
  border-radius: 16px;
  background: linear-gradient(145deg, #0c294f, #061a3c);
  color: #fff;
  box-shadow: 0 12px 32px rgba(3, 18, 47, .1);
  transition: border-color .2s, transform .2s;
}

.value-card:hover,
.principle-card:hover {
  border-color: #00b9bc;
  transform: translateY(-4px);
}

.value-art {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 28px;
}

.value-card h3,
.principle-card h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.4;
}

.value-card p,
.principle-card p {
  margin: 0;
  color: #e3edf9;
  font-size: .95rem;
  line-height: 1.75;
}

.approach-node img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.service-art {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 24px;
}

.final-cta {
  background: linear-gradient(90deg, rgba(6, 26, 68, .95), rgba(6, 26, 68, .7)), url('assets/images/backgrounds/grova-cta-background.webp') center / cover;
}

/* A native modal keeps the portfolio preview on the current page. */
.portfolio-lightbox {
  padding: 0;
  border: 1px solid #315776;
  border-radius: 14px;
  background: #061a44;
  color: white;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.portfolio-lightbox::backdrop {
  background: rgba(2, 10, 25, .88);
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
}

.lightbox-toolbar h2 {
  margin: 0;
  font-size: 1rem;
}

.lightbox-close {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 16px;
  background: #fff;
  color: #061a44;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  background: #fff;
}

body.lightbox-open {
  overflow: hidden;
}

.portfolio-card>a {
  display: block;
  cursor: zoom-in;
}

@media (max-width: 1000px) {

  .value-grid,
  .principles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {

  .value-grid,
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .value-card,
  .principle-card {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .value-card,
  .principle-card {
    transition: none;
  }
}

/* One entrance animation system: JavaScript owns reveals, CSS owns hover. */
html body .reveal,
html body .reveal.is-visible {
  opacity: 1;
  transform: none;
  animation: none;
  transition: none;
}

html body .value-card,
html body .principle-card,
html body .service-card,
html body .industry-item {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

html body .value-card:hover,
html body .principle-card:hover {
  transform: translateY(-3px);
}

.portfolio-card img {
  transition: transform .35s ease;
}

.portfolio-card>a {
  overflow: hidden;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .portfolio-card>a:hover img {
    transform: scale(1.025);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html body *,
  html body *::before,
  html body *::after {
    animation: none !important;
    transition: none !important;
  }
}

.local-market-visual {
  margin: 0;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid #c9dce8;
  border-radius: 20px;
  background: radial-gradient(ellipse at top right, #c8f0f0, transparent 65%), #edf4fa;
  min-width: 0;
}
.local-market-visual > img {
  display: block;
  width: 136px;
  height: 136px;
  object-fit: contain;
  margin-bottom: 28px;
}
.local-market-title > span {
  display: block;
  color: #007b79;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.local-market-title strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  color: #061a44;
}
.local-market-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.local-market-tags span {
  padding: 7px 13px;
  border: 1px solid #bdd2df;
  border-radius: 30px;
  color: #244568;
  font-size: .8rem;
}

/* About hero: larger artwork with a continuous, gentle float. */
.about-hero .editorial-visual img {
  transform: scale(1.1);
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .about-hero .editorial-visual img {
    animation: about-hero-drift 6s ease-in-out infinite;
  }
}
@keyframes about-hero-drift {
  0%, 100% { transform: translateY(0) scale(1.1); }
  50% { transform: translateY(-14px) scale(1.1); }
}
@media (max-width: 760px) {
  .about-hero .editorial-visual {
    width: calc(100% / 1.1);
    margin-inline: auto;
    margin-block: 18px;
  }
}

/* Clear industry pictograms, with consistent brand-colored linework. */
html body .industry-icon {
  border: 0;
  border-radius: 0;
  color: var(--navy);
}
.industry-icon svg {
  display: block;
  width: 30px;
  height: 30px;
}
.industry-icon .icon-accent {
  stroke: var(--turquoise);
}

/* Compact footer: paired link columns and a wrapping contact row on mobile. */
@media (max-width: 760px) {
  .site-footer { padding-block: 36px 20px; }
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
  }
  .site-footer .footer-grid > div { gap: 4px; min-width: 0; }
  .site-footer .footer-grid > div:first-child {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }
  html body .site-footer .footer-brand .brand-logo { width: 104px; }
  .site-footer .footer-grid > div:first-child p {
    max-width: 360px;
    margin: 0;
    font-size: .8rem;
    line-height: 1.6;
  }
  .site-footer .footer-grid h3 { margin-bottom: 6px; font-size: .85rem; }
  .site-footer .footer-grid a:not(.brand) {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .site-footer .footer-grid > div:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 20px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding-top: 18px;
  }
  .site-footer .footer-grid > div:last-child h3 { flex-basis: 100%; margin-bottom: 4px; }
  .site-footer .footer-grid a[href^="tel:"],
  .site-footer .footer-grid a[href^="mailto:"] { direction: ltr; }
  .site-footer .footer-bottom { margin-top: 22px; padding-top: 14px; font-size: .72rem; line-height: 1.6; }
}

/* Six industries remain in three compact rows on small screens. */
@media (max-width: 760px) {
  html body .industry-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  html body .industry-list .industry-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    align-items: start;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 16px 12px;
  }
  html body .industry-list .industry-icon { grid-column: 1; grid-row: 1; }
  html body .industry-list .industry-item i { grid-column: 2; grid-row: 1; align-self: center; }
  html body .industry-list .industry-item strong {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: .85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  html body .industry-list .industry-item small {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: .72rem;
    line-height: 1.6;
  }
}

/* Homepage services: six compact links in two rows on mobile. */
@media (max-width: 760px) {
  html body #services.services > .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  html body #services.services .service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 0;
    padding: 14px 10px;
    transform: none;
  }
  html body #services.services .service-card img {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 12px;
  }
  html body #services.services .service-card h3 {
    font-size: .8rem;
    line-height: 1.5;
    letter-spacing: normal;
    overflow-wrap: anywhere;
    margin: 0 0 10px;
  }
  html body #services.services .service-card > span,
  html body #services.services .service-card p { display: none; }
  html body #services.services .service-card > b {
    position: static;
    margin-top: auto;
    align-self: flex-end;
    font-size: 1.1rem;
  }
}

/* Homepage values: four cards in two readable mobile rows. */
@media (max-width: 760px) {
  html body .values .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  html body .values .value-card { min-width: 0; padding: 18px 14px; }
  html body .values .value-art { width: 44px; height: 44px; margin-bottom: 16px; }
  html body .values .value-card h3 { font-size: .9rem; line-height: 1.5; margin-bottom: 10px; overflow-wrap: anywhere; }
  html body .values .value-card p { font-size: .8rem; line-height: 1.65; }
}

/* Compact highlights below the hero, including Arabic service links. */
@media (max-width: 760px) {
  html body #performance-bar { margin-top: -24px; }
  html body #performance-bar .performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 16px;
  }
  html body #performance-bar .performance-grid > :is(div, a) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 18px 14px;
    border: 0;
    transform: none;
  }
  html body #performance-bar .performance-grid > :is(div, a):nth-child(odd) {
    border-inline-end: 1px solid rgba(255, 255, 255, .1);
  }
  html body #performance-bar .performance-grid > :is(div, a):nth-child(-n+2) {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  html body #performance-bar .performance-grid > :is(div, a)::after { display: none; }
  html body #performance-bar .performance-grid .value-icon {
    width: 22px;
    height: 22px;
    font-size: 1.15rem;
    align-self: flex-start;
  }
  html body #performance-bar .performance-grid > :is(div, a) > strong {
    margin: 0;
    font-size: .9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  html body #performance-bar .performance-grid > :is(div, a) > span:not(.value-icon) {
    font-size: .77rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }
}
