/* ====================================
   GMC Hong Kong - Custom Styles
   Professional European Design System
   ==================================== */

/* CSS Variables for Design System */
:root {
    /* Primary Colors - Deep Blue/Navy */
    --color-primary: #1e3a8a;
    --color-primary-dark: #1e40af;
    --color-primary-light: #3b82f6;

    /* Accent Colors - Gold/Amber */
    --color-accent: #d97706;
    --color-accent-dark: #b45309;
    --color-accent-light: #f59e0b;

    /* Neutral Colors */
    --color-bg-primary: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-text-primary: #1f2937;
    --color-text-secondary: #475569;
    --color-border: #e2e8f0;

    /* Typography */
    --font-base-size: 16px;
    --font-large-size: 18px;
    --line-height-base: 1.7;
    --line-height-relaxed: 1.8;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ====================================
   Base Styles
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: var(--font-base-size);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

/* Improve text rendering for mature audiences */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ====================================
   Typography
   ==================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-large-size);
    line-height: var(--line-height-relaxed);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-accent);
}

a:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ====================================
   Focus Styles (Accessibility)
   ==================================== */

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* ====================================
   Buttons
   ==================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: var(--font-large-size);
    font-weight: 600;
    text-align: center;
    border-radius: 0.375rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    min-height: 48px; /* Touch target size */
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-accent {
    background-color: var(--color-accent);
    color: #ffffff;
}

.btn-accent:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* ====================================
   Cards & Containers
   ==================================== */

.card {
    background-color: var(--color-bg-secondary);
    border-radius: 0.5rem;
    padding: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.container-section {
    padding: var(--spacing-xl) var(--spacing-md);
}

/* ====================================
   Forms
   ==================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: var(--font-base-size);
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    border-radius: 0.375rem;
    transition: var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: var(--font-base-size);
}

/* ====================================
   Utility Classes
   ==================================== */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus,
.sr-only:active {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Text utilities */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Spacing utilities */
.section-spacing {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .section-spacing {
        padding-top: calc(var(--spacing-xl) * 2);
        padding-bottom: calc(var(--spacing-xl) * 2);
    }
}

/* ====================================
   Animations
   ==================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ====================================
   Responsive Typography
   ==================================== */

@media (max-width: 640px) {
    :root {
        --font-base-size: 16px;
        --font-large-size: 17px;
    }
}

@media (min-width: 1024px) {
    :root {
        --font-base-size: 16px;
        --font-large-size: 18px;
    }
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    .no-print {
        display: none !important;
    }
}
