/* ============================================================
   BRAND TOKENS — taken from the Bharat Bioenergy logo
   ============================================================ */

:root {
    --brand-blue: #1685a8;
    --brand-blue-dark: #0e6d8c;
    --brand-teal: #29b0cf;
    --brand-green: #85b135;
    --brand-lime: #b5cc18;
    --brand-orange: #f08a1c;
    --brand-amber: #f7b30f;

    --ink: #12263a;
    --ink-soft: #536b82;
    --line: #d6e0e6;
    --line-soft: #e5edf1;
    --surface: #ffffff;
    --page: #f3f7f5;

    --danger: #d93a3a;
    --danger-bg: #fff5f5;
    --valid: #5e9e2c;

    --radius: 12px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --brand-gradient: linear-gradient(
        90deg,
        var(--brand-green),
        var(--brand-amber),
        var(--brand-orange),
        var(--brand-blue)
    );
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Poppins, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(133, 177, 53, 0.1),
            transparent 40%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(22, 133, 168, 0.1),
            transparent 45%
        ),
        var(--page);
    background-attachment: fixed;
}

.page {
    min-height: 100vh;
    padding: 36px 16px;
    display: flex;
    justify-content: center;
}

.card {
    position: relative;
    width: 100%;
    max-width: 1050px;
    background: var(--surface);
    border-radius: 22px;
    padding: 40px 46px 44px;
    box-shadow:
        0 1px 2px rgba(18, 38, 58, 0.04),
        0 18px 50px rgba(18, 38, 58, 0.08);
    overflow: hidden;
    animation: card-in 0.6s var(--ease) both;
}

/* Four-colour strip across the top of the card */
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--brand-gradient);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* BRAND */

.brand {
    text-align: center;
}

.brand img {
    width: 160px;
    max-width: 100%;
    height: auto;
}

.accent {
    width: 110px;
    height: 5px;
    margin: 14px auto 28px;
    border-radius: 10px;
    background: var(--brand-gradient);
}

/* HEADINGS */

.eyebrow {
    margin: 0;
    color: var(--brand-green);
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 13px;
}

h1 {
    margin: 3px 0 8px;
    font-size: 42px;
    line-height: 1.15;
    color: var(--brand-blue);
}

h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 34px 0 18px;
    padding-bottom: 10px;
    color: var(--brand-blue);
    font-size: 19px;
    border-bottom: 1px solid var(--line-soft);
}

/* Leaf-coloured marker before every section heading */
h3::before {
    content: "";
    flex: none;
    width: 6px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--brand-green), var(--brand-blue));
}

.intro {
    color: var(--ink-soft);
    margin: 0 0 22px;
    line-height: 1.6;
}

.req {
    color: var(--brand-orange);
    font-weight: 700;
}

/* GRID */

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 22px;
}

.contact-role-row {
    margin-top: 18px;
}

.full {
    grid-column: 1 / -1;
}

/* ============================================================
   FORM FIELDS
   ============================================================ */

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.field:focus-within label {
    color: var(--brand-blue);
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: 0;
    background: var(--surface);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}

.field input,
.field select {
    height: 48px;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

.field select {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231685a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9aabb9;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
    border-color: #b3c6d1;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(22, 133, 168, 0.12);
}

/* File inputs */

.field input[type="file"] {
    height: auto;
    padding: 8px;
    border-style: dashed;
    color: var(--ink-soft);
    cursor: pointer;
}

.field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 16px;
    border: 0;
    border-radius: 9px;
    font: 600 13px Poppins, sans-serif;
    color: var(--brand-blue-dark);
    background: rgba(22, 133, 168, 0.1);
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s var(--ease);
}

.field input[type="file"]:hover::file-selector-button {
    color: #fff;
    background: var(--brand-green);
}

.field input[type="file"]:active::file-selector-button {
    transform: scale(0.97);
}

/* ============================================================
   VALIDATION STATES
   ============================================================ */

.field .is-valid {
    border-color: var(--valid);
}

.field .is-valid:focus {
    box-shadow: 0 0 0 4px rgba(94, 158, 44, 0.14);
}

.error_input,
.field .error_input {
    border-color: var(--danger) !important;
    background-color: var(--danger-bg);
}

