/* =========================
   CONTACT PAGE — teal + white, Gen Z theme
   Matches the token system introduced in about.css:
   solid teal panels, white pill CTAs, bold Space Grotesk
   headings, flat cards instead of glassmorphism, no
   secondary accent color.
========================= */

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #0a1f1c;
}

.contact-page {
    --teal: #088178;
    --teal-dark: #066a62;
    --mint: #e6f6f4;
    --ink: #0a1f1c;
    --white: #ffffff;

    font-family: 'Inter', sans-serif;
}

footer {
    background: var(--mint);
    padding: 20px;
    text-align: center;
    color: #4a615d;
    font-size: 15px;
}

.section-p1 {
    padding: 60px 8%;
}

/* =========================
   PAGE HEADER
========================= */

#page-header {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    background: var(--teal);
    border-radius: 0 0 32px 32px;
    padding: 0 8%;
}

.hero-badge {
    position: relative;
    z-index: 2;
    display: inline-block;
    background: var(--white);
    color: var(--teal-dark);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

#page-header h2 {
    position: relative;
    z-index: 2;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 15px;
}

#page-header p {
    position: relative;
    z-index: 2;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 480px;
}

.hero-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 44% 56% 62% 38% / 45% 40% 60% 55%;
    top: -100px;
    right: -80px;
    z-index: 1;
}

/* =========================
   CONTACT DETAILS
========================= */

#contact-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: -40px;
}

#contact-details .details {
    flex: 1;
    min-width: 320px;
    padding: 45px;
    border-radius: 28px;
    background: var(--white);
    border: 1px solid rgba(8, 129, 120, 0.15);
    box-shadow: 0 20px 44px rgba(8, 129, 120, 0.1);
    animation: fadeUp 0.7s ease;
}

#contact-details .details span {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--teal);
}

#contact-details .details h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 26px;
    margin: 10px 0 20px;
    color: var(--ink);
}

#contact-details .details h3 {
    margin-bottom: 15px;
    color: var(--teal-dark);
    font-weight: 600;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

#contact-details ul {
    list-style: none;
    padding: 0;
}

#contact-details li {
    margin-bottom: 12px;
    border-radius: 16px;
    background: var(--mint);
    transition: transform 0.2s ease, background 0.2s ease;
    overflow: hidden;
}

#contact-details li:hover {
    transform: translateX(8px);
    background: var(--white);
    box-shadow: 0 10px 24px rgba(8, 129, 120, 0.12);
}

#contact-details li a,
#contact-details li .static-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

#contact-details li a {
    cursor: pointer;
}

#contact-details li i {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    flex-shrink: 0;
}

/* MAP CARD */
#contact-details .map {
    flex: 1;
    min-width: 320px;
    height: 460px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(8, 129, 120, 0.15);
    box-shadow: 0 20px 44px rgba(8, 129, 120, 0.1);
    animation: fadeUp 0.7s ease 0.1s both;
}

#contact-details iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-btn {
    position: relative;
    z-index: 2;
    margin-top: 30px;
    padding: 15px 36px;
    border-radius: 999px;
    background: var(--white);
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

/* =========================
   FORM + TEAM SECTION
========================= */

#form-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin: 40px 8%;
    scroll-margin-top: 100px;
}

#form-details form {
    flex: 2;
    padding: 45px;
    border-radius: 28px;
    background: var(--white);
    border: 1px solid rgba(8, 129, 120, 0.15);
    box-shadow: 0 20px 44px rgba(8, 129, 120, 0.08);
}

#form-details form span {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--teal);
}

#form-details form h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    margin: 10px 0 20px;
    font-size: 24px;
    color: var(--ink);
}

.field-group {
    margin-bottom: 18px;
}

#form-details input,
#form-details textarea {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    background: var(--mint);
    box-shadow: inset 0 0 0 2px transparent;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

#form-details textarea {
    min-height: 160px;
    resize: none;
}

#form-details input:focus,
#form-details textarea:focus {
    background: var(--white);
    box-shadow: inset 0 0 0 2px var(--teal);
    outline: none;
}

