/* Kristal — Mobile & tablet overrides only
   Desktop (≥1100px) left unchanged. */

/* —— Overlay (mobile/tablet only) —— */
@media (max-width: 1099px) {
  .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(10, 13, 16, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
  }
  .site-header.is-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header {
    --header-h: 68px;
  }
  .site-header.is-scrolled {
    --header-h: 64px;
    background: rgba(16, 19, 22, 0.98);
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .site-header.is-open {
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-inner {
    width: min(100% - 2.5rem, var(--max-wide));
    padding-inline: 0;
  }
  .container--wide.header-inner,
  .header-inner {
    width: 100%;
    padding-inline: 20px;
    max-width: none;
  }

  .logo img {
    height: auto;
    width: 98px;
    max-width: 110px;
  }

  .menu-toggle {
    width: 48px;
    height: 48px;
    z-index: 1100;
  }
  .menu-toggle-bars {
    width: 22px;
    height: 14px;
  }
  .menu-toggle-bars span {
    height: 2px;
  }

  .header-cta,
  .lang {
    display: none !important;
  }

  .hide-mobile {
    display: none !important;
  }

  /* Typography scale */
  :root {
    --pad-x: 20px;
    --space-section: 5rem;
    --fs-h1: clamp(2.35rem, 8.5vw, 2.85rem);
    --fs-h2: clamp(1.85rem, 6.5vw, 2.25rem);
    --fs-h3: clamp(1.3rem, 4.5vw, 1.5rem);
    --fs-lead: 1.125rem;
    --fs-body: 1rem;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .container,
  .container--wide {
    width: min(100% - 40px, var(--max));
  }

  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
  }

  .section-head {
    margin-bottom: 2rem;
  }
  .section-head h2 {
    margin-bottom: 1rem;
    max-width: none;
  }
  .section-head p {
    font-size: 1.0625rem;
    line-height: 1.55;
    max-width: none;
  }

  .btn {
    min-height: 52px;
    font-size: 0.9375rem;
    width: 100%;
    max-width: 100%;
  }
  .btn--full,
  .hero-actions .btn,
  .final-cta-actions .btn,
  .solutions-cta-actions .btn,
  .process-cta .btn,
  .certs-footer .btn,
  .tc-banner .btn,
  .projects-footer-mobile .btn,
  .nav-mobile-cta .btn {
    width: 100%;
  }

  .text-link {
    font-size: 1rem;
    min-height: 44px;
    align-items: center;
  }

  /* —— HERO —— */
  .hero {
    min-height: 0;
    height: auto;
  }
  .hero-media img {
    object-position: 70% center;
  }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(10, 13, 16, 0.45) 0%, rgba(10, 13, 16, 0.2) 28%, rgba(10, 13, 16, 0.72) 62%, rgba(10, 13, 16, 0.9) 100%);
  }
  .hero-content {
    padding: calc(var(--header-h) + 2.5rem) 0 1.75rem;
    max-width: none;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .hero h1 {
    font-size: var(--fs-h1);
    line-height: 1.06;
    max-width: none;
    margin-bottom: 1rem;
  }
  .hero-lead {
    font-size: 1.0625rem;
    line-height: 1.55;
    max-width: none;
    margin-bottom: 1.35rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0;
  }

  .proof-bar {
    backdrop-filter: none;
    background: rgba(12, 15, 18, 0.92);
  }
  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }
  .proof-item {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .proof-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .proof-item:nth-child(n + 3) {
    border-bottom: 0;
  }
  .proof-value {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
  }
  .proof-label {
    font-size: 0.8125rem;
    line-height: 1.4;
    max-width: none;
  }

  /* —— INTRO —— */
  .intro {
    padding: 4.5rem 0;
  }
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
  .intro h2 {
    max-width: none;
    font-size: var(--fs-h2);
    line-height: 1.12;
  }
  .intro-copy p {
    font-size: 1.0625rem;
    max-width: none;
  }
  .intro-points {
    grid-template-columns: 1fr;
  }
  .intro-point {
    grid-template-columns: 2.75rem 1fr;
    padding: 1.35rem 0;
  }
  .intro-point:nth-child(odd),
  .intro-point:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }
  .intro-point h3 {
    font-size: 1.2rem;
  }
  .intro-point p {
    font-size: 0.98rem;
    max-width: none;
  }

  /* —— SOLUTIONS —— */
  .solutions {
    padding: 4.5rem 0;
  }
  .solutions-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .sol-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .sol-card-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
  .sol-card-body {
    padding: 1.35rem 0 0.25rem;
  }
  .sol-card-body h3 {
    font-size: 1.4rem;
  }
  .sol-card-body > p {
    font-size: 1.02rem;
  }
  .sol-list li {
    font-size: 1rem;
  }
  .solutions-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 2rem;
  }
  .solutions-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  /* —— PROJECTS —— */
  .projects {
    padding: 4.5rem 0;
  }
  .section-head--row {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-head--row > .btn {
    display: none;
  }
  .projects-footer-mobile {
    display: flex;
    margin-top: 1.75rem;
  }
  .project-filters {
    margin: 0 -20px 1.5rem;
    padding: 0 20px 0.35rem;
    gap: 0.55rem;
  }
  .filter-btn {
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
    gap: 1rem;
  }
  .project-card,
  .project-card--feature {
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .project-card h3 {
    font-size: 1.25rem;
  }
  .project-card--feature h3 {
    font-size: 1.4rem;
  }
  .project-card-body {
    padding: 1.35rem 1.15rem;
  }

  /* —— TECHNOLOGY —— */
  .tech {
    padding: 4.5rem 0;
  }
  .tech-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 1.75rem;
  }
  .tech-visual,
  a.tech-visual {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
  .tech-play-btn {
    width: 64px;
    height: 64px;
  }
  .tech-content h3 {
    font-size: 1.35rem;
  }
  .tech-content > p {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.82);
  }
  .tech-process-list span {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
  }
  .tech-secondary {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tech-secondary .fig-media {
    aspect-ratio: 16 / 10;
  }
  .tech-secondary figcaption {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
  }

  /* —— AUDIENCES —— */
  .audiences {
    padding: 4.5rem 0;
  }
  .audience-grid {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }
  .audience-card {
    min-height: 0;
    padding: 1.5rem 0;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }
  .audience-card:last-child {
    border-bottom: 1px solid var(--line);
  }
  .audience-card h3 {
    font-size: 1.3rem;
  }
  .audience-card p {
    font-size: 1.02rem;
    max-width: none;
  }

  /* —— PROCESS —— */
  .process {
    padding: 4.5rem 0;
  }
  .process-track {
    grid-template-columns: 1fr;
    border-top: 0;
  }
  .process-step {
    padding: 1.35rem 0 1.35rem 3.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .process-step::before {
    position: absolute;
    left: 0;
    top: 1.4rem;
    font-size: 1.15rem;
  }
  .process-step::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    top: 3.1rem;
    bottom: -1px;
    width: 1px;
    height: auto;
    background: var(--line);
  }
  .process-step:last-child::after {
    display: none;
  }
  .process-step h3 {
    font-size: 1.15rem;
  }
  .process-step p {
    font-size: 0.98rem;
    max-width: none;
  }
  .section-head .process-cta {
    width: 100%;
    margin-top: 1.25rem;
  }

  /* —— CERTS —— */
  .certs {
    padding: 4.5rem 0;
  }
  .certs-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
  }
  .certs-intro h2 {
    max-width: none;
  }
  .certs-intro p {
    font-size: 1.0625rem;
    max-width: none;
  }
  .certs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .cert-card {
    grid-template-columns: 96px 1fr;
    padding: 1.1rem;
  }
  .cert-card img {
    width: 96px;
    height: 128px;
  }
  .cert-card h3 {
    font-size: 1.1rem;
  }
  .cert-card p {
    font-size: 0.95rem;
  }
  .certs-footer .btn {
    width: 100%;
  }

  /* —— TECH CENTER —— */
  .tech-center {
    padding: 4.5rem 0;
  }
  .tc-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .tc-intro h2 {
    max-width: none;
  }
  .tc-intro p {
    max-width: none;
    margin-bottom: 1.25rem;
  }
  .tc-intro .btn {
    width: 100%;
  }
  .tc-grid {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line);
  }
  .tc-card {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem 1rem;
    align-items: center;
    min-height: 76px;
    padding: 1rem 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }
  .tc-card h3 {
    font-size: 1.05rem;
  }
  .tc-banner {
    grid-template-columns: 1fr;
    padding: 1.75rem 1.25rem;
    margin-top: 1.5rem;
    gap: 1.25rem;
  }
  .tc-banner h3 {
    font-size: 1.35rem;
  }
  .tc-banner p {
    font-size: 1.02rem;
  }

  /* —— NEWS —— */
  .news {
    padding: 4.5rem 0;
  }
  .news-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .news-feature-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
    max-height: none;
  }
  .news-feature-body {
    padding-top: 1.15rem;
  }
  .news-feature h3 {
    font-size: 1.35rem;
  }
  .news-feature p {
    font-size: 1.02rem;
    max-width: none;
  }
  .news-side {
    grid-template-rows: none;
    gap: 1.5rem;
  }
  .news-item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    align-items: start;
  }
  .news-item:last-of-type {
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.5rem;
  }
  .news-item-media {
    aspect-ratio: 16 / 10;
  }
  .news-item h3 {
    font-size: 1.15rem;
  }
  .news-item p {
    font-size: 0.98rem;
  }

  /* —— FINAL CTA —— */
  .final-cta {
    padding: 4.5rem 0;
  }
  .final-cta-bg {
    opacity: 0.28;
  }
  .final-cta-bg img {
    object-position: center 40%;
  }
  .final-cta-overlay {
    background: linear-gradient(180deg, rgba(10, 13, 16, 0.88) 0%, rgba(10, 13, 16, 0.94) 100%);
  }
  .final-cta-inner {
    max-width: none;
  }
  .final-cta h2 {
    font-size: clamp(1.9rem, 7vw, 2.25rem);
    max-width: none;
    margin-bottom: 1rem;
  }
  .final-cta-inner > p:not(.eyebrow):not(.final-note) {
    font-size: 1.0625rem;
    max-width: none;
    margin-bottom: 1.5rem;
  }
  .final-cta-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .final-note {
    font-size: 0.9rem;
  }

  /* —— FOOTER accordion —— */
  .site-footer {
    padding-top: 3rem;
    font-size: 0.9375rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-bottom: 1.5rem;
  }
  .footer-brand p {
    font-size: 0.9375rem;
    max-width: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
  }
  .footer-brand img {
    height: 28px;
  }
  .socials a {
    width: 44px;
    height: 44px;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-acc {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .footer-acc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin: 0;
    padding: 0.85rem 0;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    cursor: pointer;
  }
  .footer-acc summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.7;
  }
  .footer-acc[open] summary::after {
    content: "−";
  }
  .footer-acc-panel {
    padding: 0 0 1rem;
  }
  .footer-acc-panel a {
    padding: 0.45rem 0;
    font-size: 0.9375rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .footer-contact li {
    font-size: 0.9375rem;
    word-break: break-word;
  }
  .footer-hours {
    font-size: 0.875rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1.15rem 0 1.5rem;
    font-size: 0.875rem;
  }
  /* Prevent desktop dropdowns from affecting mobile layout */
  .mega,
  .dropdown {
    display: none !important;
  }

  /* Images stay within viewport */
  img,
  video,
  iframe {
    max-width: 100%;
  }

  .hero,
  .sol-card,
  .project-card,
  .tech-visual,
  .final-cta {
    overflow: hidden;
  }
}

