/* ==========================================
   TOOLUCS TERMS & CONDITIONS - STYLES
   Supports: Mobile (320px+), Tablet, Laptop, Desktop, 4K
   Matches Index Header & Footer Exactly
   ========================================== */

/* --- CSS RESET & ROOT TOKENS --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #000000;
    --card-bg-dark: #0a0a0a;
    --card-border-dark: rgba(255, 255, 255, 0.08);
    --text-primary-dark: #ffffff;
    --text-secondary-dark: #a1a1aa;
    --text-muted-dark: #71717a;
    --accent-dark: #ffffff;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --container-max-width: 1200px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Geologica', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

p,
span,
.subtitle,
.description,
ul,
li {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================
   TOP NAVIGATION BAR (MATCHES INDEX)
   ========================================== */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    padding: clamp(18px, 3vw, 28px) clamp(20px, 4vw, 80px);
    width: 100%;
}

.logo {
    display: block;
    background: url("../images/logo.png") no-repeat left center;
    background-size: contain;
    width: clamp(130px, 16vw, 180px);
    height: clamp(38px, 5vw, 56px);
    transition: var(--transition-smooth);
}

.logo:hover {
    opacity: 0.85;
}

/* ==========================================
   PAGE HERO HEADER SECTION
   ========================================== */
.page-hero {
    position: relative;
    width: 100%;
    min-height: 280px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, rgba(0, 0, 0, 0) 70%), #000000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: clamp(100px, 15vh, 140px) 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero h1 {
    color: #ffffff;
    font-family: 'Geologica', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1.2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.page-hero-meta {
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ==========================================
   LEGAL DOCUMENT CONTENT SECTION
   ========================================== */
.legal-container {
    width: min(900px, 92%);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 70px) 0 clamp(60px, 8vw, 100px);
}

.legal-intro-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #38bdf8;
    border-radius: var(--radius-md);
    padding: clamp(20px, 3vw, 28px);
    margin-bottom: clamp(32px, 5vw, 48px);
    font-size: clamp(0.98rem, 1.15vw, 1.1rem);
    line-height: 1.7;
    color: #e4e4e7;
}

.legal-section {
    margin-bottom: clamp(28px, 4vw, 40px);
    background: var(--card-bg-dark);
    border: 1px solid var(--card-border-dark);
    border-radius: var(--radius-md);
    padding: clamp(22px, 3.5vw, 32px);
    transition: var(--transition-smooth);
}

