/* tronXlabs site styles. Everything lives here: the Content-Security-Policy forbids inline styles. */

/* ------------------- */
/* Fonts: self-hosted Poppins (SIL Open Font License, see /assets/fonts/OFL.txt) */
/* ------------------- */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/poppins-latin-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/poppins-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/poppins-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/poppins-latin-700.woff2') format('woff2');
}

/* ------------------- */
/* Global Styles & Variables */
/* ------------------- */
:root {
    --primary-blue: #0d6efd;
    --dark-blue: #0a58ca;
    --gradient-start: #6a11cb;
    --gradient-end: #2575fc;
    --text-dark: #212529;
    --text-secondary: #5c636a; /* #6c757d was 4.44:1 on --bg-light, below WCAG AA */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --danger: #b02a37;
    --success: #198754;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-secondary);
    background-color: var(--bg-white);
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

/* Guard against anything animating in from the side pushing the page wider than the screen. */
main {
    overflow-x: clip;
}
@supports not (overflow-x: clip) {
    main {
        overflow-x: hidden;
    }
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* The header is fixed, so an in-page link must stop short of sliding under it. */
section[id] {
    scroll-margin-top: 90px;
}

h1, h2, h3, h4 {
    color: var(--text-dark);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
}

.svg-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn:disabled {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}
.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}
.btn-outline:hover {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.btn-secondary {
    background-color: var(--text-dark);
    color: var(--bg-white);
}
.btn-secondary:hover {
    background-color: #000000;
}

/* WhatsApp's darker green keeps white text readable (7.7:1). */
.btn-whatsapp {
    background-color: #075e54;
    color: var(--bg-white);
}
.btn-whatsapp:hover {
    background-color: #054d44;
}

/* ------------------- */
/* Header / Navigation */
/* ------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    z-index: 1000;
    background: transparent; /* Start transparent */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d1b4ff; /* Fallback for browsers without text gradients */
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #d1b4ff, #8ec5fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-header.scrolled .logo,
.page-header .logo {
    color: var(--text-dark);
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--bg-white);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-blue);
}

.main-header.scrolled .main-nav a {
    color: var(--text-secondary);
}
.main-header.scrolled .main-nav a:hover {
    color: var(--primary-blue);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none; /* Shown on smaller screens */
    color: var(--bg-white);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
    display: none;
}
.menu-toggle[aria-expanded="true"] .icon-close {
    display: inline-block;
}

.main-header.scrolled .menu-toggle {
    color: var(--text-dark);
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    max-width: 320px;
    height: 100%;
    background-color: var(--text-dark);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    visibility: hidden; /* Closed menu links can't receive focus */
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
    /* Visible at once when opening, so focus can move into the panel. */
    transition: transform 0.3s ease-in-out, visibility 0s;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-menu ul li {
    margin-bottom: 30px;
}

.mobile-menu a {
    color: var(--bg-white);
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--primary-blue);
}

.mobile-menu .mobile-menu-cta {
    margin-top: 20px;
    display: inline-block;
}
.mobile-menu .mobile-menu-cta:hover {
    color: var(--bg-white);
}

/* The panel only exists at mobile widths; it must not linger after a rotate or resize. */
@media (min-width: 993px) {
    .mobile-menu {
        display: none;
    }
}

/* ------------------- */
/* Hero Section */
/* ------------------- */
.hero-section {
    padding: 180px 0 120px 0;
    text-align: center;
    position: relative;
    background: linear-gradient(to bottom, var(--gradient-start) 0%, var(--gradient-end) 70%, var(--bg-white) 100%);
    overflow: hidden;
    color: var(--bg-white);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.hero-section h1 {
    color: var(--bg-white);
    margin-bottom: 20px;
}

.hero-section p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin: 0 10px;
}

@media (max-width: 768px) {
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .hero-buttons .btn {
        margin: 0;
        width: 100%;
        max-width: 300px;
    }
}

/* ------------------- */
/* What We Do Section */
/* ------------------- */
#what-we-do {
    padding-top: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.service-card .icon {
    font-size: 2rem;
    color: var(--primary-blue);
    background-color: #e7f1ff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
}
.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* ------------------- */
/* ROI Calculator Section */
/* ------------------- */
#roi-calculator {
    background-color: var(--bg-light);
}
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
}
.calculator-form {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.calculator-form .form-group {
    margin-bottom: 1.5rem;
}
.calculator-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}
.calculator-form .form-group input,
.calculator-form .form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--bg-white);
}
.calculator-form .form-group input:focus,
.calculator-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}
.input-with-select {
    display: flex;
    gap: 8px;
}
.calculator-form .input-with-select select {
    width: auto;
    flex: 0 0 auto;
}
.calculator-form .input-with-select input {
    flex: 1 1 auto;
    min-width: 0;
}
.calculator-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}
.calculator-results .result-box {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.calculator-results .result-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}
.calculator-results .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 0.5rem;
}
.calculator-note {
    font-size: 0.85rem;
    text-align: center;
}

/* ------------------- */
/* Why Choose Us Section */
/* ------------------- */
.choose-us-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
}

