/* ============================================
   Bay Scribe and Pillar — Muted Bay Green / Stone / Charcoal
   ============================================ */

/* --- Design Tokens --- */
:root {
    /* Base Palette: muted bay green dominant with stone and charcoal accents */
    --bay-950: #0F1F18;
    --bay-900: #152B21;
    --bay-800: #1C3629;
    --bay-700: #264A38;
    --bay-600: #35614B;
    --bay-500: #488264;
    --stone-50: #F6F4EF;
    --stone-100: #ECE8DF;
    --stone-200: #DDD6C8;
    --stone-300: #C3BAA8;
    --stone-400: #8F8572;
    --stone-500: #6E6352;
    --charcoal-900: #1A211E;
    --charcoal-800: #232B27;
    --charcoal-700: #2D3632;
    --charcoal-600: #3A4742;
    --charcoal-500: #4A5852;
    --white: #ffffff;
    --accent: #488264;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1240px;
    --section-padding: 110px 0;
    --grid-gap: 28px;
    --gutter: 5vw;

    /* Motion */
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--charcoal-800);
    background-color: var(--stone-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Linework Texture Utility --- */
.rule {
    border: none;
    border-top: 1px solid var(--stone-200);
    margin: 0;
}
.rule--strong { border-top-color: var(--stone-300); }
.rule--space { margin-top: 40px; margin-bottom: 40px; }

/* Corner brackets for cards/sections */
.bracket {
    position: relative;
}
.bracket::before, .bracket::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--bay-600);
    border-style: solid;
    border-width: 0;
    transition: border-width var(--transition-base);
}
.bracket::before {
    top: 0; left: 0;
    border-top-width: 1px;
    border-left-width: 1px;
}
.bracket::after {
    bottom: 0; right: 0;
    border-bottom-width: 1px;
    border-right-width: 1px;
}
.bracket:hover::before, .bracket:hover::after {
    width: 22px;
    height: 22px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--bay-900);
}

h1 {
    font-size: clamp(2.6rem, 5.2vw, 4.2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}
h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    font-weight: 500;
}
h3 {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 500;
}

p {
    max-width: 66ch;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--charcoal-700);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bay-600);
    margin-bottom: 16px;
}
.section-label::after {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--bay-600);
    margin-top: 10px;
}

.section-title {
    margin-bottom: 20px;
    color: var(--bay-900);
}

