:root {
    --primary-color: #5d3fd3;
    --primary-color-light: #8e79e0;
    --primary-color-dark: #4a2fb3;
    --white: #fff;
    --muted: #999;
    --muted-less: #666;
    --black: #000;
    --error: #f44336;
    --background-light: #f8f9fa;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Mukta Mahee", sans-serif;
    color: #222;
    line-height: 1.6;
    font-size: 1.125rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
optgroup,
select,
textarea {
    font-family: "Mukta Mahee", sans-serif;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted) !important;
    opacity: 0.7;
}

/* Heading styles - updated for semantic HTML */
h1 {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 2.4rem;
    line-height: 1.2;
    margin: 0 0 25px 0;
    text-align: center;
}

h1 strong {
    color: var(--primary-color);
    font-size: inherit;
    display: inline;
}

h1 span {
    display: block;
    margin-top: 12px;
    font-size: 1.3rem;
    color: #666;
    font-weight: 400;
    line-height: 1.4;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #2c2c2c;
    text-align: center;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #2c2c2c;
    line-height: 1.3;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

/* Section spacing */
section {
    margin-bottom: 35px;
}

/* Legacy strong/span support for backward compatibility */
strong {
    font-weight: 800;
}

span {
    display: inline;
    font-size: inherit;
    line-height: inherit;
}

.wrapper > div:nth-child(1) div:first-child,
.error__wrapper div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error__wrapper > div {
    min-height: 400px;
}

/* Better paragraph spacing and styling */
p {
    display: block;
    color: var(--muted-less);
    margin: 0 0 1.5rem 0;
    line-height: 1.8;
}

p:last-of-type {
    margin-bottom: 0;
}

/* List styles for semantic content */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul li {
    margin: 12px 0;
    line-height: 1.7;
}

/* Removed mailto section as per requirements */
.mailto {
    display: none;
}

a {
    color: var(--primary-color);
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--primary-color-light);
    outline: 0;
}

a.btn:hover,
a.btn:focus {
    color: #fff !important;
}

.wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.error__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    height: 100%;
}

.wrapper > div:nth-child(1),
.error__wrapper > div:nth-child(1) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper > div:nth-child(1) div:first-child {
    min-height: 24rem;
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.wrapper > div:nth-child(1)::before,
.error__wrapper > div:nth-child(1)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    z-index: -1;
}

.wrapper > div,
.error__wrapper > div {
    padding: 4rem 3rem;
    text-align: center;
}

.wrapper > div:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper form {
    width: 100%;
    max-width: 500px;
}

.wrapper form > div {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.form__group {
    margin-bottom: 1.75rem;
    position: relative;
}

input,
textarea {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    padding: 12px 16px;
    font-size: 1rem;
    width: 100%;
    -webkit-transition: all 0.25s ease;
    -moz-transition: all 0.25s ease;
    transition: all 0.25s ease;
    background-color: var(--white);
}

textarea {
    height: 140px;
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
    line-height: 1.6;
}

label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
    display: block;
}

label span {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.875rem;
    margin-left: 0.3rem;
    display: inline;
    line-height: 1.5rem;
}

input:hover,
textarea:hover {
    border-color: var(--primary-color-light);
}

input:focus,
input:active,
textarea:focus,
textarea:active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.1);
}

.input__wrapper {
    position: relative;
    width: 100%;
}

.input__wrapper input {
    width: 100%;
    padding-right: 70px;
}

.currency {
    position: absolute;
    right: 0;
    top: 0;
    width: fit-content;
    background-color: var(--primary-color);
    color: var(--white);
    height: 100%;
    padding: 0 18px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.danger input,
.danger textarea {
    border-color: var(--error);
    background-color: rgba(244, 67, 54, 0.02);
}

.form__input__feedback {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.875rem;
    color: var(--error);
    font-weight: 600;
}

.form__input__feedback::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.4rem;
}

button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    width: 100%;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-transition: all 0.25s ease;
    -moz-transition: all 0.25s ease;
    transition: all 0.25s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(93, 63, 211, 0.2);
}