/* —— Larger phones / small tablets —— */
@media (min-width: 480px) and (max-width: 767px) {
  .hero-content {
    min-height: 600px;
  }
  .news-item {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
  }
  .certs-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Tablet 768–1099 —— */
@media (min-width: 768px) and (max-width: 1099px) {
  :root {
    --pad-x: 36px;
    --space-section: 5.5rem;
    --fs-h1: clamp(2.75rem, 5vw, 3.35rem);
    --fs-h2: clamp(2.15rem, 3.5vw, 2.65rem);
  }

  .container,
  .container--wide {
    width: min(100% - 72px, var(--max));
  }
  .header-inner {
    padding-inline: 36px;
  }

  .hero-content {
    min-height: 640px;
    max-width: 34rem;
    padding-bottom: 2.25rem;
  }
  .hero-actions {
    flex-direction: row;
  }
  .hero-actions .btn {
    width: auto;
    min-width: 180px;
  }

  .proof-value {
    font-size: 1.65rem;
  }

  .intro-points {
    grid-template-columns: 1fr 1fr;
  }
  .intro-point:nth-child(odd) {
    padding-right: 1.5rem;
    border-right: 1px solid var(--line);
  }
  .intro-point:nth-child(even) {
    padding-left: 1.5rem;
  }

  .solutions-layout {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .sol-card-body {
    padding: 1.35rem 0 0;
  }
  .solutions-cta-actions {
    flex-direction: row;
  }
  .solutions-cta-actions .btn {
    width: auto;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card--feature {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }

  .tech-secondary {
    grid-template-columns: 1fr 1fr;
  }

  .certs-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tc-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
  }
  .tc-card {
    border-top: 1px solid var(--line);
  }

  .news-layout {
    grid-template-columns: 1fr;
  }
  .news-item {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .final-cta-actions {
    flex-direction: row;
  }
  .final-cta-actions .btn {
    width: auto;
    min-width: 200px;
  }

  .footer-brand p {
    -webkit-line-clamp: 2;
  }
  .btn {
    width: auto;
  }
  .nav-mobile-cta .btn,
  .projects-footer-mobile .btn,
  .process-cta .btn,
  .certs-footer .btn,
  .tc-intro .btn,
  .tc-banner .btn {
    width: 100%;
  }
}

/* —— Very small phones —— */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 2.15rem;
  }
  .hero-content {
    min-height: 540px;
  }
  .logo img {
    width: 88px;
  }
  .proof-value {
    font-size: 1.3rem;
  }
  .proof-label {
    font-size: 0.75rem;
  }
}

/* Desktop: ensure footer details look like static columns */
@media (min-width: 960px) {
  .footer-acc {
    display: block;
  }
  .footer-acc summary {
    pointer-events: none;
    cursor: default;
  }
  .footer-acc summary::after {
    display: none;
  }
  .footer-acc-panel {
    display: block !important;
  }
}

@media (min-width: 960px) {
  .footer-cols {
    grid-template-columns: repeat(4, 1fr);
  }
}
