/*
 * Taylor-Smartt L.L.C. Corporate Website Styles (Texas Heritage Rebuild)
 * Design per professional reconstruction plan
 */

/* ========================================================================== */
/* 1. CSS Variable System (Color, Typography, Spacing) */
/* ========================================================================== */
:root {
    /* Brand Palette */
    --primary: #1C2B39;         /* Texas deep blue */
    --primary-strong: #0F1E2D;  /* Darker shade for headers */
    --primary-light: #2D4A5E;   /* Muted navy for bands */
    --texas-tan: #92400E;       /* Desert brown */
    --gold: #D97706;            /* Western gold */
    --energy: #EA580C;          /* Energy orange */
    --surface: #FDFCFA;         /* Paper-like background */
    --surface-alt: #F5F0E8;     /* Alternate band */
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: rgba(15, 31, 45, 0.12);

    /* Typography */
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Lora', 'Times New Roman', serif;
    --font-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --text: #1E293B;
    --text-muted: #4B5563;

    /* Spacing */
    --space-2xs: 0.25rem; /* 4px */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 0.75rem;  /* 12px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 2rem;     /* 32px */
    --space-2xl: 3rem;    /* 48px */
    --space-3xl: 4rem;    /* 64px */

    /* Radius & Shadows */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 38px rgba(0, 0, 0, 0.12);

    /* Layout */
    --container: 1180px;
    --header-height: 78px;
    --transition: 200ms ease;
}

/* ========================================================================== */
/* 2. Base Reset & Typography */
/* ========================================================================== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
}

img { max-width: 100%; display: block; border-radius: var(--radius-md); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-strong);
    line-height: 1.25;
    margin: 0 0 var(--space-sm) 0;
}

p { margin: 0 0 var(--space-md) 0; color: var(--text); }
small { color: var(--text-muted); }

/* ========================================================================== */
/* 3. Layout Helpers */
/* ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}
.section.tight { padding: var(--space-2xl) 0; }
.section.alt { background: var(--surface-alt); }
.section.dark { background: var(--primary-strong); color: var(--white); }

.section-header {
    max-width: 760px;
    margin: 0 auto var(--space-2xl);
    text-align: center;
}
.section-header p { color: var(--text-muted); }

.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.flex {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .section { padding: var(--space-2xl) 0; }
}

/* ========================================================================== */
/* 4. Header & Navigation */
/* ========================================================================== */
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: var(--primary);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
}
.skip-link:focus { left: var(--space-md); top: var(--space-md); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.top-bar {
    background: var(--primary-strong);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 0.9rem;
}
.top-bar__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-xs) 0;
}
.top-bar .top-links { display: flex; gap: var(--space-md); }
.top-bar a { color: var(--white); font-weight: 600; }

.nav-shell {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--white);
}

.nav-container {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-md);
    height: var(--header-height);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--primary-strong);
    font-family: var(--font-heading);
}
.brand-mark {
    background: var(--primary-strong);
    color: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
}
.brand-title { display: block; font-size: 1.1rem; }
.brand-subtitle {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-toggle { display: none; }
.nav-toggle-label {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.nav-toggle-label span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-strong);
}

.main-nav { justify-self: end; }
.nav-list {
    list-style: none;
    display: flex;
    gap: var(--space-md);
    margin: 0;
    padding: 0;
}

.nav-item { position: relative; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: var(--space-sm) var(--space-xs);
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--primary-strong);
}
.nav-link .eyebrow { font-size: 0.85rem; }

.sub-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) 0;
    list-style: none;
    min-width: 220px;
    z-index: 10;
}

.nav-item:hover > .sub-menu,
.nav-item:focus-within > .sub-menu { display: block; }

.sub-menu li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text);
    font-family: var(--font-ui);
    font-weight: 600;
}
.sub-menu li a:hover { background: var(--surface-alt); color: var(--primary-strong); }

@media (max-width: 980px) {
    .nav-container { grid-template-columns: 1fr auto; }
    .main-nav { display: none; grid-column: 1 / -1; width: 100%; }
    .nav-toggle-label { display: inline-flex; justify-self: end; }
    .nav-list { flex-direction: column; align-items: flex-start; }
    .nav-item { width: 100%; }
    .nav-link { width: 100%; padding: var(--space-sm) 0; }
    .sub-menu { position: relative; box-shadow: none; padding-left: var(--space-md); }
    .nav-toggle:checked ~ .main-nav { display: block; padding-bottom: var(--space-sm); }
}

/* ========================================================================== */
/* 5. Buttons & Tags */
/* ========================================================================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--primary-strong);
    color: var(--white);
}
.button:hover { background: var(--gold); border-color: var(--gold); }

.button.secondary {
    background: transparent;
    color: var(--primary-strong);
    border-color: var(--primary-strong);
}
.button.secondary:hover { background: var(--primary-strong); color: var(--white); }

.button.text { background: transparent; color: var(--primary-strong); border: none; padding: 0; text-transform: none; letter-spacing: 0; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: var(--space-2xs) var(--space-sm);
    border-radius: 999px;
    background: rgba(146, 64, 14, 0.1);
    color: var(--texas-tan);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ========================================================================== */