button:hover {
    background-color: var(--primary-color-light);
    box-shadow: 0 6px 16px rgba(93, 63, 211, 0.3);
    transform: translateY(-2px);
}

button:active {
    background-color: var(--primary-color-dark);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(93, 63, 211, 0.2);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 63, 211, 0.3);
}

/* Footer styles */
footer {
    margin-top: 60px;
    padding: 30px 20px;
    background: #f5f5f5;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    width: 100%;
}

footer p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

footer p:last-child {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Legacy whoami support */
div:has(.whoami) {
    height: calc(100% - 8rem);
}

.whoami {
    text-align: left;
}

.whoami strong {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--black);
}

.whoami span {
    line-height: normal;
}

.whoami > span:nth-child(2) {
    font-size: 1rem;
    color: var(--muted);
}

.whoami > span:nth-child(3) {
    font-size: 1rem;
    color: var(--muted-less);
    margin-bottom: 2rem;
}

/* Hide reCAPTCHA badge if needed */
.g-recaptcha {
    margin-bottom: 1rem;
}

/* Responsive Design - Tablets */
@media only screen and (max-width: 1200px) {
    .wrapper {
        grid-template-columns: 1fr;
    }

    .wrapper > div {
        padding: 4rem 4rem;
        min-height: auto;
    }

    .wrapper > div:nth-child(1) {
        min-height: 500px;
    }

    .wrapper > div:nth-child(1)::before {
        min-height: 100%;
    }

    h1 {
        font-size: 2.2rem;
    }

    h1 span {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Responsive Design - Mobile */
@media only screen and (max-width: 800px) {
    .wrapper > div,
    .error__wrapper > div {
        padding: 3rem 2rem;
    }

    .wrapper > div:nth-child(1) {
        min-height: 400px;
    }

    .wrapper > div:nth-child(1) div:first-child {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h1 span {
        font-size: 1.1rem;
        margin-top: 10px;
    }

    h2 {
        font-size: 1.4rem;
        margin-bottom: 18px;
    }

    h3 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    section {
        margin-bottom: 30px;
    }

    label {
        font-size: 0.95rem;
    }

    input,
    textarea {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .input__wrapper input {
        padding-right: 65px;
    }

    .currency {
        padding: 0 14px;
        font-size: 0.875rem;
    }

    button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .form__group {
        margin-bottom: 1.5rem;
    }

    textarea {
        height: 120px;
    }

    footer {
        margin-top: 40px;
        padding: 25px 15px;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* Responsive Design - Small Mobile */
@media only screen and (max-width: 480px) {
    .wrapper > div,
    .error__wrapper > div {
        padding: 2rem 1.5rem;
    }

    .wrapper > div:nth-child(1) div:first-child {
        padding: 10px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    h1 span {
        font-size: 1rem;
        margin-top: 8px;
    }

    h2 {
        font-size: 1.25rem;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    h4 {
        font-size: 0.95rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    section {
        margin-bottom: 25px;
    }

    ul li {
        margin: 10px 0;
        font-size: 0.92rem;
    }

    .form__group {
        margin-bottom: 1.25rem;
    }

    input,
    textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    button {
        font-size: 0.95rem;
        padding: 11px 18px;
    }

    .error__wrapper > div {
        min-height: 350px;
    }

    footer {
        margin-top: 30px;
        padding: 20px 10px;
    }

    footer p {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
}

/* Extra small screens */
@media only screen and (max-width: 320px) {
    .wrapper > div,
    .error__wrapper > div {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    h1 span {
        font-size: 0.95rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    h3 {
        font-size: 1rem;
    }

    .error__wrapper > div {
        min-height: 400px;
    }

    .input__wrapper input {
        padding-right: 60px;
    }

    .currency {
        padding: 0 10px;
        font-size: 0.8rem;
    }

    footer {
        padding: 15px 8px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .wrapper {
        grid-template-columns: 1fr;
    }

    button {
        display: none;
    }

    .g-recaptcha {
        display: none;
    }

    footer {
        page-break-before: avoid;
    }
}