.field .error_input:focus {
    box-shadow: 0 0 0 4px rgba(217, 58, 58, 0.14);
}

.field:has(.error_input) label {
    color: var(--danger);
}

.error_input.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    20%,
    60% {
        transform: translateX(-4px);
    }
    40%,
    80% {
        transform: translateX(4px);
    }
}

/* Inline error message shown below each field */

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    transition:
        max-height 0.3s var(--ease),
        opacity 0.25s ease,
        transform 0.3s var(--ease),
        margin 0.3s var(--ease);
}

.field-error::before {
    content: "!";
    flex: none;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border-radius: 50%;
    color: #fff;
    background: var(--danger);
    font-size: 11px;
    font-weight: 700;
}

.field-error.show {
    max-height: 80px;
    margin-top: 7px;
    opacity: 1;
    transform: none;
}

/* DECLARATION */

.declaration {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border: 1.5px solid var(--line-soft);
    border-radius: var(--radius);
    background: #f8fbf6;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.declaration:hover {
    border-color: rgba(133, 177, 53, 0.5);
}

.declaration input {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand-green);
    cursor: pointer;
}

.declaration.has-error {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.declaration + .field-error.show {
    margin-top: 8px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.submit-btn {
    position: relative;
    width: 100%;
    height: 54px;
    margin-top: 28px;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    font: 600 16px Poppins, sans-serif;
    letter-spacing: 0.3px;
    cursor: pointer;
    background: linear-gradient(
        110deg,
        var(--brand-blue) 0%,
        var(--brand-teal) 45%,
        var(--brand-green) 100%
    );
    background-size: 220% 100%;
    background-position: 0% 50%;
    box-shadow: 0 8px 22px rgba(22, 133, 168, 0.28);
    transition:
        background-position 0.6s var(--ease),
        transform 0.3s var(--ease),
        box-shadow 0.3s var(--ease);
}

/* Light sweep across the button on hover */
.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.8s var(--ease);
}

.submit-btn:hover:not(:disabled) {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(94, 158, 44, 0.3);
}

.submit-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 6px 16px rgba(22, 133, 168, 0.25);
    transition-duration: 0.1s;
}

.submit-btn:focus-visible {
    outline: 3px solid var(--brand-amber);
    outline-offset: 3px;
}

.submit-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Spinner while submitting */
.submit-btn.is-loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    vertical-align: -3px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ALERTS */

.alert {
    padding: 16px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    animation: alert-in 0.35s var(--ease) both;
}

.alert[hidden] {
    display: none;
}

@keyframes alert-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.alert.error {
    background: #fde7e7;
    border: 1px solid #f3bcbc;
    border-left: 5px solid var(--danger);
    color: #9b2222;
    font-size: 14px;
}

.alert.success {
    background: #eef7e4;
    border: 1px solid #cfe5b5;
    border-left: 5px solid var(--brand-green);
    color: #3d6b16;
}

.alert.success h2 {
    margin: 0 0 6px;
}

.alert.success p {
    margin: 0;
    line-height: 1.6;
}

/* HONEYPOT */

.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */

.success-logo {
    text-align: center;
    margin-bottom: 20px;
}

.success-logo img {
    width: 220px;
    max-width: 80%;
    height: auto;
    display: inline-block;
}

.card.success-only {
    max-width: 850px;
    padding: 30px;
    background: transparent;
    box-shadow: none;
}

.card.success-only::before {
    display: none;
}

.card.success-only .success-logo {
    display: block !important;
}

.card.success-only .alert.success {
    width: 100%;
    margin: 0;
    padding: 24px 28px;
    border-radius: 12px;
}

.card.success-only .alert.success h2 {
    margin: 0 0 8px;
}

.card.success-only .alert.success p {
    margin: 0;
    line-height: 1.6;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .grid-three {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .page {
        padding: 12px 8px;
    }

    .card {
        padding: 28px 18px 30px;
        border-radius: 17px;
    }

    h1 {
        font-size: 32px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .full {
        grid-column: auto;
    }

    h3 {
        font-size: 17px;
    }

    .intro {
        font-size: 13px;
    }

    .brand img {
        width: 135px;
    }

    .grid-three {
        grid-template-columns: 1fr;
    }

    .card.success-only {
        padding: 12px;
    }

    .success-logo img {
        width: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
