/* Homepage screen rhythm. Page content keeps its natural size at narrow widths. */
.screen-home {
  --screen-nav: 72px;
  --screen-gap: clamp(16px, 2.5svh, 28px);
}
.quote-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.quote-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--p-rule-strong);
  border-radius: 3px;
  color: var(--p-ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.quote-controls button:hover {
  background: var(--p-ink);
  color: #fff;
}
.quote-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.quote-position {
  min-width: 72px;
  text-align: center;
  color: var(--p-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.screen-home .testimonial-grid.quote-deck {
  display: grid;
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  margin-top: 24px;
  padding: 0 0 8px;
  border: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.screen-home .quote-deck .testimonial-card {
  grid-column: auto;
  min-height: 290px;
  padding: 30px;
  border: 1px solid var(--p-rule);
  scroll-snap-align: start;
}
.screen-home .quote-deck .testimonial-card:nth-child(6) {
  grid-column: auto;
}
.screen-home .quote-deck .tm-quote {
  font-size: 17px;
  line-height: 1.8;
}
.screen-home .quote-deck .tm-meta {
  margin-top: auto;
}

@media (min-width: 1100px) and (min-height: 680px) {
  html.screen-desktop {
    scroll-snap-type: y proximity;
    scroll-padding-top: 72px;
  }
  .screen-home .site-nav,
  .screen-home .site-nav.scrolled {
    height: var(--screen-nav);
    padding-block: 10px;
  }
  .screen-home .nav-logo img {
    height: 42px;
  }
  .screen-home .screen-panel {
    box-sizing: border-box;
    min-height: calc(100svh - var(--screen-nav));
    padding-block: var(--screen-gap) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-margin-top: 0;
  }
  .screen-home .screen-panel > .container {
    width: min(100%, 1440px);
    max-width: 1440px;
    padding-inline: clamp(32px, 4vw, 72px);
  }
  .screen-home .screen-panel .section-title {
    max-width: 1100px;
    margin: 0;
    font-size: clamp(30px, 2.7vw, 46px);
    line-height: 1.16;
  }
  .screen-home .screen-panel .section-subtitle {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    font-size: 15px;
    line-height: 1.65;
  }
  .screen-home .screen-heading {
    margin: 0 0 var(--screen-gap) !important;
  }
  .screen-home .hero.screen-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
    gap: 48px;
    min-height: 100svh;
    padding: calc(var(--screen-nav) + 32px) max(32px, calc((100% - 1320px) / 2))
      32px !important;
    scroll-margin-top: -72px;
  }
  .screen-home .hero-title {
    font-size: clamp(46px, 4.5vw, 72px) !important;
    line-height: 1.1 !important;
  }
  .screen-home .hero-proof.hero-os {
    min-height: 0;
    width: 100%;
  }
  .screen-home .hero-os-canvas {
    min-height: clamp(250px, 38svh, 370px);
  }
  .screen-home .hero-os figcaption {
    min-height: 48px;
  }
  .screen-home .hero-os-rings {
    width: clamp(160px, 16vw, 214px);
  }

  .screen-home .vision-grid {
    min-height: 0;
    margin-top: 24px;
  }
  .screen-home .vision-card {
    min-height: 0;
    padding: 24px 30px;
  }
  .screen-home .vision-icon {
    margin-bottom: 20px;
    width: 40px;
    height: 40px;
  }
  .screen-home .vision-card h3 {
    font-size: 28px;
  }
  .screen-home .vision-card p {
    margin-block: 8px;
  }
  .screen-home .vision-strategy {
    margin-top: 24px;
  }
  .screen-home .strategy-card,
  .screen-home .strategy-card + .strategy-card {
    min-height: 0;
    padding: 20px 24px 0;
  }
  .screen-home .strategy-card h4 {
    margin-block: 8px;
  }
  .screen-home .strategy-card p {
    font-size: 13px;
    line-height: 1.65;
  }

  .screen-home .stats-grid {
    min-height: 0;
    margin-top: 28px;
  }
  .screen-home .stat-card {
    min-height: 0;
    padding: 24px;
  }
  .screen-home .stat-number {
    font-size: clamp(44px, 5vw, 72px);
  }
  .screen-home .stat-suffix {
    font-size: 22px;
  }
  .screen-home .stat-unit {
    margin-top: 12px;
  }
  .screen-home .stat-source-note {
    margin-top: 16px;
    font-size: 11px;
    line-height: 1.6;
  }
  .screen-home #insight > .container > .reveal:not(:first-child) {
    margin-top: 20px !important;
    padding: 16px 20px !important;
  }

  .screen-home .gem-intro {
    gap: 36px;
    align-items: start;
    margin-bottom: 20px !important;
  }
  .screen-home .gem-definition {
    padding: 0 0 0 20px;
  }
  .screen-home .gem-definition p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
  }
  .screen-home .gem-paths {
    margin-top: 0;
    padding-top: 14px;
    gap: 52px;
  }
  .screen-home .gem-paths::before,
  .screen-home .gem-paths::after {
    display: none;
  }
  .screen-home .gem-path {
    min-height: 0;
    padding: 14px 0 20px;
  }
  .screen-home .gem-path h3 {
    margin: 10px 0 6px;
    font-size: 16px;
  }
  .screen-home .gem-path > strong {
    font-size: 32px;
    line-height: 1.15;
  }
  .screen-home .gem-path-paid > strong {
    font-size: clamp(22px, 2.05vw, 32px);
  }
  .screen-home .gem-path p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
  }
  .screen-home .gem-path-paid > strong::after {
    display: none;
  }
  .screen-home .gem-capabilities {
    margin-top: 0;
    padding: 0;
  }
  .screen-home .gem-capabilities article,
  .screen-home .gem-capabilities article + article {
    min-height: 0;
    padding: 20px;
  }
  .screen-home .gem-capabilities h3 {
    min-height: 0;
    margin: 10px 0;
    font-size: 18px;
  }
  .screen-home .gem-capabilities p {
    font-size: 13px;
    line-height: 1.7;
  }
  .screen-home .gem-flow {
    min-height: 0;
    margin-top: 0;
    padding: 14px 0 0;
  }
  .screen-home .gem-flow a {
    min-height: 44px;
    padding: 12px 18px;
  }

  .screen-home .geo-grid {
    margin-top: 24px;
  }
  .screen-home .geo-card {
    min-height: 0;
    padding: 24px 28px 24px 70px;
  }
  .screen-home .geo-card::before {
    top: 28px;
    left: 26px;
  }
  .screen-home .geo-card h3 {
    margin-block: 8px;
    font-size: 24px;
  }
  .screen-home .geo-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
  }
  .screen-home .geo-card p {
    font-size: 14px;
    line-height: 1.75;
  }

  .screen-home #iceberg > .container {
    display: grid;
    grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
    gap: 20px 40px;
    align-items: center;
  }
  .screen-home #iceberg .screen-heading {
    grid-column: 1;
    align-self: start;
    margin: 0 !important;
  }
  .screen-home #iceberg .section-title {
    font-size: clamp(28px, 2.6vw, 42px);
  }
  .screen-home #iceberg .iceberg-visual-wrapper {
    grid-column: 1;
    width: 100%;
    height: 170px;
    margin: 0;
  }
  .screen-home #iceberg .iceberg-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
  }
  .screen-home .iceberg-container {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .screen-home .iceberg-peak {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 24px;
  }
  .screen-home .iceberg-peak h3,
  .screen-home .iceberg-depth h3 {
    font-size: 23px;
    margin-block: 8px;
  }
  .screen-home .iceberg-peak p,
  .screen-home .iceberg-depth p {
    font-size: 13px;
    line-height: 1.7;
  }
  .screen-home .iceberg-peak-stats {
    grid-column: 1;
    grid-row: auto;
    margin-top: 16px;
  }
  .screen-home .iceberg-peak-stat .val {
    font-size: 25px;
  }
  .screen-home .iceberg-depth {
    padding: 20px 24px;
  }
  .screen-home .iceberg-depth-features {
    margin-top: 16px;
    gap: 12px;
  }
  .screen-home .iceberg-feature {
    padding: 0;
    gap: 10px;
  }
  .screen-home .iceberg-feature-text {
    font-size: 11px;
    line-height: 1.6;
  }
  .screen-home .iceberg-feature-text strong {
    font-size: 13px;
    margin-bottom: 3px;
  }
  .screen-home .water-labels {
    padding-block: 4px;
  }

  .screen-home .tech-cap-grid {
    margin-top: 24px !important;
  }
  .screen-home .tech-cap-grid > div {
    min-height: 0;
    padding: 20px 24px !important;
  }
  .screen-home .tech-cap-grid > div > div:first-child,
  .screen-home .tech-agent-grid > div > div:first-child {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 16px !important;
  }
  .screen-home #technology .tech-strategy {
    margin-top: 22px !important;
  }
  .screen-home .tech-strategy > div:first-child {
    margin-bottom: 14px !important;
  }
  .screen-home .tech-agent-grid > div {
    min-height: 0;
    padding: 20px 24px !important;
  }
  .screen-home .tech-cap-grid p {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  .screen-home .service-tier-grid {
    margin-top: 24px;
  }
  .screen-home .service-tier {
    grid-template-columns: 160px minmax(0, 1fr) 200px;
    padding: 18px 0;
    gap: 6px 28px;
  }
  .screen-home .tier-name {
    font-size: 22px;
  }
  .screen-home .tier-description {
    font-size: 13px;
    line-height: 1.8;
  }
  .screen-home .tier-price {
    font-size: 24px;
  }
  .screen-home .tier-link {
    min-height: 44px;
    margin-top: 4px;
    padding: 10px 12px;
  }
  .screen-home .tier-detail {
    font-size: 11px;
    line-height: 1.6;
  }

  .screen-home .services-grid {
    margin-top: 28px;
  }
  .screen-home .service-card {
    min-height: 0;
    padding: 28px 20px !important;
  }
  .screen-home .service-num {
    margin-bottom: 28px;
    font-size: 42px;
  }
  .screen-home .service-card h3 {
    font-size: 22px;
  }
  .screen-home .service-card p {
    font-size: 14px;
    line-height: 1.8;
  }
  .screen-home .platform-group {
    margin-top: 24px;
  }
  .screen-home .pf-chip {
    min-height: 44px;
    padding: 8px 14px;
  }
  .screen-home .cmp-grid {
    margin-top: 24px;
  }
  .screen-home .cmp-cell {
    padding: 24px;
  }
  .screen-home .about-layout {
    margin-top: 24px;
    gap: 48px;
  }
  .screen-home .about-visual {
    min-height: 330px;
    padding: 30px;
  }
  .screen-home .about-content p {
    font-size: 14px;
    line-height: 1.8;
  }
  .screen-home .about-stats {
    margin-top: 20px;
  }
  .screen-home .about-stat {
    padding-top: 16px;
  }
  .screen-home .aw-grid {
    margin-top: 24px;
  }
  .screen-home .aw-flip {
    height: clamp(220px, 33svh, 340px);
  }
  .screen-home #awards .section-subtitle {
    margin-left: 0 !important;
  }

  .screen-home #clients {
    justify-content: center;
  }
  .screen-home #clients > .container {
    margin-bottom: 16px;
  }
  .screen-home #clients .screen-heading {
    margin-bottom: 0 !important;
  }
  .screen-home #clients .logo-marquee-stack {
    width: min(calc(100% - 64px), 1360px);
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0 auto;
    padding: 0;
    gap: 8px;
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  .screen-home #clients .logo-grid-item {
    min-height: 0;
    height: clamp(44px, 6.6svh, 72px);
    padding: 8px;
  }
  .screen-home #clients .logo-grid-item img {
    max-height: 100%;
    width: 100%;
    object-fit: contain;
  }
  .screen-home #testimonials .screen-heading {
    margin-bottom: 0 !important;
  }
  .screen-home .quote-deck .testimonial-card {
    min-height: clamp(270px, 39svh, 380px);
  }

  .screen-home #global > .container {
    width: min(100%, 1440px);
    max-width: 1440px;
    padding-inline: clamp(32px, 4vw, 72px);
  }
  .screen-home #global .screen-heading {
    padding-inline: 0;
  }
  .screen-home .world-map-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: none;
    margin-top: 24px;
  }
  .screen-home .world-map-svg {
    width: 100%;
    max-height: clamp(300px, 48svh, 530px);
    object-fit: contain;
  }
  .screen-home .offices-summary {
    margin: 0;
    padding: 0;
  }
  .screen-home .office-row {
    justify-content: flex-start;
    gap: 8px;
  }
  .screen-home .office-chip {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }
  .screen-home .office-row-title {
    margin-bottom: 12px;
    text-align: left;
  }
  .screen-home .office-row + .office-row-title {
    margin-top: 24px;
  }
  .screen-home .map-tooltip {
    z-index: 20;
  }
  .screen-home .contact-title {
    font-size: clamp(42px, 4.2vw, 64px);
  }
  .screen-home .site-footer {
    scroll-snap-align: start;
  }
}