#form-details input.has-error,
#form-details textarea.has-error {
    box-shadow: inset 0 0 0 2px #e63946 !important;
}

.field-error {
    display: block;
    min-height: 16px;
    margin-top: 6px;
    padding-left: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #e63946;
}

/* BUTTON */
#form-details button {
    position: relative;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    background: var(--teal);
    color: var(--white);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#form-details button:hover:not(:disabled) {
    background: var(--teal-dark);
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(8, 129, 120, 0.3);
}

#form-details button:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.btn-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
}

#contact-submit-btn.is-loading .btn-content {
    opacity: 0.7;
}

#contact-submit-btn.is-loading .btn-spinner {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   TEAM / PEOPLE CARD
========================= */

.people {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.person {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--mint);
    border-radius: 20px;
    padding: 22px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.person:hover {
    transform: translateY(-6px);
    background: var(--white);
    box-shadow: 0 16px 32px rgba(8, 129, 120, 0.12);
}

.person img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--teal);
    flex-shrink: 0;
}

.person p {
    font-size: 13px;
    color: #3d5350;
    line-height: 20px;
}

.person p a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 600;
}

.person p a:hover {
    text-decoration: underline;
}

.person span {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
}

/* =========================
   NEWSLETTER
========================= */

#newsletter {
    margin: 70px 8%;
    padding: 50px;
    border-radius: 28px;
    background: var(--teal);
    color: var(--white);
}

#newsletter .newstext h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--white);
}

#newsletter .newstext p {
    color: rgba(255, 255, 255, 0.85);
}

#newsletter .newstext p span {
    color: var(--white);
    font-weight: 700;
}

#newsletter .form {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.newsletter-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 220px;
}

#newsletter input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 999px;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

#newsletter input.has-error {
    outline: 2px solid var(--ink);
}

#newsletter .field-error {
    display: none;
    color: var(--white);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    margin-top: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    width: fit-content;
}

#newsletter .field-error.show {
    display: block;
}

#newsletter button {
    padding: 14px 30px;
    border-radius: 999px;
    border: none;
    background: var(--white);
    color: var(--teal-dark);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease;
}

#newsletter button:hover:not(:disabled) {
    transform: translateY(-2px);
}

#newsletter button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================
   TOASTS
========================= */

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
}

.toast {
    font-size: 14px;
    font-weight: 600;
    padding: 13px 18px;
    border-radius: 999px;
    background: var(--teal, #088178);
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    animation: toastIn 0.3s ease;
    max-width: 300px;
}

.toast.toast--error {
    background: #e63946;
}

.toast.is-leaving {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* =========================
   DARK MODE
========================= */

body.dark-mode .contact-page {
    --mint: rgba(8, 129, 120, 0.12);
    --ink: #eafaf8;
}

body.dark-mode .contact-page .details,
body.dark-mode .contact-page .map,
body.dark-mode #form-details form {
    background: #0c1a18;
    border-color: rgba(8, 129, 120, 0.3);
}

body.dark-mode #form-details input,
body.dark-mode #form-details textarea {
    background: rgba(8, 129, 120, 0.12);
    color: #eafaf8;
}

body.dark-mode .person {
    background: rgba(8, 129, 120, 0.12);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
    #contact-details,
    #form-details {
        flex-direction: column;
    }

    #page-header {
        min-height: 50vh;
        border-radius: 0 0 20px 20px;
    }

    #page-header h2 {
        font-size: 28px;
    }

    #newsletter {
        text-align: center;
        justify-content: center;
        margin: 50px 6%;
        padding: 36px 24px;
    }

    #newsletter .form {
        flex-direction: column;
        align-items: stretch;
    }

    .toast-stack {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 400px) {
    #contact-details { padding-left: 16px; padding-right: 16px; gap: 18px; }
    #contact-details .details,
    #contact-details .map { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
    #contact-details .details { padding: 24px 18px; }
    #contact-details .details h2 { font-size: 22px; overflow-wrap: anywhere; }
    #contact-details li a,
    #contact-details li .static-row { min-width: 0; padding: 14px 12px; gap: 10px; overflow-wrap: anywhere; }
    #contact-details iframe { max-width: 100%; }
    #form-details { margin-left: 16px; margin-right: 16px; gap: 18px; }
    #form-details form,
    #form-details .people { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
    #form-details form { padding: 24px 18px; }
    #form-details input,
    #form-details textarea { min-width: 0; max-width: 100%; }
    #form-details .person { min-width: 0; gap: 12px; padding: 16px; }
    #form-details .person p { min-width: 0; overflow-wrap: anywhere; }
}

