/* Responsive refinements layered over the generated utility stylesheet. */

html,
body {
    overflow-x: clip;
}

.brand-seal {
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(8, 33, 21, 0.16);
}

/* The generated utility bundle does not include the base p-10 class used by
   these cards. Keep their content inset at every breakpoint. */
.why-card {
    padding: 2rem;
}

/* Keep the homepage hero headline stable when the XL type scale activates. */
@media (min-width: 1280px) {
    [data-testid="hero-section"] h1 {
        font-size: 4.5rem;
        line-height: 0.95;
    }

    [data-testid="hero-section"] .fade-up {
        max-width: 56rem;
    }
}

/* Nine navigation links are too dense at the default 1024px desktop breakpoint. */
@media (min-width: 1024px) and (max-width: 1151px) {
    #site-header nav,
    #site-header > div:first-child > div > div.hidden {
        display: none;
    }

    #mobile-menu-toggle {
        display: flex;
    }

    #mobile-menu:not(.hidden) {
        display: block;
    }

    #logo-link {
        flex-shrink: 0;
    }
}

/* Touch layouts need visible gallery context instead of hover-only captions. */
@media (hover: none), (max-width: 767px) {
    [data-testid^="gallery-item-"] > .bg-gradient-to-t {
        opacity: 0.72;
    }

    [data-testid^="gallery-item-"] > div.bottom-0,
    [data-testid^="gallery-item-"] > div.top-3 {
        opacity: 1;
    }
}

[data-testid="whatsapp-floating-button"] {
    overflow: hidden;
}

@media (max-width: 767px) {
    [data-testid="whatsapp-floating-button"] > .animate-ping {
        display: none;
    }
}

@media (max-width: 1023px) {
    footer[data-testid="site-footer"] > .relative.max-w-7xl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1.5rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    footer[data-testid="site-footer"] > .relative.max-w-7xl > div:first-child,
    footer[data-testid="site-footer"] > .relative.max-w-7xl > div:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 639px) {
    section.py-24 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    [data-testid="hero-section"] {
        min-height: max(100svh, 760px);
    }

    [data-testid="hero-section"] > div:last-child {
        min-height: max(100svh, 760px);
        padding-top: 7rem;
        padding-bottom: 2rem;
    }

    [data-testid="hero-section"] .hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 30, 20, 0.68) 0%,
            rgba(0, 30, 20, 0.58) 42%,
            rgba(0, 20, 12, 0.82) 100%
        );
    }

    [data-testid="hero-section"] .fade-up > div:first-child {
        margin-bottom: 1.25rem;
        padding: 0.5rem 0.75rem;
    }

    [data-testid="hero-section"] .fade-up > div:first-child span:last-child {
        font-size: 0.6875rem;
        letter-spacing: 0.12em;
    }

    [data-testid="hero-section"] h1 {
        margin-bottom: 1.25rem;
        font-size: 2.5rem;
        line-height: 0.98;
    }

    [data-testid="hero-section"] h1 + p {
        margin-bottom: 1.5rem;
        font-size: 1rem;
        line-height: 1.6;
    }

    [data-testid="hero-section"] h1 + p + div {
        margin-bottom: 2rem;
        gap: 0.75rem;
    }

    [data-testid="hero-section"] h1 + p + div a {
        padding: 1rem 1.25rem;
    }

    [data-testid="hero-section"] .grid.grid-cols-2 {
        gap: 1rem;
        padding-top: 1.25rem;
    }

    [data-testid="hero-section"] .grid.grid-cols-2 .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .text-\[10px\] {
        font-size: 0.6875rem;
    }

    footer[data-testid="site-footer"] {
        margin-top: 4rem;
    }

    footer[data-testid="site-footer"] > .relative.border-b > div {
        gap: 1.5rem;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    footer[data-testid="site-footer"] > .relative.border-b h2 {
        font-size: 2rem;
        line-height: 1.1;
    }

    footer[data-testid="site-footer"] [data-testid="footer-cta-konsultasi"] {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    footer[data-testid="site-footer"] > .relative.max-w-7xl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1.5rem;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    footer[data-testid="site-footer"] > .relative.max-w-7xl > div:first-child,
    footer[data-testid="site-footer"] > .relative.max-w-7xl > div:last-child {
        grid-column: 1 / -1;
    }

    footer[data-testid="site-footer"] form input {
        min-width: 0;
    }

    #why-card-grid .why-card {
        min-height: 0;
        padding: 1.5rem;
    }

    #why-card-grid .why-card > .flex.items-start.justify-between {
        margin-bottom: 1.5rem;
    }

    #why-card-grid .why-card-icon {
        width: 4rem;
        height: 4rem;
    }

    #why-card-grid .why-card-title {
        margin-bottom: 1rem;
        font-size: 2rem;
        line-height: 1.05;
        overflow-wrap: anywhere;
    }

    #why-card-grid .why-card-text {
        font-size: 1rem;
        line-height: 1.65;
    }

    /* Reflow each comparison row into an aspect heading followed by two
       equal result columns. This keeps all content visible without a
       horizontally scrolling desktop-width table. */
    .comparison-scroll {
        overflow: visible;
    }

    .comparison-scroll > div {
        min-width: 0;
    }

    .comparison-scroll > div:first-child > div:first-child,
    .comparison-scroll [data-testid^="comparison-row-"] > div:first-child {
        grid-column: 1 / -1;
        padding: 1rem;
    }

    .comparison-scroll > div:first-child > div:first-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .comparison-scroll > div:first-child > div:nth-child(2),
    .comparison-scroll > div:first-child > div:nth-child(3),
    .comparison-scroll [data-testid^="comparison-row-"] > div:nth-child(2),
    .comparison-scroll [data-testid^="comparison-row-"] > div:nth-child(3) {
        grid-column: span 6 / span 6;
        min-width: 0;
        padding: 1rem;
    }

    .comparison-scroll [data-testid^="comparison-row-"] {
        align-items: stretch;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .comparison-scroll [data-testid^="comparison-row-"] > div:first-child {
        background: rgba(255, 255, 255, 0.04);
        font-size: 0.9375rem;
    }

    .comparison-scroll [data-testid^="comparison-row-"] > div:nth-child(2),
    .comparison-scroll [data-testid^="comparison-row-"] > div:nth-child(3) {
        align-items: flex-start;
        font-size: 0.8125rem;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .comparison-scroll [data-testid^="comparison-row-"] > div:nth-child(2) span {
        display: inline;
    }

    [data-testid="testlab-section"] > div:last-child > div > div {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    [data-testid="testlab-section"] > div:last-child > div > div > div:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-ping,
    .animate-pulse,
    .seismic-ring,
    .wave-line,
    .tech-wave-line {
        animation: none !important;
    }

    html:focus-within {
        scroll-behavior: auto;
    }
}