@media (max-width: 1099px), (max-height: 679px) {
  html.screen-desktop {
    scroll-snap-type: none;
  }
  .screen-home .screen-panel {
    height: auto;
    min-height: 0;
    scroll-snap-align: none;
  }
  .screen-home .screen-heading {
    margin-bottom: 28px !important;
  }
  .screen-home .tech-strategy {
    margin-top: 32px !important;
  }
}
@media (min-width: 769px) and (max-width: 1099px) {
  .screen-home .testimonial-grid.quote-deck {
    grid-auto-columns: calc((100% - 16px) / 2);
  }
  .screen-home .screen-panel {
    padding-block: 72px !important;
  }
  .screen-home .hero.screen-panel {
    padding-top: 112px !important;
  }
}
@media (max-width: 768px) {
  .screen-home .screen-panel {
    padding-block: 64px !important;
  }
  .screen-home .hero.screen-panel {
    padding-top: 96px !important;
    padding-bottom: 48px !important;
  }
  .screen-home .section-title {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.2;
  }
  .screen-home .section-subtitle {
    font-size: 16px;
  }
  .screen-home .testimonial-grid.quote-deck {
    grid-auto-columns: 100%;
  }
  .screen-home .quote-deck .testimonial-card {
    min-height: 310px;
    padding: 28px 24px;
  }
  .screen-home .quote-controls {
    justify-content: space-between;
  }
  .screen-home .vision-grid,
  .screen-home .vision-strategy,
  .screen-home .stats-grid,
  .screen-home .geo-grid,
  .screen-home .iceberg-container,
  .screen-home .tech-cap-grid,
  .screen-home .services-grid,
  .screen-home .cmp-grid,
  .screen-home .about-layout {
    margin-top: 32px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.screen-desktop {
    scroll-behavior: auto;
  }
}
.gem-platform-note {
  color: #a9c5c0;
  font-size: 12px;
  line-height: 1.7;
  margin: 14px 0;
}
@media (min-width: 1100px) and (min-height: 680px) {
  .screen-home .gem-platform-note {
    font-size: 11px;
    line-height: 1.6;
    margin: 8px 0;
  }
  .screen-home .gem-capabilities article,
  .screen-home .gem-capabilities article + article {
    padding-block: 16px;
  }
}

/* Keep complete chapters readable on laptop-height screens. */
@media (min-width: 1100px) and (min-height: 680px) {
  .screen-home .gem-intro { padding-bottom: 16px; }
  .screen-home .gem-path { gap: 0; }
  .screen-home .water-surface { margin: 12px 0; }
  .screen-home .water-labels { margin-top: 0; }
  .screen-home .iceberg-depth { margin-top: 12px; }
  .screen-home .iceberg-peak { row-gap: 0; }
  .screen-home .tech-agent-grid > div { padding-block: 14px !important; }
  .screen-home #technology .tech-strategy { margin-top: 16px !important; }
}
@media (min-width: 1100px) and (min-height: 680px) and (max-height: 800px) {
  .screen-home .gem-intro { grid-template-columns: 1fr 1fr; }
  .screen-home .gem-capabilities article { padding-inline: 16px; }
  .screen-home .tech-cap-grid > div { padding-block: 14px !important; }
  .screen-home .tech-cap-grid > div > div:first-child,
  .screen-home .tech-agent-grid > div > div:first-child { margin-bottom: 10px !important; }
}
@media (min-width: 1100px) and (min-height: 680px) {
  .screen-home .gem-path > strong { margin-bottom: 6px; }
  .screen-home .gem-paths { padding-top: 6px; }
  .screen-home .gem-path { padding-block: 10px 12px; }
  .screen-home .gem-definition strong { margin-bottom: 8px; }
  .screen-home #iceberg > .container { grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr); }
  .screen-home .iceberg-peak-label,
  .screen-home .iceberg-depth-label { margin-bottom: 6px; }
  .screen-home .iceberg-peak,
  .screen-home .iceberg-depth { padding-block: 16px; }
  .screen-home .tech-agent-grid > div > div:nth-child(n + 3) { font-size: 13px !important; line-height: 1.65 !important; }
}
@media (min-width: 1100px) and (min-height: 680px) and (max-height: 800px) {
  .screen-home .gem-intro { margin-bottom: 8px !important; padding-bottom: 8px; }
  .screen-home .iceberg-depth-features { margin-top: 8px; }
  .screen-home .iceberg-peak-stats { margin-top: 8px; }
  .screen-home #technology .tech-cap-grid { margin-top: 8px !important; }
  .screen-home #technology .tech-strategy > div:first-child { margin-bottom: 6px !important; }
  .screen-home #technology .tech-strategy { margin-top: 10px !important; }
}

@media (min-width: 1100px) and (min-height: 680px) and (max-height: 800px) {
  .screen-home #technology .screen-heading { margin-bottom: 8px !important; }
}