.section-intro {
    font-size: 1.05rem;
    color: var(--charcoal-600);
    max-width: 72ch;
    margin-bottom: 56px;
    line-height: 1.7;
    font-weight: 300;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1.5px solid transparent;
}
.btn-primary {
    background-color: var(--bay-900);
    color: var(--white);
    border-color: var(--bay-900);
}
.btn-primary:hover {
    background-color: var(--bay-800);
    border-color: var(--bay-800);
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: transparent;
    color: var(--bay-900);
    border-color: var(--stone-300);
}
.btn-secondary:hover {
    background-color: var(--stone-100);
    border-color: var(--bay-600);
    color: var(--bay-900);
}
.btn-large {
    padding: 18px 38px;
    font-size: 0.85rem;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(246,244,239,0.92);
    border-bottom: 1px solid var(--stone-200);
    backdrop-filter: saturate(140%) blur(10px);
    transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.navbar.scrolled {
    background-color: rgba(246,244,239,0.96);
    border-bottom-color: var(--stone-300);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 18px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--bay-900);
}
.logo-pillar {
    color: var(--bay-600);
    margin-left: 2px;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 32px;
    align-items: center;
}
.nav-link {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-600);
    position: relative;
    padding: 6px 0;
    text-decoration: none;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--bay-600);
    transition: width var(--transition-base);
}
.nav-link:hover {
    color: var(--bay-900);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link:focus-visible {
    outline: 2px solid var(--bay-600);
    outline-offset: 3px;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}
.dropdown-toggle {
    cursor: default;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 10px 0;
    background: var(--stone-50);
    border: 1px solid var(--stone-200);
    box-shadow: 0 8px 24px rgba(11,18,32,0.06);
    list-style: none;
}
.nav-dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-link {
    display: block;
    padding: 8px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--charcoal-700);
    text-decoration: none;
}
.dropdown-link:hover {
    color: var(--bay-900);
    background: transparent;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-cta {
    padding: 9px 18px;
    background-color: transparent;
    color: var(--bay-900);
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1.5px solid var(--stone-300);
    text-decoration: none;
    transition: all var(--transition-base);
}
.nav-cta:hover,
.nav-cta:focus-visible {
    background-color: var(--bay-900);
    color: var(--white);
    border-color: var(--bay-900);
    outline: none;
}
.nav-cta-alt {
    background-color: transparent;
    color: var(--bay-900);
    border-color: transparent;
}
.nav-cta-alt:hover,
.nav-cta-alt:focus-visible {
    background-color: transparent;
    color: var(--bay-900);
    border-color: transparent;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--charcoal-800);
    transition: all var(--transition-base);
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }
    .nav-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--stone-50);
        flex-direction: column;
        padding: 90px 32px 40px;
        gap: 20px;
        border-left: 1px solid var(--stone-200);
        box-shadow: -8px 0 30px rgba(0,0,0,0.08);
        transition: right var(--transition-slow);
    }
    .nav-menu.active {
        right: 0;
        display: flex;
    }
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background-color: var(--bay-950);
    overflow: hidden;
}
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(0.85) contrast(1.05);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,31,24,0.35) 0%, rgba(15,31,24,0.75) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter) 90px;
    width: 100%;
}
.rule--hero {
    width: 48px;
    border-top: 1.5px solid var(--stone-300);
    margin-bottom: 28px;
}
.hero-headline {
    color: var(--white);
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 900px;
}
.hero-subheadline {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    max-width: 620px;
    margin-top: 22px;
    line-height: 1.7;
    font-weight: 300;
}
.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}
.hero .btn-primary {
    background-color: var(--white);
    color: var(--bay-900);
    border-color: var(--white);
}
.hero .btn-primary:hover {
    background-color: var(--stone-100);
    border-color: var(--stone-100);
}
.hero .btn-secondary {
    color: var(--white);
    border-color: rgba(255,255,255,0.35);
}
.hero .btn-secondary:hover {
    background-color: rgba(255,255,255,0.08);
    border-color: var(--white);
}

/* --- Philosophy Section --- */
.philosophy {
    padding: var(--section-padding) 0;
    background-color: var(--stone-50);
    background-image: linear-gradient(rgba(246,244,239,0.78), rgba(246,244,239,0.92)), url('https://YOURDOMAIN.com/wp-content/uploads/IMG_3830.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}
.philosophy::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--gutter);
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--stone-200) 20%, var(--stone-200) 80%, transparent);
    opacity: 0.6;
}
.philosophy-text p {
    margin-bottom: 18px;
    color: var(--charcoal-700);
    line-height: 1.8;
}
.philosophy-text .lead {
    font-size: 1.15rem;
    color: var(--bay-900);
    font-weight: 400;
    line-height: 1.6;
}

/* --- About Section --- */
.about {
    padding: var(--section-padding) 0;
    background-color: var(--white);
}
.about-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 64px;
    align-items: start;
    margin-top: 14px;
}
.about-bio p {
    margin-bottom: 16px;
    color: var(--charcoal-700);
    line-height: 1.8;
}
.about-bio .lead {
    font-size: 1.1rem;
    color: var(--bay-900);
    font-weight: 400;
}
.about-credentials-mini {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 6px;
}
.credential-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--stone-200);
    transition: border-color var(--transition-base);
}
.credential-item:hover {
    border-bottom-color: var(--bay-600);
}
.credential-item:last-child {
    border-bottom: none;
}
.credential-number {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--bay-600);
    min-width: 52px;
}
.credential-label {
    font-size: 0.9rem;
    color: var(--charcoal-700);
    line-height: 1.5;
    font-weight: 300;
}