.legal-section:hover {
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.legal-section h2 {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section p {
    color: #a1a1aa;
    font-size: clamp(0.95rem, 1.05vw, 1.05rem);
    line-height: 1.72;
    margin-bottom: 12px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

.legal-section ul li {
    color: #a1a1aa;
    font-size: clamp(0.95rem, 1.05vw, 1.05rem);
    line-height: 1.68;
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
}

.legal-section ul li::before {
    content: "•";
    color: #38bdf8;
    font-weight: bold;
    font-size: 1.4rem;
    position: absolute;
    left: 4px;
    top: -2px;
}

/* ==========================================
   FOOTER (MATCHES INDEX EXACTLY)
   ========================================== */
.footer {
    position: relative;
    background-color: #050505;
    background-image: url("../images/Footer.png");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    min-height: clamp(480px, 45vw, 680px);
    padding: clamp(60px, 7vw, 100px) 0 clamp(40px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.37) 0%, rgba(0, 0, 0, 0.589) 100%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 2;
    width: min(var(--container-max-width), 90%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    background: url("../images/logo.png") no-repeat center;
    background-size: contain;
    width: clamp(200px, 25vw, 280px);
    height: clamp(50px, 7vw, 75px);
    margin-bottom: clamp(20px, 3vw, 30px);
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(12px, 2.5vw, 30px);
    margin-bottom: clamp(30px, 5vw, 50px);
}

.footer-nav a {
    color: #ffffff;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    transition: var(--transition-smooth);
    padding: 6px 10px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
    font-weight: 500;
}

.footer-nav a:hover {
    color: #38bdf8;
    opacity: 1;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.footer-tagline {
    color: #ffffff;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

.footer-love {
    color: #cbd5e1;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    margin-bottom: clamp(24px, 4vw, 36px);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

.footer-copyright {
    color: #94a3b8;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}

/* ==========================================
   CONTACT MODAL & FORM (MATCHES INDEX)
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-content {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg, 16px);
    padding: clamp(24px, 5vw, 36px);
    width: min(100%, 560px);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    color: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    background: transparent;
    border: none;
    transition: var(--transition-smooth, all 0.2s ease);
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    letter-spacing: -0.02em;
}

.modal-content p {
    font-size: clamp(0.88rem, 1.1vw, 0.95rem);
    color: #999;
    margin-bottom: 0;
    line-height: 1.5;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b0b0b0;
    letter-spacing: 0.01em;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-input,
.form-textarea {
    width: 100%;
    background: #000;
    border: 1px solid #2a2a2a;
    border-radius: var(--radius-sm, 8px);
    padding: 12px 14px;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    transition: var(--transition-smooth, all 0.2s ease);
    box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #555;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #050505;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

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

.field-error {
    font-size: 0.78rem;
    color: #f87171;
    display: none;
    line-height: 1.3;
}

.submit-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-sm, 8px);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    font-family: 'Geologica', sans-serif;
    transition: var(--transition-smooth, all 0.2s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    min-height: 48px;
}

.submit-btn:hover:not(:disabled) {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

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

/* ==========================================
   TOAST NOTIFICATION SYSTEM
   ========================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 36px);
}

.toast {
    pointer-events: auto;
    background: rgba(18, 18, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

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

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(110%) scale(0.92);
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon-svg {
    width: 22px;
    height: 22px;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: #fff;
    font-family: 'Geologica', sans-serif;
}

.toast-message {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: var(--transition-smooth, all 0.2s ease);
    margin-left: -4px;
    margin-top: -2px;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress {
    background: #10b981;
}

.toast-error .toast-progress {
    background: #ef4444;
}

.toast-warning .toast-progress {
    background: #f59e0b;
}

.toast-info .toast-progress {
    background: #3b82f6;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ==========================================
   BREAKPOINTS & RESPONSIVE BEHAVIOR
   ========================================== */
@media (min-width: 901px) {
    .footer {
        min-height: 560px;
        padding: 70px 0 55px;
        background-size: auto 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }

    .footer-content {
        width: min(1200px, 90%);
        margin: 0 auto;
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        width: 240px;
        height: 64px;
        margin-bottom: 28px;
    }

    .footer-nav {
        gap: 28px;
        margin-bottom: 42px;
    }

    .footer-nav a {
        font-size: 1rem;
        padding: 6px 10px;
    }

    .footer-tagline {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }

    .footer-love {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .footer-copyright {
        font-size: 0.9rem;
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .footer {
        min-height: 440px;
        padding: 50px 20px 40px;
    }
}

@media (max-width: 767px) {
    .top-nav {
        padding: 16px 20px;
    }

    .footer {
        background-image: url("../images/footer-mobile.png") !important;
        background-repeat: no-repeat !important;
        background-position: center bottom !important;
        background-size: contain !important;
        min-height: 520px !important;
        padding: 50px 18px 36px !important;
    }

    .footer-overlay {
        background: rgba(0, 0, 0, 0.637) !important;
    }

    .footer-logo {
        width: 170px !important;
        height: 42px !important;
        margin-bottom: 16px !important;
    }

    .footer-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 16px !important;
        margin-bottom: 20px !important;
    }

    .footer-nav a {
        font-size: 0.92rem !important;
        padding: 4px 6px !important;
    }

    .footer-tagline {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
    }

    .footer-love {
        font-size: 0.88rem !important;
        margin-bottom: 20px !important;
    }

    .footer-copyright {
        font-size: 0.82rem !important;
    }
}

@media (max-width: 580px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}