/* 6. Hero */
/* ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--primary-strong);
    color: var(--white);
    padding: calc(var(--space-3xl) + var(--header-height)) 0 var(--space-3xl);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image, none);
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28,43,57,0.9) 0%, rgba(28,43,57,0.6) 60%, rgba(28,43,57,0.3) 100%);
    z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; gap: var(--space-xl); align-items: center; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.hero h1 { color: var(--white); font-size: clamp(2rem, 3vw, 3rem); margin-bottom: var(--space-md); }
.hero p { color: rgba(255,255,255,0.92); font-size: 1.05rem; }
.hero .eyebrow { color: var(--gold); font-family: var(--font-ui); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; }
.hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-lg); }
.hero-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    backdrop-filter: blur(4px);
}

/* ========================================================================== */
/* 7. Cards & Feature Blocks */
/* ========================================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    border-top: 5px solid var(--texas-tan);
}
.card h3 { margin-top: 0; }
.card p { color: var(--text-muted); }
.card img { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

.card.inline { display: grid; gap: var(--space-md); grid-template-columns: 140px 1fr; align-items: center; }

.feature {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.feature .eyebrow { font-family: var(--font-ui); color: var(--texas-tan); font-weight: 700; }

.highlight {
    background: var(--primary-light);
    color: var(--white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.highlight h3, .highlight h2 { color: var(--white); }

/* ========================================================================== */
/* 8. Data & Lists */
/* ========================================================================== */
.stats {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 2rem; color: var(--primary-strong); }
.stat span { color: var(--text-muted); font-family: var(--font-ui); font-weight: 600; }

.list-check {
    list-style: none;
    padding: 0;
    margin: 0;
}
.list-check li {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}
.list-check li::before {
    content: "\2713";
    color: var(--energy);
    font-weight: 700;
}

.value-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.value-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.value-card img { margin: 0 auto var(--space-md); width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.value-card p { color: var(--text-muted); }

.timeline { border-left: 3px solid var(--texas-tan); margin-left: var(--space-md); padding-left: var(--space-lg); display: grid; gap: var(--space-xl); }
.timeline .year { font-family: var(--font-ui); font-weight: 800; color: var(--texas-tan); }
.timeline h3 { margin: var(--space-xs) 0; }

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-md);
}
.table th, .table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.table th { background: var(--surface-alt); font-family: var(--font-ui); font-weight: 700; }

/* ========================================================================== */
/* 9. Media, News, Gallery */
/* ========================================================================== */
.media-grid { display: grid; gap: var(--space-xl); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.media-card { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--white); display: flex; flex-direction: column; }
.media-card img { border-radius: 0; }
.media-card .body { padding: var(--space-lg); flex: 1; }
.media-card .meta { font-family: var(--font-ui); color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--space-sm); }

.gallery { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ========================================================================== */
/* 10. Forms & Contact */
/* ========================================================================== */
.form-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
input, select, textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 1rem;
    background: var(--white);
}
textarea { min-height: 160px; resize: vertical; }
label { font-family: var(--font-ui); font-weight: 700; color: var(--primary-strong); display: block; margin-bottom: var(--space-2xs); }

.contact-card { padding: var(--space-lg); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.contact-card h3 { margin-top: 0; }

/* ========================================================================== */
/* 11. Footer */
/* ========================================================================== */
.site-footer {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-2xl);
    margin-top: var(--space-3xl);
}
.footer-grid { display: grid; gap: var(--space-xl); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.footer-grid h4 { color: var(--white); font-family: var(--font-ui); }
.footer-grid p, .footer-grid a { color: rgba(255,255,255,0.9); }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    text-align: center;
    font-family: var(--font-ui);
    color: rgba(255,255,255,0.8);
}
.footer-bottom a {
    color: var(--white);
    font-weight: 600;
}
.footer-bottom a:hover { color: var(--gold); }

/* ========================================================================== */
/* 12. Utility */
/* ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--text-muted); }
.kicker { font-family: var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--texas-tan); font-weight: 800; margin-bottom: var(--space-xs); }
.badge { display: inline-block; padding: var(--space-2xs) var(--space-sm); background: rgba(233, 165, 104, 0.18); color: var(--texas-tan); border-radius: 999px; font-family: var(--font-ui); font-weight: 700; }
hr { border: none; border-top: 1px solid var(--border); margin: var(--space-xl) 0; }

.bg-primary { background: var(--primary-strong); color: var(--white); }
.bg-light { background: var(--surface-alt); }

blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 4px solid var(--gold);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    font-style: italic;
}

.table-wrap { overflow-x: auto; }

/* -------------------------------------------------------------------------- */
/* 13. Legacy Class Support (for remaining static sections) */
/* -------------------------------------------------------------------------- */
.section-padding { padding: var(--space-3xl) 0; }
.bg-background-light { background: var(--surface-alt); }
.bg-dark { background: var(--primary-strong); color: var(--white); }
.page-header {
    padding: calc(var(--space-2xl) + var(--header-height)) 0 var(--space-2xl);
    background: var(--primary-light);
    color: var(--white);
    text-align: center;
}
.page-header h1 { color: var(--white); }
.page-header p { color: rgba(255, 255, 255, 0.9); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--primary-strong);
    color: var(--white);
}
.btn-primary { background: var(--primary-strong); color: var(--white); border-color: var(--primary-strong); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

@media (max-width: 640px) {
    .hero { padding: calc(var(--space-2xl) + var(--header-height)) 0 var(--space-2xl); }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .card.inline { grid-template-columns: 1fr; }
}