/* --- Services Section --- */
.services {
    padding: var(--section-padding) 0;
    background-color: var(--stone-50);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--stone-200);
    border-top: 1px solid var(--stone-200);
    border-bottom: 1px solid var(--stone-200);
    margin-top: 14px;
}
.service-card {
    padding: 44px 36px;
    background-color: var(--stone-50);
    transition: background-color var(--transition-base);
}
.service-card:hover {
    background-color: var(--bay-wash);
}
.service-number {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--bay-600);
    margin-bottom: 18px;
    display: block;
}
.service-card h3 {
    color: var(--bay-900);
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.3;
}
.service-card p {
    color: var(--charcoal-700);
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 300;
}

/* --- Credentials / Proof Points --- */
.credentials {
    padding: var(--section-padding) 0;
    background-color: var(--white);
}
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--stone-200);
    border-top: 1px solid var(--stone-200);
    border-bottom: 1px solid var(--stone-200);
    margin-top: 14px;
}
.credential-card {
    padding: 44px 36px;
    background-color: var(--white);
    transition: background-color var(--transition-base);
}
.credential-card:hover {
    background-color: var(--stone-50);
}
.credential-icon {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--bay-600);
    margin-bottom: 18px;
    display: block;
    text-transform: uppercase;
}
.credential-card h3 {
    color: var(--bay-900);
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.3;
}
.credential-card p {
    color: var(--charcoal-700);
    font-size: 0.92rem;
    line-height: 1.7;
    font-weight: 300;
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    background-color: var(--stone-100);
    border-top: 1px solid var(--stone-200);
    text-align: center;
    position: relative;
}
.cta-section::before,
.cta-section::after {
    content: '';
    position: absolute;
    left: var(--gutter);
    width: 1px;
    height: 60px;
    background: var(--bay-600);
    opacity: 0.4;
}
.cta-section::before {
    top: -1px;
}
.cta-section::after {
    bottom: -1px;
}
.cta-content h2 {
    color: var(--bay-900);
    margin-bottom: 18px;
}
.cta-content p {
    color: var(--charcoal-700);
    margin: 0 auto 32px;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 300;
}
.cta-sub {
    margin-top: 20px !important;
    font-size: 0.85rem !important;
    color: var(--stone-400) !important;
    font-style: italic;
    font-weight: 300;
}

/* --- Footer --- */
.footer {
    padding: 70px 0 30px;
    background-color: var(--bay-950);
    color: var(--white);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--gutter);
    right: var(--gutter);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bay-500) 50%, transparent);
    opacity: 0.4;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--bay-800);
    margin-bottom: 24px;
}
.footer-brand .logo-scribe,
.footer-brand .logo-pillar {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--white);
    margin-right: 4px;
}
.footer-brand .logo-pillar {
    color: var(--stone-300);
}
.footer-tagline {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin-top: 8px;
    font-style: italic;
    font-weight: 300;
}
.footer-meta p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
    text-align: right;
    font-weight: 300;
}
.footer-meta a {
    color: var(--stone-300);
    transition: color var(--transition-base);
}
.footer-meta a:hover {
    color: var(--white);
}
.footer-bottom {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.04em;
    font-weight: 300;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid,
    .credentials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
        --gutter: 6vw;
    }
    .services-grid,
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    .about-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hero {
        min-height: 68vh;
        align-items: flex-end;
    }
    .hero-content {
        padding-bottom: 60px;
    }
    .footer-content {
        flex-direction: column;
        gap: 28px;
    }
    .footer-meta p {
        text-align: left;
    }
    .service-card,
    .credential-card {
        padding: 32px 24px;
    }
}
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .hero-cta {
        flex-direction: column;
    }
}
