/* Smith & Porter - Main Stylesheet
   Brand System: Smith Brand Book
   Colors: Charcoal #2D2D2D, Porter Cream #E8DFD0, Aged Brass #9A7B4F
   Typography: Libre Baskerville (serif), Inter (sans-serif)
*/

/* ================================
   CSS Custom Properties
   ================================ */
:root {
    /* Brand Colors */
    --charcoal: #2D2D2D;
    --brass: #9A7B4F;
    --porter-cream: #E8DFD0;
    --off-white: #FDFBF7;
    --warm-gray: #E8E4DD;
    --light-gray: #F5F3EF;

    /* Typography */
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Container */
    --container-max: 1200px;
    --container-narrow: 800px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: var(--space-md);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-bottom: var(--space-sm);
}

h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

p {
    margin-bottom: var(--space-sm);
}

.label {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass);
}

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

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-2xl) 0;
}

.section--alt {
    background: white;
}

.section--dark {
    background: var(--charcoal);
    color: var(--off-white);
}

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

.grid--2 {
    grid-template-columns: 1fr;
}

.grid--3 {
    grid-template-columns: 1fr;
}

.grid--4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ================================
   Header
   ================================ */
.header {
    background: white;
    border-bottom: 1px solid var(--warm-gray);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    max-width: var(--container-max);
    margin: 0 auto;
}

.header__logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
    text-decoration: none;
}

.header__logo .ampersand {
    color: var(--porter-cream);
    font-style: italic;
}

.header__nav {
    display: none;
}

.header__nav-list {
    display: flex;
    gap: var(--space-md);
}

.header__nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    transition: color var(--transition-fast);
}

.header__nav-link:hover,
.header__nav-link--active {
    color: var(--brass);
}

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

.header__phone {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
}

.header__phone:hover {
    color: var(--brass);
}

/* Mobile menu toggle */
.header__menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.header__menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    transition: var(--transition-fast);
}

@media (min-width: 992px) {
    .header__nav {
        display: block;
    }

    .header__phone {
        display: block;
    }

    .header__menu-toggle {
        display: none;
    }
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 200;
    padding: var(--space-xl);
    overflow-y: auto;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.mobile-nav__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
}

.mobile-nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-nav__link {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--warm-gray);
}

.mobile-nav__phone {
    display: block;
    margin-top: var(--space-xl);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brass);
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.btn--primary {
    background: var(--charcoal);
    color: white;
    border-color: var(--charcoal);
}

.btn--primary:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.btn--secondary {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}

.btn--secondary:hover {
    background: var(--charcoal);
    color: white;
}

.btn--light {
    background: white;
    color: var(--charcoal);
    border-color: white;
}

.btn--light:hover {
    background: var(--off-white);
    border-color: var(--off-white);
}

.btn--ghost {
    background: transparent;
    color: white;
    border-color: white;
}

.btn--ghost:hover {
    background: white;
    color: var(--charcoal);
}

.btn--small {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
}

.btn--portal {
    background: var(--light-gray);
    color: var(--charcoal);
    border-color: var(--warm-gray);
    font-size: 0.8125rem;
    padding: 0.625rem 1rem;
}

.btn--portal:hover {
    background: var(--warm-gray);
}

/* ================================
   Hero Sections
   ================================ */
.hero {
    padding: var(--space-2xl) 0;
    text-align: center;
}

.hero--large {
    padding: var(--space-3xl) 0;
}

.hero--dark {
    background: var(--charcoal);
    color: var(--off-white);
}

.hero--dark .hero__subtitle {
    color: var(--warm-gray);
}

.hero__title {
    max-width: 700px;
    margin: 0 auto var(--space-md);
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: #666;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

@media (min-width: 480px) {
    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ================================
   Trust Bar
   ================================ */
.trust-bar {
    background: white;
    border-bottom: 1px solid var(--warm-gray);
    padding: var(--space-md) 0;
}

.trust-bar__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-lg);
    font-size: 0.8125rem;
    color: #666;
}

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

.trust-bar__divider {
    display: none;
}

@media (min-width: 768px) {
    .trust-bar__divider {
        display: block;
        color: var(--warm-gray);
    }
}

/* ================================
   Cards
   ================================ */
.card {
    background: white;
    border: 1px solid var(--warm-gray);
    padding: var(--space-lg);
}

.card--centered {
    text-align: center;
}

.card__icon {
    width: 56px;
    height: 56px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 1.25rem;
}

.card__icon--cream {
    background: var(--porter-cream);
}

.card__title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.card__text {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

.card__link {
    display: inline-block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal);
    border-bottom: 1px solid var(--brass);
}

.card__link:hover {
    color: var(--brass);
}

/* ================================
   Section Headers
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header__title {
    margin-bottom: var(--space-sm);
}

.section-header__subtitle {
    font-size: 1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   Two-Column Layout
   ================================ */
.two-col {
    display: grid;
    gap: 0;
    min-height: 400px;
}

.two-col--reverse .two-col__image {
    order: -1;
}

@media (min-width: 768px) {
    .two-col {
        grid-template-columns: 1fr 1fr;
    }

    .two-col--reverse .two-col__image {
        order: 1;
    }
}