/* ==========================================
   CONTACT — DARK MODE FIX
========================================== */

body.dark-mode {
    background: #0f1115;
    color: #eafaf8;
}

body.dark-mode .contact-page {
    color: #eafaf8;
}

body.dark-mode .contact-page h1,
body.dark-mode .contact-page h2,
body.dark-mode .contact-page h3,
body.dark-mode .contact-page h4,
body.dark-mode .contact-page h5,
body.dark-mode .contact-page p,
body.dark-mode .contact-page span,
body.dark-mode .contact-page li {
    color: #eafaf8;
}

body.dark-mode #contact-details .details {
    background: #1b1d22;
    color: #eafaf8;
    border-color: rgba(8,129,120,.3);
}

body.dark-mode #contact-details .details h2 {
    color: #ffffff;
}

body.dark-mode #contact-details .details h3 {
    color: #5fd6c8;
}

body.dark-mode #contact-details .details span {
    color: #5fd6c8;
}

body.dark-mode #contact-details li {
    background: rgba(8,129,120,.12);
}

body.dark-mode #contact-details li a,
body.dark-mode #contact-details li .static-row {
    color: #eafaf8;
}

body.dark-mode #contact-details li:hover {
    background: rgba(8,129,120,.2);
}

body.dark-mode #form-details form {
    background: #1b1d22;
    color: #eafaf8;
}

body.dark-mode #form-details form h2 {
    color: #ffffff;
}

body.dark-mode #form-details form span {
    color: #5fd6c8;
}

body.dark-mode #form-details input,
body.dark-mode #form-details textarea {
    background: #24262c;
    color: #ffffff;
    border-color: #444;
}

body.dark-mode #form-details input::placeholder,
body.dark-mode #form-details textarea::placeholder {
    color: #9ca3af;
}

body.dark-mode #form-details input:focus,
body.dark-mode #form-details textarea:focus {
    background: #24262c;
}

body.dark-mode .person {
    background: rgba(8,129,120,.12);
    color: #eafaf8;
}

body.dark-mode .person:hover {
    background: rgba(8,129,120,.2);
}

body.dark-mode .person p {
    color: #b7cfcb;
}

body.dark-mode .person p a {
    color: #5fd6c8;
}

body.dark-mode .person span {
    color: #ffffff;
}

body.dark-mode footer {
    background: #15181d;
    color: #b7cfcb;
}

body.dark-mode footer p,
body.dark-mode footer a,
body.dark-mode footer h4 {
    color: #eafaf8;
}

/* =========================================================
   CONTACT — DARK MODE
========================================================= */

body.dark-mode {
    background: #0f1115;
    color: #eafaf8;
}

/* Contact headings */
body.dark-mode .contact-page h1,
body.dark-mode .contact-page h2,
body.dark-mode .contact-page h3,
body.dark-mode .contact-page h4,
body.dark-mode .contact-page h5 {
    color: #ffffff;
}

/* Contact paragraphs */
body.dark-mode .contact-page p {
    color: #cbd8d6;
}

/* Contact cards */
body.dark-mode .contact-page .contact-card {
    background: #181b21;
    color: #eafaf8;
    border-color: #2c323a;
}

/* Form */
body.dark-mode .contact-page input,
body.dark-mode .contact-page textarea,
body.dark-mode .contact-page select {
    background: #20242b;
    color: #ffffff;
    border-color: #3a414b;
}

/* Placeholder */
body.dark-mode .contact-page input::placeholder,
body.dark-mode .contact-page textarea::placeholder {
    color: #8e9997;
}

/* Labels */
body.dark-mode .contact-page label {
    color: #d6e5e3;
}
