/*
 * Production UI corrections loaded after the Vite bundle.
 * Keeps visibility state authoritative and improves desktop proportions.
 */

:root {
    --shell: min(1120px, calc(100% - 32px));
}

@media (min-width: 375px) {
    :root { --shell: min(1120px, calc(100% - 36px)); }
}

@media (min-width: 768px) {
    :root { --shell: min(1180px, calc(100% - 48px)); }
}

@media (min-width: 1024px) {
    :root { --shell: min(1280px, calc(100% - clamp(48px, 5vw, 72px))); }
}

@media (min-width: 1440px) {
    :root { --shell: min(1360px, calc(100% - clamp(56px, 5vw, 88px))); }
}

html {
    font-size: 16px;
}

body,
button,
input,
textarea,
select {
    font-size: max(12px, 1rem);
}

.line-reveal {
    opacity: 1;
    color: inherit;
}

[data-reveal]:not(.revealed) {
    opacity: 1;
    transform: none;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

.header-inner {
    width: 100%;
    max-width: none;
}

.user-menu {
    pointer-events: none;
    cursor: default;
}

:focus-visible {
    outline: 2px solid var(--crimson);
    outline-offset: 3px;
}

[hidden],
#btn-auth[hidden],
#btn-logout[hidden],
#btn-user[hidden],
#credit-pill[hidden] {
    display: none !important;
}

.header-actions {
    min-width: 0;
}