.choose-us-tag {
    display: block;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
}

.choose-us-content h2 {
    text-align: left;
    margin-bottom: 20px;
}

.proof-statement {
    margin: 30px 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--primary-blue);
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 500;
}

.features-list .feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 25px;
}
.feature-item .icon {
    font-size: 1.5rem;
    color: var(--primary-blue);
}
.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* ------------------- */
/* Our Work Section */
/* ------------------- */
#results {
    background-color: var(--bg-light);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.result-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}
.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.result-card .sector {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}
.result-card .project-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
}
.card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.card-chips .chip {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px 12px;
}

/* Work Groups: In Production vs. Concept Builds */
.work-group + .work-group {
    margin-top: 80px;
}

.work-group-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 12px;
}

.work-group-intro {
    max-width: 720px;
    margin: 0 auto 40px auto;
    text-align: center;
    font-size: 1.05rem;
}

.work-badge {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.work-badge-live {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}
.work-badge-concept {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.card-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 12px;
}
.card-topline .sector {
    margin-bottom: 0;
}

.result-card-live {
    border-top: 4px solid var(--primary-blue);
}
.result-card-concept {
    border: 2px dashed #b6bfc9;
    box-shadow: none;
}

.chat-demo-caption {
    margin-top: 14px;
    text-align: center;
    font-size: 0.85rem;
}

/* Wellness Chat Demo */
.chat-demo-container {
    max-width: 512px;
    margin: 0 auto 60px auto;
}

.chat-demo-card {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.chat-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-right: 12px;
}

.chat-name {
    font-weight: 700;
    color: var(--text-dark);
}

.chat-status {
    font-size: 0.875rem;
    color: #15803d; /* #22c55e was 2.3:1 on white */
    font-weight: 600;
}

.chat-window-messages {
    height: 12rem;
    overflow-y: auto;
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-window-messages:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.4;
    font-size: 0.95rem;
}
.bot-message-wrapper {
    display: flex;
    justify-content: flex-start;
}

.bot-message-wrapper .chat-message {
    background-color: #e9ecef;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.user-message-wrapper {
    display: flex;
    justify-content: flex-end;
}

.user-message-wrapper .chat-message {
    background-color: var(--primary-blue);
    color: var(--bg-white);
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

/* ------------------- */
/* Contact Section */
/* ------------------- */
#contact {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-white);
}
/* Two soft lights behind the panel, so the flat gradient gets some depth. */
#contact::before,
#contact::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}
#contact::before {
    width: 480px;
    height: 480px;
    top: -180px;
    left: -140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%);
}
#contact::after {
    width: 560px;
    height: 560px;
    right: -200px;
    bottom: -240px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.55), rgba(13, 110, 253, 0) 70%);
}

/* The pitch on the left, the form panel on the right; one column below 993px. */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 56px;
    align-items: start;
}

.contact-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
#contact h2 {
    color: var(--bg-white);
    text-align: left;
    line-height: 1.2;
}
#contact .section-subtitle,
#contact p {
    color: rgba(255, 255, 255, 0.85);
}
#contact .contact-subtitle {
    text-align: left;
    max-width: 480px;
    margin: 0 0 32px 0;
}

.contact-points {
    list-style: none;
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
    max-width: 480px;
}
.contact-points li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: rgba(255, 255, 255, 0.85);
}
.contact-points strong {
    color: var(--bg-white);
    font-weight: 600;
}
.contact-points .svg-icon {
    box-sizing: content-box;
    width: 18px;
    height: 18px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.14);
    vertical-align: baseline;
}
#contact .contact-direct a,
.contact-points a {
    color: var(--bg-white);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Frosted panel, so the fields sit on their own surface instead of the bare gradient. */
.contact-form-wrapper {
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px rgba(12, 6, 46, 0.3);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .contact-form-wrapper {
        background-color: rgba(255, 255, 255, 0.08);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}

.contact-form .form-group {
    margin-bottom: 18px;
}
.form-row {
    display: flex;
    gap: 18px;
}
.form-row .form-group {
    width: 50%;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}
.contact-form .optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.8;
}

/* A dark fill, not a white wash: white text and placeholders stay readable on the gradient. */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background-color: rgba(17, 8, 51, 0.3);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--bg-white);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.contact-form input:hover,
.contact-form textarea:hover {
    border-color: rgba(255, 255, 255, 0.4);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--bg-white);
    background-color: rgba(17, 8, 51, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
/* Chrome paints autofilled fields near-white, which hid the white text. */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--bg-white);
    -webkit-box-shadow: 0 0 0 1000px #2a1a5e inset;
    caret-color: var(--bg-white);
}

.contact-form [aria-invalid="true"] {
    border-color: #ffc9ce;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.8);
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 16px 28px;
    background-color: var(--bg-white);
    color: var(--gradient-start);
    box-shadow: 0 12px 24px rgba(12, 6, 46, 0.25);
}
.contact-form .btn:hover {
    background-color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(12, 6, 46, 0.32);
}
.contact-form .btn:disabled {
    box-shadow: none;
}
#contact .form-note {
    margin-top: 14px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

