/* ============================================================
   Lane Guide - Main Stylesheet
   ============================================================ */

/* Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:   #1a4f8a;
    --color-primary-d: #13396a;
    --color-accent:    #e8a020;
    --color-text:      #1f2937;
    --color-muted:     #6b7280;
    --color-border:    #d1d5db;
    --color-bg:        #f9fafb;
    --color-white:     #ffffff;
    --color-success:   #15803d;
    --color-success-bg:#dcfce7;
    --color-error:     #b91c1c;
    --color-error-bg:  #fee2e2;
    --radius:          6px;
    --shadow:          0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:       0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout
   ---------------------------------------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.main-content { flex: 1; padding: 2.5rem 0; }

/* Header
   ---------------------------------------------------------- */
.site-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: .875rem 0;
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo { display: flex; align-items: baseline; gap: 0; text-decoration: none; }
.logo-lg { font-size: 1.6rem; font-weight: 800; color: var(--color-white); letter-spacing: -1px; }
.logo-sm { font-size: 1.6rem; font-weight: 300; color: var(--color-accent); letter-spacing: -1px; }

.main-nav { display: flex; align-items: center; gap: .75rem; }
.nav-user  { color: rgba(255,255,255,.8); font-size: .9rem; margin-right: .5rem; }

/* Footer
   ---------------------------------------------------------- */
.site-footer {
    background: var(--color-primary-d);
    color: rgba(255,255,255,.7);
    padding: 1.25rem 0;
    font-size: .875rem;
}

.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { color: rgba(255,255,255,.7); }
.footer-nav a:hover { color: var(--color-white); text-decoration: none; }

/* Buttons
   ---------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: .5rem 1.1rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #1a1a1a;
    border-color: var(--color-accent);
}
.btn-primary:hover { background: #d4911a; border-color: #d4911a; text-decoration: none; }

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { border-color: var(--color-white); text-decoration: none; }

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.7);
    border-color: transparent;
}
.btn-ghost:hover { color: var(--color-white); text-decoration: none; }

.btn-lg  { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; display: block; }

/* Alerts
   ---------------------------------------------------------- */
.alert {
    padding: .875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .95rem;
}

.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #86efac; }
.alert-error   { background: var(--color-error-bg);   color: var(--color-error);   border: 1px solid #fca5a5; }

/* Forms
   ---------------------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: .35rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label { font-size: .9rem; font-weight: 600; color: var(--color-text); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: .6rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color .15s, box-shadow .15s;
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 79, 138, .15);
}

.req { color: var(--color-error); }

.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .25rem;
}

.forgot-link { font-size: .875rem; color: var(--color-muted); }

.terms-note { font-size: .8rem; color: var(--color-muted); text-align: center; margin-top: .75rem; }

/* Auth Section
   ---------------------------------------------------------- */
.auth-section {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-card--wide { max-width: 680px; }

.auth-card h1 { font-size: 1.5rem; color: var(--color-primary); }

.auth-sub  { font-size: .9rem; color: var(--color-muted); }
.auth-back { font-size: .875rem; text-align: center; }

/* Hero Section
   ---------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-d) 100%);
    border-radius: var(--radius);
    color: var(--color-white);
    margin-bottom: 3rem;
}

.hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto 2rem; }

.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* Features Grid
   ---------------------------------------------------------- */
.features { margin-bottom: 3rem; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.feature-card h3 { color: var(--color-primary); margin-bottom: .5rem; font-size: 1.05rem; }
.feature-card p  { color: var(--color-muted); font-size: .9rem; }

/* CTA Banner
   ---------------------------------------------------------- */
.cta-banner {
    text-align: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}

.cta-banner h2 { font-size: 1.5rem; color: var(--color-primary); margin-bottom: .75rem; }
.cta-banner p  { color: var(--color-muted); margin-bottom: 1.5rem; }

/* Error Page
   ---------------------------------------------------------- */
.error-page {
    text-align: center;
    padding: 5rem 1rem;
}
.error-page h1 { font-size: 2rem; color: var(--color-primary); margin-bottom: 1rem; }
.error-page p  { color: var(--color-muted); margin-bottom: 2rem; }

/* Responsive
   ---------------------------------------------------------- */
@media (max-width: 640px) {
    .hero h1  { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .site-header .container { flex-wrap: wrap; }
    .main-nav { flex-wrap: wrap; }
}
