html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.landing-navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    background-color: #252641;
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.landing-navigation-brand-row {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.landing-navigation.is-scrolled {
    background-color: rgba(37, 38, 65, 0.97);
    box-shadow: 0 10px 30px rgba(37, 38, 65, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#features,
.landing-section {
    scroll-margin-top: 96px;
}

.landing-section {
    padding-top: 112px;
}

.landing-section-heading {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.landing-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #279486;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.landing-section h2,
.templates-copy h2,
.contact-copy h2 {
    margin: 0 0 16px;
    color: #2f327d;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.landing-section-heading > p,
.templates-copy > p {
    color: #6b7280;
    line-height: 1.8;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.workflow-card {
    position: relative;
    min-height: 250px;
    padding: 28px 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8eaf1;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(47, 50, 125, 0.08);
}

.workflow-card::after {
    position: absolute;
    right: -26px;
    bottom: -32px;
    width: 110px;
    height: 110px;
    background: rgba(70, 166, 151, 0.1);
    border-radius: 999px;
    content: "";
}

.workflow-number {
    display: inline-grid;
    width: 46px;
    height: 46px;
    margin-bottom: 24px;
    place-items: center;
    color: #fff;
    background: #46a697;
    border-radius: 14px;
    font-weight: 700;
}

.workflow-card:nth-child(2) .workflow-number {
    background: #e2a03f;
}

.workflow-card:nth-child(3) .workflow-number {
    background: #7a5fc0;
}

.workflow-card:nth-child(4) .workflow-number {
    background: #3e5dc4;
}

.workflow-card h3,
.report-card h3 {
    margin: 0 0 10px;
    color: #252641;
    font-size: 1.1rem;
    font-weight: 700;
}

.workflow-card p,
.report-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.7;
}

.templates-section {
    padding-top: 128px;
}

.templates-showcase {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: center;
    padding: clamp(28px, 5vw, 64px);
    background: #f6fbfa;
    border: 1px solid #ddf0ec;
    border-radius: 30px;
}

.template-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 28px 0;
}

.template-selector button {
    padding: 8px 12px;
    color: #37635d;
    background: #fff;
    border: 1px solid #cee6e2;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.template-selector button:hover,
.template-selector button:focus-visible {
    color: #fff;
    background: #46a697;
    border-color: #46a697;
    outline: none;
    transform: translateY(-1px);
}

.template-selector button:focus-visible {
    box-shadow: 0 0 0 3px rgba(70, 166, 151, 0.2);
}

.template-preview-hint {
    margin: -16px 0 24px;
    color: #718096;
    font-size: 0.78rem;
}

.landing-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    color: #fff;
    background: #46a697;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.landing-primary-link:hover {
    color: #fff;
    background: #318b7d;
}

.template-preview-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 24px 55px rgba(37, 38, 65, 0.13);
}

.template-preview-card > img {
    display: block;
    width: 100%;
    aspect-ratio: 1.5 / 1;
    object-fit: cover;
    object-position: top;
}

.template-preview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #e5e7eb;
}

.template-preview-meta > div {
    padding: 18px;
    background: #fff;
}

.template-preview-meta strong,
.template-preview-meta span {
    display: block;
}

.template-preview-meta strong {
    color: #252641;
    font-size: 0.9rem;
}

.template-preview-meta span {
    margin-top: 3px;
    color: #7b8190;
    font-size: 0.75rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.report-card {
    padding: 26px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
}

.report-tag {
    display: inline-block;
    margin-bottom: 16px;
    padding: 5px 9px;
    color: #16685d;
    background: #e9f7f4;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-tag--optional {
    color: #75551b;
    background: #fff4dc;
}

.faq-section {
    max-width: 940px;
    margin-inline: auto;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-list details {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(37, 38, 65, 0.05);
}

.faq-list details[open] {
    border-color: #b8ded8;
}

.faq-list summary {
    position: relative;
    padding: 20px 58px 20px 22px;
    color: #252641;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    position: absolute;
    top: 50%;
    right: 22px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #247c70;
    background: #edf8f6;
    border-radius: 999px;
    content: "+";
    transform: translateY(-50%);
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list details p {
    margin: 0;
    padding: 0 58px 22px 22px;
    color: #6b7280;
    line-height: 1.75;
}

.contact-section {
    padding-top: 128px;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 60px;
    padding: clamp(28px, 6vw, 72px);
    color: #fff;
    background: #252641;
    border-radius: 32px;
    box-shadow: 0 28px 65px rgba(37, 38, 65, 0.22);
}

.landing-eyebrow--light {
    color: #75d4c6;
}

.contact-copy h2 {
    color: #fff;
}

.contact-copy > p {
    color: #cbd5e1;
    line-height: 1.8;
}

.contact-links {
    display: grid;
    gap: 11px;
    margin-top: 34px;
}

.contact-links a {
    display: block;
    padding: 14px 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    text-decoration: none;
}

.contact-links a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.contact-links span,
.contact-links strong {
    display: block;
}

.contact-links span {
    margin-bottom: 2px;
    color: #9ca3af;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-links strong {
    color: #fff;
    font-size: 0.9rem;
}

.contact-form {
    padding: 28px;
    color: #374151;
    background: #fff;
    border-radius: 20px;
}

.contact-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-form label {
    display: block;
    margin-bottom: 14px;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;
    color: #252641;
    background: #fff;
    border: 1px solid #d7dae2;
    border-radius: 9px;
    font: inherit;
    font-weight: 400;
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #46a697;
    box-shadow: 0 0 0 3px rgba(70, 166, 151, 0.16);
}

.contact-form .contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    line-height: 1.5;
}

.contact-consent input {
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    flex: 0 0 auto;
}

.contact-consent a {
    color: #247c70;
    text-decoration: underline;
}

.contact-form > button {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    color: #fff;
    background: #e2a03f;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.contact-form > button:hover {
    background: #cd8b2c;
}

.contact-form-status {
    margin: 12px 0 0;
    color: #7b8190;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.contact-form-status.is-active {
    color: #247c70;
    font-weight: 650;
}

body.template-modal-open {
    overflow: hidden;
}

.template-modal[hidden] {
    display: none !important;
}

.template-modal {
    position: fixed;
    z-index: 10010;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
}

.template-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(6px);
}

.template-modal-panel {
    position: relative;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    overflow: hidden;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    box-shadow: 0 28px 85px rgba(15, 23, 42, 0.38);
}

.template-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px 12px;
}

.template-modal-header span {
    display: block;
    margin-bottom: 2px;
    color: #279486;
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.template-modal-header h2 {
    margin: 0;
    color: #252641;
    font-size: 1.45rem;
    font-weight: 750;
}

.template-modal-close {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    color: #4b5563;
    background: #f3f4f6;
    border: 0;
    border-radius: 999px;
    font-family: Arial, sans-serif;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.template-modal-close:hover {
    color: #fff;
    background: #252641;
}

.template-modal-description {
    margin: 0;
    padding: 0 22px 14px;
    color: #6b7280;
    font-size: 0.82rem;
}

.template-modal-frame-wrap {
    position: relative;
    min-height: 340px;
    flex: 1 1 auto;
    overflow: hidden;
    background: #e9edf3;
    border-block: 1px solid #dfe3ea;
}

.template-modal-frame-wrap iframe {
    position: relative;
    z-index: 2;
    width: 100%;
    height: min(68vh, 760px);
    display: block;
    background: transparent;
    border: 0;
    opacity: 0;
    transition: opacity 180ms ease;
}

.template-modal-frame-wrap.is-loaded iframe {
    opacity: 1;
}

.template-modal-loading {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    color: #5f6878;
    font-size: 0.9rem;
    font-weight: 650;
}

.template-modal-frame-wrap.is-loaded .template-modal-loading {
    display: none;
}

.template-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 22px;
}

.template-modal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.template-modal-nav button,
.template-modal-footer > a {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.template-modal-nav button {
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e1e4e8;
}

.template-modal-nav button:hover {
    color: #fff;
    background: #252641;
}

.template-modal-nav span {
    min-width: 92px;
    color: #6b7280;
    font-size: 0.75rem;
    text-align: center;
}

.template-modal-footer > a {
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: #46a697;
}

.template-modal-footer > a:hover {
    color: #fff;
    background: #318b7d;
}

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

    .templates-showcase,
    .contact-panel {
        grid-template-columns: 1fr;
    }

    .templates-showcase,
    .contact-panel {
        gap: 40px;
    }
}

@media (max-width: 720px) {
    #features,
    .landing-section {
        scroll-margin-top: 104px;
    }

    .landing-section,
    .templates-section,
    .contact-section {
        padding-top: 88px;
    }

    .workflow-grid,
    .report-grid,
    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .workflow-card {
        min-height: auto;
    }

    .templates-showcase,
    .contact-panel {
        padding: 24px;
        border-radius: 22px;
    }

    .template-preview-meta {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }

    .template-modal {
        padding: 10px;
    }

    .template-modal-panel {
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .template-modal-header {
        padding: 14px 14px 10px;
    }

    .template-modal-header h2 {
        font-size: 1.15rem;
    }

    .template-modal-description {
        padding: 0 14px 10px;
        font-size: 0.74rem;
    }

    .template-modal-frame-wrap iframe {
        height: 62vh;
    }

    .template-modal-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
    }

    .template-modal-nav {
        justify-content: space-between;
    }

    .template-modal-footer > a {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .landing-navigation .landing-navigation-brand-mark,
    .landing-navigation .landing-navigation-menu > a {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .landing-navigation {
        transition: none;
    }
}
