/* Korvanto — Homepage responsive & alignment */

/* Uniform section headers on homepage */
.home-section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.home-section-head .section-title {
  max-width: 22ch;
  margin-bottom: 1rem;
}

.home-section-head .section-lead {
  max-width: 58ch;
  margin-bottom: 0;
  line-height: 1.65;
}

.export-world .home-section-head .section-title,
.export-world .home-section-head .section-lead,
.export-world .home-section-head .export-regions-tagline {
  max-width: none;
}

.why-section .home-section-head .section-title {
  max-width: none;
}

.journey-section-head .section-title,
.journey-section-head .journey-tagline {
  max-width: none;
}

@media (max-width: 1200px) {
  .journey-section-head .journey-tagline {
    white-space: normal;
  }
}

.editorial-grid {
  align-items: start;
}

.editorial-support p {
  line-height: 1.65;
}

.why-header.home-section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.why-header.home-section-head .why-header-lead {
  margin: 0;
  max-width: 52ch;
  line-height: 1.65;
}

.journey-section .home-section-head {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

@media (max-width: 1280px) {
  .why-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .why-panel-body h3 {
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .why-header.home-section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .why-header.home-section-head .why-header-lead {
    max-width: none;
  }

  .mineral-atlas {
    overflow-x: clip;
  }

  .atlas-lead {
    max-width: none;
  }

  .atlas-intro {
    padding: 0;
  }

  .hero {
    padding-top: calc(var(--site-header-clearance) + env(safe-area-inset-top, 0px));
    padding-bottom: clamp(3.75rem, 8vh, 5.5rem);
  }

  .hero-overlay {
    padding-inline: clamp(1rem, 4vw, var(--site-gutter));
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    min-width: 0;
    padding-block: clamp(0.5rem, 1.5vh, 1rem);
  }

  .hero-text {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .hero h1 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .hero-desc {
    max-width: 100%;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
  }

  .credentials-strip,
  .hero-trust-strip,
  .cta-credentials {
    width: 100%;
    max-width: 100%;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1.15rem;
    margin-bottom: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .credentials-strip li,
  .hero-trust-strip li,
  .cta-credentials li {
    font-size: clamp(0.68rem, 1.4vw, 0.78rem);
  }

  .hero-3d-wrap {
    display: none;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .editorial-statement {
    font-size: clamp(1.2rem, 3.5vw, 1.65rem);
    line-height: 1.4;
  }

  .editorial-visual {
    aspect-ratio: 16 / 10;
  }

  .atlas-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .atlas-lead {
    max-width: none;
  }

  .atlas-stage,
  .atlas-panel-link,
  .atlas-panel-content {
    min-height: 380px;
  }

  .export-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .world-map-block .map-ui {
    position: static;
    max-width: none;
    width: 100%;
    margin-top: 0.75rem;
    pointer-events: auto;
  }

  .world-map-block .map-hint {
    display: none;
  }

  .journey-scroll-track {
    height: 440vh;
  }

  .journey-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .journey-visual {
    aspect-ratio: 16 / 9;
    max-height: 42vh;
  }

  .testimonials-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-stage {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .testimonials-spotlight {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .testimonials-sidebar {
    height: auto;
    width: 100%;
    min-width: 0;
  }

  .testimonials-spotlight {
    min-height: 0;
    height: auto;
  }

  .spotlight-panel {
    position: relative;
    inset: auto;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    height: auto;
    padding: 1.75rem 1.5rem 2rem;
  }

  .spotlight-panel.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
  }

  .testimonials-picker {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .testimonial-pick {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: clamp(44px, 11vw, 72px);
  }

  main {
    overflow-x: clip;
  }

  .section {
    padding-top: clamp(44px, 11vw, 72px);
    padding-bottom: clamp(44px, 11vw, 72px);
  }

  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-overlay {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(1rem, 4vw, 1.5rem);
    box-sizing: border-box;
    overflow-x: clip;
  }

  .hero-overlay .container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-text[data-parallax] {
    transform: none !important;
  }

  .hero-text .section-label {
    margin-bottom: 0.85rem;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 6.5vw, 1.95rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
    max-width: 100%;
  }

  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .credentials-strip,
  .hero-trust-strip,
  .cta-credentials {
    width: 100%;
    max-width: 100%;
    gap: 0.45rem 0.65rem;
    margin-bottom: 1.15rem;
    padding: 0.7rem 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-sizing: border-box;
  }

  .credentials-strip li,
  .hero-trust-strip li,
  .cta-credentials li {
    font-size: 0.72rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .hero-dots {
    bottom: 18px;
  }

  .home-section-head .section-title {
    max-width: none;
  }

  .section-title {
    max-width: none;
  }

  .section-lead {
    max-width: none;
    font-size: 1rem;
  }

  .editorial-visual {
    aspect-ratio: 4 / 3;
  }

  .editorial-strip {
    grid-template-columns: 1fr;
    padding: 1rem 1.15rem;
    gap: 0.75rem;
  }

  .atlas-title {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }

  .atlas-meta {
    flex-wrap: wrap;
  }

  .atlas-cta {
    width: 100%;
    justify-content: center;
  }

  .atlas-stage,
  .atlas-panel-link,
  .atlas-panel-content {
    min-height: min(70vw, 320px);
  }

  .atlas-panel-title {
    max-width: none;
    font-size: 1.2rem;
  }

  .atlas-panel-desc {
    max-width: none;
    font-size: 0.88rem;
  }

  .atlas-index {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .atlas-index-item {
    flex: 0 0 auto;
    min-width: 128px;
    scroll-snap-align: start;
  }

  .atlas-index-name {
    font-size: 0.68rem;
  }

  .journey-scroll-track {
    height: auto;
  }

  .journey-pin {
    position: relative;
    top: 0;
    height: auto;
    min-height: 0;
    padding: var(--section-pad) 0;
    overflow: visible;
  }

  .journey-pin > .container {
    padding-top: 0;
    padding-bottom: 0;
  }

  .journey-visual {
    aspect-ratio: 16 / 10;
    max-height: none;
  }

  .journey-flow {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .journey-rail {
    display: none;
  }

  .journey-steps {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
  }

  .journey-step,
  .journey-step.is-active,
  .journey-step.is-passed {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 1.1rem 1.15rem;
    background: var(--grey-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .journey-step.is-active {
    border-color: var(--gold);
    background: var(--white);
  }

  .journey-step p {
    max-width: none;
    font-size: 0.9rem;
  }

  .world-map-wrap {
    cursor: default;
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }

  .world-map-wrap .map-cursor {
    display: none !important;
  }

  .world-map-block .map-ui {
    position: static;
    max-width: none;
    width: 100%;
    margin-top: 0.75rem;
    pointer-events: auto;
  }

  .map-hint {
    display: none;
  }

  .export-chip {
    padding: 1.1rem 1.2rem;
  }

  .export-chip:hover {
    transform: none;
  }

  .why-panels {
    grid-template-columns: 1fr;
  }

  .why-panel {
    min-height: 0;
  }

  .why-panel:hover {
    transform: none;
  }

  .why-panel-body h3 {
    min-height: 0;
  }

  .why-panel-arrow {
    opacity: 1;
    transform: none;
  }

  .cta-credentials {
    max-width: 100%;
    margin-top: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
  }

  .cta-credentials li {
    font-size: 0.82rem;
  }

  .cta-banner {
    min-height: 0;
  }

  .cta-content {
    padding: clamp(2.75rem, 9vw, 3.5rem) 0;
  }

  .cta-content h2 {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
    line-height: 1.25;
    padding-inline: 0.25rem;
  }

  .cta-tagline {
    font-size: 0.92rem;
    max-width: none;
    padding-inline: 0.15rem;
    margin-bottom: 1.35rem;
  }

  .cta-tagline br {
    display: none;
  }

  .cta-content .btn {
    width: 100%;
    max-width: none;
  }

  .export-world {
    overflow-x: clip;
  }

  .export-world .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .export-layout {
    gap: 1.5rem;
  }

  .world-map-wrap {
    border-radius: var(--radius);
  }

  .map-stat {
    white-space: normal;
    font-size: 0.8rem;
  }

  .hub-label {
    font-size: 9px;
  }

  .export-chip h4 {
    font-size: 0.88rem;
  }

  .export-chip p {
    font-size: 0.85rem;
  }

  .why-header {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .why-header-lead {
    max-width: none;
    font-size: 0.95rem;
  }

  .why-panel {
    padding: 1.35rem 1.2rem 1.2rem;
  }

  .why-panel-body h3 {
    font-size: 1rem;
  }

  .why-panel-body p {
    font-size: 0.85rem;
  }

  .editorial-statement {
    font-size: clamp(1.05rem, 4.5vw, 1.35rem);
    line-height: 1.45;
  }

  .editorial-grid .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .atlas-panel-content {
    max-width: 100%;
    padding: 1.25rem 1.15rem;
  }

  .atlas-panel-index {
    font-size: 2.25rem;
    margin-bottom: 0.25rem;
  }

  .atlas-panel-cta {
    font-size: 0.72rem;
    flex-wrap: wrap;
    line-height: 1.45;
    max-width: 100%;
  }

  .atlas-stage-wrap {
    perspective: none;
  }

  .atlas-stage {
    transform: none !important;
  }

  .journey-section .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .journey-step h3 {
    font-size: 1.05rem;
  }

  .testimonials-section {
    overflow-x: clip;
  }

  .testimonials-section .container {
    max-width: 100%;
    overflow-x: clip;
  }

  .testimonials-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 1.25rem;
  }

  .testimonials-spotlight {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
    align-self: stretch;
  }

  .spotlight-panel {
    position: relative;
    inset: auto;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    height: auto;
    min-height: 0;
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .spotlight-panel.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .spotlight-panel blockquote {
    font-size: 1rem;
    line-height: 1.65;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .spotlight-tag {
    white-space: normal;
    text-align: center;
    align-self: flex-start;
  }

  .spotlight-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .author-meta {
    min-width: 0;
    width: 100%;
  }

  .testimonials-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .testimonials-controls {
    justify-content: center;
    order: 0;
  }

  .testimonials-picker {
    flex-direction: column;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.6rem;
    scroll-snap-type: none;
  }

  .testimonial-pick {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: none;
  }

  .testimonial-pick.is-active {
    border-right: 1px solid var(--gold);
    border-left: 3px solid var(--gold);
  }

  .testimonial-pick:hover,
  .testimonial-pick:focus-visible {
    transform: none;
  }

  .pick-industry {
    text-align: left;
  }

  .testimonials-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .hero-desc {
    font-size: 0.9rem;
  }

  .credentials-strip li,
  .hero-trust-strip li,
  .cta-credentials li {
    font-size: 0.68rem;
  }

  .hero-dots {
    bottom: 14px;
  }

  .atlas-title br,
  .editorial-grid .section-title br {
    display: none;
  }

  .atlas-title {
    font-size: 1.35rem;
  }

  .atlas-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .atlas-arrows {
    align-self: flex-end;
  }

  .atlas-stage,
  .atlas-panel-link,
  .atlas-panel-content {
    min-height: min(78vw, 300px);
  }

  .atlas-index-item {
    min-width: 118px;
  }

  .atlas-counter-num {
    font-size: 2rem;
  }

  .journey-visual {
    aspect-ratio: 4 / 3;
  }

  .journey-step {
    padding: 1rem;
  }

  .cta-content h2 {
    font-size: 1.3rem;
  }

  .cta-credentials li {
    font-size: 0.78rem;
  }

  .export-chip {
    padding: 0.95rem 1rem;
  }

  .why-panel-top {
    margin-bottom: 1rem;
  }

  .why-panel-icon {
    width: 46px;
    height: 46px;
  }

  .why-panel-icon svg {
    width: 22px;
    height: 22px;
  }

  .testimonials-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) and (min-width: 769px) {
  .hero {
    padding-top: calc(var(--site-header-clearance) + 0.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: clamp(3.25rem, 7vh, 4.5rem);
  }

  .hero-text .section-label {
    margin-bottom: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    margin-bottom: 0.85rem;
  }

  .hero-desc {
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
    line-height: 1.55;
  }

  .credentials-strip--hero {
    margin-bottom: 1rem;
    padding: 0.65rem 1rem;
    gap: 0.4rem 0.85rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }
}

@media (max-height: 700px) and (min-width: 769px) {
  .hero-3d-wrap {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .journey-scroll-track {
    height: auto;
  }

  .journey-pin {
    position: relative;
    top: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: var(--section-pad) 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  .atlas-panel.is-active:hover .atlas-panel-media img,
  .editorial-visual:hover img {
    transform: none;
  }
}