.two-col__content {
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.two-col__image {
    background: var(--light-gray);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

/* ================================
   Image Placeholders
   ================================ */
.image-placeholder {
    background: var(--light-gray);
    border: 2px dashed var(--warm-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-lg);
    color: #888;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.image-placeholder--dark {
    background: #444;
    border-color: #555;
    color: #aaa;
}

/* ================================
   CTA Bar
   ================================ */
.cta-bar {
    background: var(--charcoal);
    color: white;
    padding: var(--space-xl) 0;
    text-align: center;
}

.cta-bar__title {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: var(--space-xs);
}

.cta-bar__text {
    color: var(--warm-gray);
    margin-bottom: var(--space-md);
}

.cta-bar__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

@media (min-width: 480px) {
    .cta-bar__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--charcoal);
    color: var(--warm-gray);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer__heading {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass);
    margin-bottom: var(--space-sm);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer__link {
    font-size: 0.875rem;
    color: var(--warm-gray);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: white;
}

.footer__bottom {
    border-top: 1px solid #444;
    padding-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer__legal {
    display: flex;
    gap: var(--space-md);
}

.footer__legal a {
    color: var(--warm-gray);
}

.footer__legal a:hover {
    color: white;
}

/* ================================
   Forms
   ================================ */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

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

@media (min-width: 480px) {
    .form__row--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--warm-gray);
    background: white;
    font-size: 1rem;
    color: var(--charcoal);
    transition: border-color var(--transition-fast);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--brass);
}

.form__textarea {
    min-height: 120px;
    resize: vertical;
}

.form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232D2D2D' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ================================
   Process Steps
   ================================ */
.steps {
    display: grid;
    gap: var(--space-lg);
    position: relative;
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
    }

    .steps::before {
        content: '';
        position: absolute;
        top: 28px;
        left: 12.5%;
        right: 12.5%;
        height: 2px;
        background: var(--warm-gray);
    }
}

.step {
    text-align: center;
    position: relative;
}

.step__number {
    width: 56px;
    height: 56px;
    background: white;
    border: 2px solid var(--charcoal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto var(--space-md);
    position: relative;
    z-index: 1;
}

.step__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.step__text {
    font-size: 0.8125rem;
    color: #666;
    margin-bottom: 0;
}

/* ================================
   Benefits List
   ================================ */
.benefits {
    display: grid;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .benefits {
        grid-template-columns: repeat(2, 1fr);
    }
}

.benefit {
    display: flex;
    gap: var(--space-md);
}

.benefit__icon {
    width: 48px;
    height: 48px;
    background: var(--porter-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.benefit__text {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0;
}

/* ================================
   Job Cards
   ================================ */
.job-card {
    background: white;
    border: 1px solid var(--warm-gray);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

@media (min-width: 480px) {
    .job-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.job-card__title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.job-card__meta {
    font-size: 0.8125rem;
    color: #666;
}

/* ================================
   Contact Info
   ================================ */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

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

.contact-item__icon {
    width: 48px;
    height: 48px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.contact-item__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass);
    margin-bottom: 0.25rem;
}

.contact-item__value {
    font-size: 1rem;
    margin-bottom: 0;
}

.contact-item__note {
    font-size: 0.8125rem;
    color: #666;
}

/* ================================
   App Preview
   ================================ */
.app-preview {
    background: var(--charcoal);
    padding: var(--space-xl) var(--space-md);
}

.app-preview__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    max-width: var(--container-max);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .app-preview__inner {
        flex-direction: row;
        justify-content: center;
    }
}

.app-preview__phone {
    width: 220px;
    background: white;
    border-radius: 32px;
    border: 10px solid #333;
    overflow: hidden;
    flex-shrink: 0;
}

.app-preview__notch {
    height: 28px;
    background: #333;
    border-radius: 0 0 16px 16px;
    width: 120px;
    margin: 0 auto;
}

.app-preview__screen {
    padding: var(--space-md);
    min-height: 350px;
    background: var(--off-white);
}

.app-preview__content {
    color: white;
    max-width: 400px;
}

.app-preview__title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
}

.app-preview__text {
    color: var(--warm-gray);
    margin-bottom: var(--space-lg);
}

/* ================================
   Testimonial
   ================================ */
.testimonial {
    background: white;
    border-left: 3px solid var(--brass);
    padding: var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
}

.testimonial__quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.testimonial__cite {
    font-size: 0.875rem;
    color: #666;
    font-style: normal;
}

/* ================================
   Service Area
   ================================ */
.service-area {
    text-align: center;
}

.service-area__counties {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.service-area__county {
    text-align: center;
}

.service-area__name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-area__note {
    font-size: 0.8125rem;
    color: #666;
}

/* ================================
   Partner Callout
   ================================ */
.partner-callout {
    background: var(--light-gray);
    border-left: 3px solid var(--brass);
    padding: var(--space-md);
    margin-top: var(--space-lg);
}

.partner-callout__title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass);
    margin-bottom: var(--space-xs);
}

.partner-callout__text {
    font-size: 0.9375rem;
    margin-bottom: var(--space-sm);
}

/* ================================
   Service List
   ================================ */
.service-list {
    padding-left: var(--space-md);
}

.service-list li {
    position: relative;
    padding-left: var(--space-md);
    margin-bottom: var(--space-xs);
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--brass);
    border-radius: 50%;
}

/* ================================
   Utilities
   ================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================
   Accessibility
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--charcoal);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
}