#contact .field-error {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    border-radius: 8px;
    background-color: var(--danger);
    color: var(--bg-white);
    font-size: 0.875rem;
}
#contact .field-error[hidden] {
    display: none;
}

/* Cap's "I'm not a robot" box: full width of the form instead of its 230px default. */
#contact-cap {
    --cap-widget-width: 100%;
    --cap-border-radius: 12px;
    display: block;
}

/* Honeypot: invisible to people, filled in by form-spamming bots. */
.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 22px;
    border-radius: 16px;
    background-color: var(--bg-white);
    border-left: 5px solid var(--success);
    box-shadow: 0 16px 36px rgba(12, 6, 46, 0.25);
}
.form-status:empty {
    display: none;
}
.form-status.is-error {
    border-left-color: var(--danger);
}
/* A tick or an exclamation mark, drawn in CSS so no extra request is needed. */
.form-status-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(25, 135, 84, 0.14);
    color: var(--success);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}
.form-status-icon::before {
    content: "\2713";
}
.form-status.is-error .form-status-icon {
    background-color: rgba(176, 42, 55, 0.14);
    color: var(--danger);
}
.form-status.is-error .form-status-icon::before {
    content: "\0021";
}
.form-status-body {
    min-width: 0;
}
#contact .form-status p {
    color: var(--text-dark);
    margin-bottom: 6px;
}
#contact .form-status .form-status-title {
    font-size: 1.1rem;
    font-weight: 600;
}
.form-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}
.form-status-actions .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
}

/* ------------------- */
/* Footer */
/* ------------------- */
.site-footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.78);
    padding: 40px 0;
    text-align: center;
    font-size: 0.95rem;
}
.site-footer p {
    margin-bottom: 6px;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 14px;
}
.footer-links a {
    color: var(--bg-white);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-links a:hover {
    color: #cfe2ff;
}

/* ------------------- */
/* Privacy Policy and Terms pages */
/* ------------------- */
.page-header {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
}
.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.back-link {
    color: var(--dark-blue);
    font-weight: 500;
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}
.legal-page {
    max-width: 800px;
    padding-top: 50px;
    padding-bottom: 60px;
}
.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.legal-page h2 {
    font-size: 1.4rem;
    text-align: left;
    margin: 32px 0 10px;
}
.legal-page p,
.legal-page li {
    margin-bottom: 12px;
}
.legal-page ul {
    padding-left: 1.4rem;
}
.legal-page a {
    color: var(--dark-blue);
}

/* ------------------- */
/* Result page for form posts without JavaScript (rendered by send-email.php) */
/* ------------------- */
.status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}
.status-card {
    max-width: 560px;
    padding: 40px;
    border-radius: 12px;
    background-color: var(--bg-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.status-card h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}
.status-card p {
    margin-bottom: 12px;
}
.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* ------------------- */
/* Scroll reveal. Content is only hidden when JavaScript runs and motion is welcome; */
/* if the script never starts, the fail-safe animation shows everything after 4 seconds. */
/* ------------------- */
@keyframes reveal-failsafe {
    to {
        opacity: 1;
        transform: none;
    }
}

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    [data-reveal]:not(.reveal-done) {
        transition: opacity 2.5s cubic-bezier(0.5, 0, 0, 1) var(--reveal-delay, 400ms),
                    transform 2.5s cubic-bezier(0.5, 0, 0, 1) var(--reveal-delay, 400ms);
    }
    [data-reveal]:not(.is-revealed) {
        opacity: 0;
        transform: translateY(60px);
    }
    [data-reveal="top"]:not(.is-revealed) {
        transform: translateY(-60px);
    }
    html:not(.reveal-ready) [data-reveal]:not(.is-revealed) {
        animation: reveal-failsafe 0s 4s forwards;
    }
}

/* Sideways reveals only where there is room; on phones they pushed the page wider than the screen. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) and (min-width: 993px) {
    [data-reveal="left"]:not(.is-revealed) {
        transform: translateX(-60px);
    }
    [data-reveal="right"]:not(.is-revealed) {
        transform: translateX(60px);
    }
}

/* ------------------- */
/* Responsive Design */
/* ------------------- */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }

    .main-nav, .main-header .desktop-cta {
        display: none;
    }
    .menu-toggle {
        display: block;
    }

    .services-grid,
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
    .choose-us-grid,
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .contact-form-wrapper {
        padding: 28px;
    }

    section {
        padding: 50px 0;
    }
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    section { padding: 40px 0; }
    h1 { font-size: 2.5rem; }
    .hero-section { padding-top: 150px; padding-bottom: 80px; }
    .work-group + .work-group { margin-top: 50px; }
    .work-group-title { font-size: 1.5rem; }

    .services-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .form-group {
        width: 100%;
        margin-bottom: 18px;
    }
    .contact-form-wrapper {
        padding: 22px;
        border-radius: 18px;
    }
    .form-status {
        padding: 18px;
    }
}
