/* ============================================
   KEYES & CO. — Brand Kit Theme
   Quiet luxury. Coastal wealth. Timeless.
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors — Brand Kit */
    --sand: #EDE3D3;
    --aqua: #CFE8E3;
    --palm: #7A9A7E;
    --silver: #C9C9C9;

    /* Secondary Colors */
    --navy: #1F2A44;
    --taupe: #B8AFA3;

    /* Derived */
    --bg: #EDE3D3;
    --bg-light: #F5EFE6;
    --bg-card: #FFFFFF;
    --text: #1F2A44;
    --text-body: #5A5549;
    --text-muted: #B8AFA3;
    --border: rgba(184, 175, 163, 0.3);
    --shadow: 0 2px 20px rgba(31, 42, 68, 0.04);
    --shadow-hover: 0 8px 40px rgba(31, 42, 68, 0.08);

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--palm);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--navy);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

.nav.scrolled {
    background: rgba(237, 227, 211, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 1px 15px rgba(31, 42, 68, 0.04);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy);
    letter-spacing: 0.25em;
}

.nav-logo:hover {
    color: var(--palm);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--taupe);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--palm);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--navy);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile nav toggle */
.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: 1px;
    background: var(--navy);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--sand);
    overflow: hidden;
}

/* Subtle linen/canvas texture overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 40%, rgba(207, 232, 227, 0.15) 100%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
}

.hero-logo {
    width: clamp(260px, 35vw, 420px);
    height: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 2px 8px rgba(31, 42, 68, 0.04));
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--taupe);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-sub {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    color: var(--palm);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--taupe);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--palm), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.5); }
    50% { opacity: 0.8; transform: scaleY(1); }
}

/* --- Sections --- */
.section {
    padding: 8rem 0;
    background: var(--bg-light);
}

.section-aqua {
    background: var(--aqua);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--palm);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 400;
    color: var(--navy);
    letter-spacing: 0.02em;
}

.section-divider {
    width: 40px;
    height: 1px;
    background: var(--taupe);
    margin: 1.5rem auto 0;
}

/* --- Venture Cards --- */
.ventures-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.venture-card {
    background: var(--bg-card);
    border: 1px solid rgba(184, 175, 163, 0.15);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: var(--shadow);
}

.venture-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--palm), var(--aqua));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.venture-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.venture-card:hover::before {
    transform: scaleX(1);
}

/* Impact cards on aqua background */
.impact-card {
    border-color: rgba(255, 255, 255, 0.4);
}

.venture-card-inner {
    padding: 2.5rem;
}

.venture-number {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--taupe);
    font-style: italic;
    display: block;
    margin-bottom: 1.25rem;
}

.venture-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.venture-desc {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

.venture-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--palm);
    padding: 0.4rem 0.9rem;
    background: rgba(122, 154, 126, 0.08);
    border: 1px solid rgba(122, 154, 126, 0.15);
    border-radius: 2px;
}

.impact-tag {
    color: var(--navy);
    background: rgba(31, 42, 68, 0.05);
    border-color: rgba(31, 42, 68, 0.1);
}

/* --- New Ventures --- */
.new-ventures-content {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.new-ventures-text {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.9;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.cta-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--navy);
    padding: 0.9rem 2.2rem;
    border: 1px solid var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
    background: transparent;
}

.cta-link:hover {
    color: var(--bg-card);
    background: var(--navy);
}

/* --- Footer --- */
.footer {
    padding: 8rem 0 3rem;
    background: var(--sand);
}

.footer-content {
    text-align: center;
    margin-bottom: 5rem;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--navy);
}

.footer-email {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--palm);
    letter-spacing: 0.06em;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(122, 154, 126, 0.3);
    transition: all 0.3s ease;
}

.footer-email:hover {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(184, 175, 163, 0.25);
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--taupe);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.ventures-grid .venture-card:nth-child(2) { transition-delay: 0.15s; }
.ventures-grid .venture-card:nth-child(3) { transition-delay: 0.3s; }
.impact-grid .venture-card:nth-child(2) { transition-delay: 0.15s; }

/* --- Responsive --- */
@media (max-width: 968px) {
    .ventures-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(237, 227, 211, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(31, 42, 68, 0.04);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 0.95rem;
        color: var(--navy);
    }

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

    .section {
        padding: 5rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .venture-card-inner {
        padding: 2rem;
    }

    .hero-logo {
        width: 220px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .venture-name {
        font-size: 1.3rem;
    }

    .hero-logo {
        width: 180px;
    }
}
