/* ==========================================================================
   css/styles.css
   Global styles for SecureEscrow / Paytrust website
   ========================================================================== */

/* ==========================================================================
   1. CSS Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1e293b;              /* slate-900 */
    background-color: #f8fafc;    /* slate-50 */
    min-height: 100vh;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: #0f172a;               /* slate-950 */
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    font-size: 1.05rem;
    color: #475569;               /* slate-600 */
}

small, .small {
    font-size: 0.875rem;
    color: #64748b;               /* slate-500 */
}

/* ==========================================================================
   3. Links & Buttons
   ========================================================================== */
a {
    color: #6366f1;               /* indigo-500 */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #4f46e5;               /* indigo-600 */
}

.btn,
button {
    font-family: inherit;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: #10b981;          /* emerald-500 */
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 2px solid #6366f1;
    color: #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

/* ==========================================================================
   4. Layout & Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

/* ==========================================================================
   5. Cards & Forms
   ========================================================================== */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
}

form {
    display: grid;
    gap: 1.25rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;    /* slate-300 */
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #334155;               /* slate-700 */
}

/* ==========================================================================
   6. Status Badges
   ========================================================================== */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-pending  { background: #fef3c7; color: #92400e; } /* amber */
.status-held     { background: #dbeafe; color: #1e40af; } /* blue */
.status-completed{ background: #d1fae5; color: #065f46; } /* emerald */
.status-released { background: #ecfdf5; color: #047857; }
.status-disputed { background: #fee2e2; color: #991b1b; } /* red */

/* ==========================================================================
   7. Tables
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

/* ==========================================================================
   8. Header & Footer (basic – will be enhanced in separate files)
   ========================================================================== */
header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 4rem 0 2rem;
}

footer a {
    color: #94a3b8;
}

footer a:hover {
    color: white;
}

/* ==========================================================================
   9. Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3.5rem 0;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .btn, button {
        padding: 0.85rem 1.5rem;
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}