@media (min-width: 961px) {
    :root {
        --shell: min(1360px, calc(100% - clamp(48px, 5vw, 88px)));
    }

    .shell {
        width: var(--shell);
        max-width: 1360px;
        margin-inline: auto;
    }

    .site-header {
        background: rgba(247, 244, 238, .97);
    }

    .header-inner {
        min-height: 68px;
        gap: clamp(24px, 3vw, 42px);
    }

    .brand {
        gap: 10px;
        font-size: 1.25rem;
    }

    .brand img {
        width: 32px;
        height: 32px;
    }

    .site-nav {
        gap: clamp(20px, 2vw, 30px);
    }

    .site-nav a {
        padding-inline: 4px;
        font-size: .86rem;
    }

    .header-actions {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .journal-hero {
        padding: clamp(62px, 6vw, 84px) 0 clamp(62px, 6vw, 82px);
    }

    .journal-hero .eyebrow {
        margin-bottom: clamp(28px, 3vw, 42px);
    }

    .hero-wordmark {
        max-width: 1080px;
        font-size: clamp(5.8rem, 8.3vw, 8.5rem);
        line-height: .84;
        letter-spacing: -.055em;
    }

    .hero-wordmark::after {
        height: 3px;
        margin-top: clamp(28px, 3vw, 38px);
    }

    .hero-statement {
        margin-top: clamp(34px, 4vw, 50px);
        grid-template-columns: minmax(280px, 1.15fr) minmax(250px, .85fr) auto;
        align-items: center;
        gap: clamp(28px, 3.5vw, 52px);
    }

    .hero-statement h1 {
        max-width: 440px;
        font-size: clamp(1.95rem, 2.6vw, 2.8rem);
        line-height: 1.08;
    }

    .hero-statement .hero-lead {
        max-width: 430px;
        font-size: clamp(1rem, 1.3vw, 1.12rem);
        line-height: 1.75;
    }

    .hero-statement .button {
        min-width: 168px;
        min-height: 52px;
    }

    .section {
        padding-block: clamp(64px, 6vw, 88px);
    }

    .section-heading {
        max-width: 760px;
        margin-bottom: 44px;
    }

    .section-heading h2 {
        font-size: clamp(2.25rem, 3.4vw, 3.5rem);
        line-height: 1.06;
    }

    .comparison {
        gap: clamp(42px, 5vw, 74px);
    }

    .comparison article {
        padding: 48px 0 54px;
    }

    .comparison p {
        font-size: clamp(1.06rem, 1.25vw, 1.22rem);
    }

    .ink-band {
        padding-block: clamp(62px, 6vw, 82px);
    }

    .process-strip li {
        min-height: 160px;
    }

    .cta-panel {
        padding: clamp(40px, 4vw, 56px);
    }

    .site-footer {
        padding-top: 64px;
    }

    .margin-annotation,
    .margin-annotation.revealed {
        transform: none !important;
    }
}

@media (min-width: 961px) and (max-width: 1120px) {
    :root {
        --shell: calc(100% - 44px);
    }

    .header-inner {
        gap: 22px;
    }

    .site-nav {
        gap: 18px;
    }

    .site-nav a {
        font-size: .84rem;
    }

    .hero-wordmark {
        font-size: clamp(5.4rem, 9.5vw, 6.8rem);
    }

    .hero-statement {
        grid-template-columns: minmax(260px, 1.1fr) minmax(220px, .8fr) auto;
        gap: 30px;
    }

    .hero-statement h1 {
        font-size: 2.1rem;
    }

    .footer-grid {
        grid-template-columns: 1.15fr .7fr 1fr;
    }

    .footer-note {
        display: none;
    }
}

/* Contact channels: icon-only, clear and accessible. */
.contact-icon-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-height: 50px !important;
    padding: 0;
    display: inline-grid !important;
    place-items: center;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transition:
        transform .35s cubic-bezier(.22, 1, .36, 1),
        background-color .25s ease,
        border-color .25s ease,
        box-shadow .35s ease;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-icon-gmail {
    border-color: #d94b3d;
    background: #b9382d;
}

.contact-icon-whatsapp {
    border-color: #25d366;
    background: #168f46;
}

.contact-icon:hover,
.contact-icon:focus-visible {
    transform: translateY(-4px) scale(1.04);
    outline: 2px solid white;
    outline-offset: 3px;
}

.contact-icon-gmail:hover,
.contact-icon-gmail:focus-visible {
    color: #fff !important;
    border-color: #d94b3d;
    background: #b9382d;
    box-shadow: 0 10px 28px rgba(185, 56, 45, .28);
}

.contact-icon-whatsapp:hover,
.contact-icon-whatsapp:focus-visible {
    color: #fff !important;
    border-color: #25d366;
    background: #168f46;
    box-shadow: 0 10px 28px rgba(37, 211, 102, .22);
}

.support-actions.contact-icon-links {
    width: auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

/* Additional editorial motion, attached by site-enhancements.js. */
.motion-ready .motion-section {
    opacity: .01;
    transform: translate3d(0, 28px, 0);
    transition:
        opacity .75s ease,
        transform .85s cubic-bezier(.22, 1, .36, 1);
}

.motion-ready .motion-section.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.motion-ready .motion-section::before {
    transform-origin: top;
}

.motion-ready .motion-item {
    opacity: .01;
    transform: translate3d(0, 14px, 0);
    transition:
        opacity .55s ease var(--motion-delay, 0ms),
        transform .65s cubic-bezier(.22, 1, .36, 1) var(--motion-delay, 0ms);
}

.motion-ready .motion-item.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.motion-ready .hero-wordmark {
    opacity: .2;
    transform: translate3d(0, 12px, 0);
    transition:
        opacity .7s ease,
        transform .8s cubic-bezier(.22, 1, .36, 1);
}

.motion-ready .journal-hero.is-visible .hero-wordmark {
    opacity: 1;
    transform: none;
}

.button.motion-pressed,
.contact-icon.motion-pressed {
    animation: tactile-press .28s cubic-bezier(.22, 1, .36, 1);
}

.payment-card.state-pop {
    animation: state-confirm .46s cubic-bezier(.22, 1, .36, 1);
}

.package-card,
.assurance-grid article,
.guide-card,
.custom-credit {
    transition:
        transform .4s cubic-bezier(.22, 1, .36, 1),
        box-shadow .35s ease,
        border-color .3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .package-card:hover,
    .assurance-grid article:hover,
    .guide-step:hover .guide-card {
        transform: translate3d(0, -5px, 0);
        border-color: var(--crimson);
        box-shadow: 5px 7px 0 rgba(11, 13, 12, .11);
    }
}

@keyframes tactile-press {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(2px) scale(.97); }
}

@keyframes state-confirm {
    0% { opacity: .72; transform: scale(.985); }
    100% { opacity: 1; transform: scale(1); }
}

/* Explicit phone sizing: no desktop width or typography leaks. */
@media (max-width: 720px) {
    :root {
        --shell: calc(100% - 28px);
    }

    .shell {
        width: var(--shell);
        max-width: none;
        margin-inline: auto;
    }

    .journal-hero {
        padding: 54px 0 58px;
    }

    .journal-hero .eyebrow {
        margin-bottom: 28px;
    }

    .hero-wordmark {
        width: 100%;
        font-size: clamp(3.8rem, 18vw, 5.4rem);
        line-height: .82;
        letter-spacing: -.07em;
    }

    .hero-statement {
        margin-top: 34px;
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .hero-statement h1 {
        font-size: clamp(1.9rem, 8.5vw, 2.65rem);
        line-height: 1.04;
    }

    .hero-statement .hero-lead {
        font-size: 1rem;
        line-height: 1.7;
    }

    .hero-statement .button {
        width: 100%;
        min-height: 50px;
    }

    .section {
        padding-block: 62px;
    }

    .section-heading h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .header-inner {
        width: 100%;
        min-height: 64px;
        gap: 5px;
    }

    .header-actions {
        flex: 1;
        justify-content: flex-end;
        gap: 3px;
    }

    .header-actions .button {
        padding-inline: 9px;
    }

    .credit-pill {
        padding-inline: 8px;
    }

    .support-actions.contact-icon-links {
        width: 100%;
        justify-content: flex-start;
    }

    .contact-icon {
        width: 54px;
        height: 54px;
        min-height: 54px !important;
    }

    .footer-contact {
        gap: 12px;
    }
}

@media (max-width: 380px) {
    .site-header .brand span,
    .user-menu span:last-child,
    .credit-pill span {
        display: none;
    }

    .hero-wordmark {
        font-size: clamp(3.75rem, 19vw, 4.7rem);
    }

    .modal-card {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motion-ready .motion-section,
    .motion-ready .motion-section.is-visible,
    .motion-ready .motion-item,
    .motion-ready .motion-item.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .motion-ready .hero-wordmark,
    .motion-ready .journal-hero.is-visible .hero-wordmark {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .button.motion-pressed,
    .contact-icon.motion-pressed,
    .payment-card.state-pop {
        animation: none;
    }

    .package-card,
    .assurance-grid article,
    .guide-card,
    .custom-credit,
    .contact-icon {
        transition: none;
    }
}
