/*
 * AMTECCO legal and service-state surfaces
 * Flat reference-frame geometry, accessible type, and no decorative motion.
 */

/* Legal documents */
.sf-site .amtecco-legal-page {
    min-width: 0;
    background: var(--amtecco-carbon, #121416);
    color: var(--amtecco-paper, #f4f1ea);
    font-size: max(1rem, var(--amtecco-type-body, 1rem));
    line-height: 1.7;
}

.sf-site .amtecco-legal-page .terms-hero {
    min-height: auto;
    padding-block: clamp(4.5rem, 9vw, 7.5rem) !important;
    border-bottom: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14)) !important;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
    background-image: none !important;
}

.sf-site .amtecco-legal-page .terms-hero::before {
    display: none !important;
}

.sf-site .amtecco-legal-page .terms-hero .subtitle {
    max-width: none;
    margin: 0 0 1rem;
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: clamp(0.75rem, 0.72rem + 0.12vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.sf-site .amtecco-legal-page .terms-hero h1 {
    max-width: 14ch;
    margin: 0 auto;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(2.6rem, 5vw, 4.25rem) !important;
    font-weight: 600 !important;
    line-height: 1.02 !important;
    overflow-wrap: anywhere;
    text-shadow: none !important;
}

.sf-site .amtecco-legal-page .terms-hero .lead {
    max-width: 62ch;
    margin: 1.5rem auto 0;
    color: var(--amtecco-paper-soft, #d9d5cd) !important;
    font-size: clamp(1.1rem, 1.03rem + 0.3vw, 1.3rem);
    line-height: 1.65;
}

.sf-site .amtecco-legal-page .legal-updated {
    max-width: none;
    margin: 1.25rem auto 0;
    color: var(--amtecco-steel, #89939d) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: 0.875rem;
    letter-spacing: 0.03em;
}

.sf-site .amtecco-legal-page .terms-content {
    padding-block: clamp(3.5rem, 7vw, 6.5rem) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--amtecco-carbon, #121416) !important;
    box-shadow: none !important;
}

.sf-site .amtecco-legal-page .legal-content-column,
.sf-site .amtecco-legal-page .terms-content > .container {
    min-width: 0;
}

.sf-site .amtecco-legal-page .legal-content-column {
    width: min(100%, 58rem);
    margin-inline: auto;
}

.sf-site .amtecco-legal-page .terms-section {
    min-width: 0;
    margin: 0 0 1px !important;
    padding: clamp(1.5rem, 4vw, 2.75rem) !important;
    border: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14)) !important;
    border-radius: 4px !important;
    background: var(--amtecco-graphite, #1a1d20) !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 140ms ease !important;
}

.sf-site .amtecco-legal-page .terms-section:hover {
    border-color: var(--amtecco-line-strong, rgba(244, 241, 234, 0.25)) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sf-site .amtecco-legal-page .terms-section h2 {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.875rem;
    margin: 0 0 1.5rem;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(1.55rem, 1.35rem + 0.85vw, 2.2rem);
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-legal-page .terms-section h2 i {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--amtecco-action, #c54b3c);
    border-radius: 4px;
    background: transparent !important;
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-size: 1rem;
}

.sf-site .amtecco-legal-page .terms-section h3 {
    margin: 2rem 0 1rem;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(1.2rem, 1.12rem + 0.3vw, 1.45rem);
    line-height: 1.3;
}

.sf-site .amtecco-legal-page .terms-section h4 {
    margin: 0 0 0.45rem;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: 1rem;
    line-height: 1.4;
}

.sf-site .amtecco-legal-page .terms-section p,
.sf-site .amtecco-legal-page .terms-section li {
    max-width: 72ch;
    color: var(--amtecco-paper-soft, #d9d5cd) !important;
    font-size: 1rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-legal-page .terms-section p {
    margin: 0 0 1.25rem;
}

.sf-site .amtecco-legal-page .terms-section p:last-child {
    margin-bottom: 0;
}

.sf-site .amtecco-legal-page .terms-section ul:not(.service-features),
.sf-site .amtecco-legal-page .terms-section ol:not(.payment-timeline) {
    margin: 0 0 1.5rem;
    padding-inline-start: 1.35rem;
}

.sf-site .amtecco-legal-page .terms-section strong {
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-weight: 700;
}

.sf-site .amtecco-legal-page .terms-section a {
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-weight: 600;
    overflow-wrap: anywhere;
    text-decoration-thickness: 1px;
}

.sf-site .amtecco-legal-page .terms-section .intro-text {
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(1.05rem, 1rem + 0.2vw, 1.16rem);
    font-weight: 500;
}

.sf-site .amtecco-legal-page .contact-grid,
.sf-site .amtecco-legal-page .service-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 1.5rem 0 0;
    padding: 0;
    border: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14));
    background: var(--amtecco-line, rgba(244, 241, 234, 0.14));
    list-style: none;
}

.sf-site .amtecco-legal-page .contact-item,
.sf-site .amtecco-legal-page .feature-item {
    min-width: 0;
    margin: 0;
    padding: 1.15rem;
    border: 0;
    border-radius: 0;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sf-site .amtecco-legal-page .contact-item:hover {
    border-color: transparent;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sf-site .amtecco-legal-page .contact-item a {
    display: inline-block;
    max-width: 100%;
}

.sf-site .amtecco-legal-page .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.sf-site .amtecco-legal-page .feature-item i {
    margin: 0.25rem 0 0;
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-size: 1rem;
}

.sf-site .amtecco-legal-page .feature-item span {
    min-width: 0;
    color: var(--amtecco-paper-soft, #d9d5cd) !important;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-legal-page .warning-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.75rem 0;
    padding: 1.15rem;
    border: 1px solid var(--amtecco-action, #c54b3c);
    border-left-width: 4px;
    border-radius: 4px;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
}

.sf-site .amtecco-legal-page .warning-box i {
    margin-top: 0.22rem;
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-size: 1.15rem;
}

.sf-site .amtecco-legal-page .warning-box p {
    margin: 0;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-weight: 600;
}

.sf-site .amtecco-legal-page .payment-timeline {
    display: grid;
    gap: 1px;
    margin: 1.5rem 0;
    padding: 1px;
    background: var(--amtecco-line, rgba(244, 241, 234, 0.14));
    list-style: none;
}

.sf-site .amtecco-legal-page .timeline-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin: 0;
    padding: 1.15rem;
    border: 0;
    border-radius: 0;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
    transform: none !important;
}

.sf-site .amtecco-legal-page .timeline-item:hover {
    border-color: transparent;
    background: var(--amtecco-carbon-deep, #090b0d) !important;
}

.sf-site .amtecco-legal-page .timeline-marker {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid var(--amtecco-action, #c54b3c);
    border-radius: 50%;
    background: transparent !important;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: 0.875rem;
    font-weight: 700;
}

.sf-site .amtecco-legal-page .timeline-content {
    min-width: 0;
}

.sf-site .amtecco-legal-page .timeline-content p {
    margin: 0;
}

.sf-site .amtecco-legal-page .terms-cta {
    padding-block: clamp(3.5rem, 7vw, 6rem) !important;
    border-block: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14));
    background: var(--amtecco-graphite, #1a1d20) !important;
    background-image: none !important;
    text-align: center;
}

.sf-site .amtecco-legal-page .terms-cta h2 {
    max-width: 20ch;
    margin: 0 auto 1rem;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(2rem, 1.65rem + 1.5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.12;
}

.sf-site .amtecco-legal-page .terms-cta p {
    max-width: 62ch;
    margin: 0 auto 1.75rem;
    color: var(--amtecco-paper-soft, #d9d5cd) !important;
    font-size: clamp(1.05rem, 1rem + 0.2vw, 1.18rem);
    line-height: 1.65;
}

.sf-site .amtecco-legal-page .legal-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 1.3rem;
    border: 1px solid var(--amtecco-action, #c54b3c);
    border-radius: 4px !important;
    background: var(--amtecco-action, #c54b3c) !important;
    color: #fff !important;
    font-size: 0.925rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transform: none !important;
    transition: background-color 140ms ease, border-color 140ms ease !important;
}

.sf-site .amtecco-legal-page .legal-button:hover {
    border-color: var(--amtecco-action-soft, #ed8376);
    background: var(--amtecco-action-soft, #ed8376) !important;
    color: var(--amtecco-carbon-deep, #090b0d) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sf-site .amtecco-legal-page .terms-meta {
    padding-block: 2rem;
    border-bottom: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14));
    background: var(--amtecco-carbon-deep, #090b0d);
}

.sf-site .amtecco-legal-page .terms-meta p {
    max-width: none;
    margin: 0.3rem 0;
    color: var(--amtecco-steel, #89939d) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Error and service-state pages */
.sf-site .amtecco-error-page {
    min-width: 0;
    background: var(--amtecco-carbon-deep, #090b0d);
    color: var(--amtecco-paper, #f4f1ea);
}

.sf-site .amtecco-error-page .error-section {
    display: grid;
    min-height: min(760px, calc(100svh - 76px));
    place-items: center;
    padding-block: clamp(3.5rem, 8vw, 7rem);
    border-bottom: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14));
    background: var(--amtecco-carbon-deep, #090b0d) !important;
    background-image: none !important;
}

.sf-site .amtecco-error-page .error-section::before {
    display: none !important;
}

.sf-site .amtecco-error-page .error-panel {
    position: relative;
    width: min(100%, 54rem);
    margin-inline: auto;
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 1px solid var(--amtecco-line-strong, rgba(244, 241, 234, 0.25));
    border-radius: 4px;
    background: var(--amtecco-graphite, #1a1d20);
    box-shadow: none;
    text-align: left;
}

.sf-site .amtecco-error-page .error-panel::before,
.sf-site .amtecco-error-page .error-panel::after {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--amtecco-action-soft, #ed8376);
    border-style: solid;
    pointer-events: none;
    content: "";
}

.sf-site .amtecco-error-page .error-panel::before {
    top: 0.75rem;
    left: 0.75rem;
    border-width: 1px 0 0 1px;
}

.sf-site .amtecco-error-page .error-panel::after {
    right: 0.75rem;
    bottom: 0.75rem;
    border-width: 0 1px 1px 0;
}

.sf-site .amtecco-error-page .error-heading {
    min-width: 0;
}

.sf-site .amtecco-error-page .error-reference {
    max-width: none;
    margin: 0 0 1rem;
    color: var(--amtecco-action-soft, #ed8376) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: clamp(0.75rem, 0.72rem + 0.12vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.sf-site .amtecco-error-page .error-code {
    max-width: none;
    margin: 0 0 0.4rem;
    color: var(--amtecco-mark, #c54b3c) !important;
    font-family: var(--amtecco-display, sans-serif);
    font-size: clamp(4.5rem, 17vw, 8.5rem);
    font-weight: 700;
    letter-spacing: -0.065em;
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-error-page .error-code--word {
    font-size: clamp(3rem, 11vw, 6.75rem);
    letter-spacing: -0.055em;
}

.sf-site .amtecco-error-page h1 {
    max-width: 24ch;
    margin: 1.25rem 0 0;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(1.8rem, 1.48rem + 1.4vw, 3rem) !important;
    font-weight: 600 !important;
    line-height: 1.14 !important;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-error-page .error-message {
    max-width: 60ch;
    margin: 1.5rem 0 0;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-size: clamp(1.08rem, 1.02rem + 0.25vw, 1.22rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-error-page .error-detail {
    max-width: 64ch;
    margin: 0.75rem 0 0;
    color: var(--amtecco-steel, #89939d) !important;
    font-size: 1rem;
    font-style: normal;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.sf-site .amtecco-error-page .error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.sf-site .amtecco-error-page .error-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.78rem 1.2rem;
    border: 1px solid var(--amtecco-line-strong, rgba(244, 241, 234, 0.25));
    border-radius: 4px !important;
    background: transparent;
    color: var(--amtecco-paper, #f4f1ea) !important;
    font-family: var(--amtecco-sans, sans-serif);
    font-size: 0.925rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease !important;
}

.sf-site .amtecco-error-page .error-button--primary {
    border-color: var(--amtecco-action, #c54b3c);
    background: var(--amtecco-action, #c54b3c);
    color: #fff !important;
}

.sf-site .amtecco-error-page .error-button--secondary {
    border-color: var(--amtecco-action-soft, #ed8376);
}

.sf-site .amtecco-error-page .error-button--quiet {
    border-color: var(--amtecco-line, rgba(244, 241, 234, 0.14));
    color: var(--amtecco-paper-soft, #d9d5cd) !important;
}

.sf-site .amtecco-error-page .error-button:hover {
    border-color: var(--amtecco-action-soft, #ed8376);
    background: var(--amtecco-action-soft, #ed8376);
    color: var(--amtecco-carbon-deep, #090b0d) !important;
    box-shadow: none !important;
    transform: none !important;
}

.sf-site .amtecco-error-page .error-status {
    display: flex;
    max-width: none;
    align-items: center;
    gap: 0.65rem;
    margin: 2.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--amtecco-line, rgba(244, 241, 234, 0.14));
    color: var(--amtecco-steel, #89939d) !important;
    font-family: var(--amtecco-mono, monospace);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.5;
    text-transform: uppercase;
}

.sf-site .amtecco-error-page .error-status__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--amtecco-mark, #c54b3c);
}

@media (max-width: 767.98px) {
    .sf-site .amtecco-legal-page .contact-grid,
    .sf-site .amtecco-legal-page .service-features {
        grid-template-columns: minmax(0, 1fr);
    }

    .sf-site .amtecco-legal-page .terms-section h2 {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .sf-site .amtecco-legal-page .terms-section h2 i {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}

@media (max-width: 575.98px) {
    .sf-site .amtecco-legal-page .terms-hero h1 {
        font-size: clamp(2.3rem, 12vw, 3rem) !important;
    }

    .sf-site .amtecco-legal-page .timeline-item {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }

    .sf-site .amtecco-legal-page .timeline-marker {
        width: 40px;
        height: 40px;
    }

    .sf-site .amtecco-error-page .error-panel {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .sf-site .amtecco-error-page .error-actions,
    .sf-site .amtecco-error-page .error-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-site .amtecco-legal-page *,
    .sf-site .amtecco-error-page * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .sf-site .amtecco-legal-page,
    .sf-site .amtecco-legal-page .terms-content,
    .sf-site .amtecco-legal-page .terms-section {
        background: #fff !important;
        color: #111 !important;
    }

    .sf-site .amtecco-legal-page .terms-hero {
        padding-block: 2rem !important;
        background: #fff !important;
    }

    .sf-site .amtecco-legal-page .terms-hero h1,
    .sf-site .amtecco-legal-page .terms-hero .lead,
    .sf-site .amtecco-legal-page .terms-section h2,
    .sf-site .amtecco-legal-page .terms-section h3,
    .sf-site .amtecco-legal-page .terms-section h4,
    .sf-site .amtecco-legal-page .terms-section p,
    .sf-site .amtecco-legal-page .terms-section li,
    .sf-site .amtecco-legal-page .terms-section strong,
    .sf-site .amtecco-legal-page .feature-item span {
        color: #111 !important;
    }

    .sf-site .amtecco-legal-page .terms-section {
        break-inside: avoid;
        border-color: #aaa !important;
        box-shadow: none !important;
    }

    .sf-site .amtecco-legal-page .terms-cta,
    .sf-site .amtecco-legal-page .terms-meta {
        display: none !important;
    }
}
