/* ============================================
   HILLSIDE LAKE GROUP — REFINED DESIGN SYSTEM
   ============================================ */

/* CSS Variables */
:root {
    /* Color Palette — Hillside/Lake with Earth Tones */
    --color-midnight: #0a1f2e;
    --color-deep-lake: #0f2b3d;
    --color-lake: #1e4a5f;
    --color-lake-light: #2d6a7a;
    
    --color-earth: #8b6d5c;
    --color-earth-light: #c4a98f;
    --color-sand: #d4c4b0;
    
    --color-text: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-muted: #707070;
    
    --color-white: #ffffff;
    --color-bg-warm: #fcfbf9; /* Slightly warmer/lighter */
    --color-bg-cool: #f4f6f8;
    --color-bg-muted: #e8e6e3;
    
    /* Typography */
    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing Scale - Refined for better rhythm */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;       /* Reduced from 2rem */
    --space-lg: 2.5rem;     /* Reduced from 3.5rem */
    --space-xl: 4rem;       /* Reduced from 5rem */
    --space-2xl: 6rem;
    --space-3xl: 7rem;      /* Reduced from 9rem */
    --space-4xl: 10rem;
    
    /* Layout */
    --container-max: 1200px; /* Reduced from 1280px */
    --container-narrow: 800px;
    --container-pad: 1.5rem;   /* Standardized padding */
    
    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.4s;
    --duration-slow: 0.8s;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.65; /* Relaxed for Jakarta Sans */
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--duration-normal) var(--ease-out);
}

.header--scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: var(--space-sm) 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header--scrolled .header-logo {
    color: var(--color-deep-lake);
}

.header--scrolled .header-nav a {
    color: var(--color-text);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-white);
    transition: color var(--duration-fast) var(--ease-out);
}

.header-logo-mark {
    width: 36px; /* Increased from 28px */
    height: 36px;
    flex-shrink: 0;
}

.header-logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem; /* Increased from 1.25rem */
    font-weight: 400; /* Lighter weight looks more elegant with Fraunces */
    letter-spacing: -0.01em; /* Tighter tracking for Fraunces */
    font-variation-settings: "SOFT" 50, "WONK" 0; /* Custom settings for Fraunces */
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

.header-nav a:hover {
    color: var(--color-white);
}

.header--scrolled .header-nav a:hover {
    color: var(--color-lake);
}

.header-cta {
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all var(--duration-fast) var(--ease-out);
}

.header-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.header--scrolled .header-cta {
    border-color: var(--color-lake);
    color: var(--color-lake);
}

.header--scrolled .header-cta:hover {
    background: var(--color-lake);
    color: var(--color-white);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-deep-lake);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Increased opacity for depth */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 31, 46, 0.85) 0%,
        rgba(30, 74, 95, 0.6) 60%,
        rgba(10, 31, 46, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-4xl) var(--container-pad) var(--space-3xl);
    color: var(--color-white);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem); /* Significantly scaled down */
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    max-width: 800px;
    font-variation-settings: "SOFT" 30;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem); /* Scaled down */
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-lg);
    max-width: 700px;
}

.hero-description {
    font-size: clamp(1rem, 1.25vw, 1.125rem);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-xl);
    max-width: 580px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-white);
    padding: 1rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
    background: transparent;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    padding-right: 3rem; /* Dynamic hover expansion */
}

.hero-cta .arrow {
    transition: transform var(--duration-normal) var(--ease-out);
}

.hero-cta:hover .arrow {
    transform: translateX(5px);
}

/* Hero horizon line decoration */
.hero-horizon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 3;
}

/* ============================================
   SECTIONS — BASE
   ============================================ */

.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section--white {
    background: var(--color-white);
}

.section--warm {
    background: var(--color-bg-warm);
}

.section--cool {
    background: var(--color-bg-cool);
}

.section--dark {
    background: linear-gradient(135deg, var(--color-midnight) 0%, var(--color-deep-lake) 100%);
    color: var(--color-white);
    overflow: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    margin-bottom: var(--space-xl);
}

.section-header--left {
    text-align: left;
}

.section-header--right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.section-header--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 2.75rem); /* Scaled down */
    font-weight: 300;
    color: var(--color-deep-lake);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    font-variation-settings: "SOFT" 30;
}

.section--dark .section-title {
    color: var(--color-white);
}

/* Section line — subtle horizon accent */
.section-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-earth) 0%, var(--color-earth-light) 100%);
    margin-top: var(--space-sm);
    opacity: 0.8;
}

/* ============================================
   SPLIT LAYOUT - Improved alignment
   ============================================ */

.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr 1.5fr;
        gap: var(--space-2xl); /* Tighter gap */
        align-items: start;
    }
    
    .split-layout--reverse {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .split-layout--reverse .section-header {
        order: 2;
    }
    
    .split-layout--reverse .content-block {
        order: 1;
    }
}

/* ============================================
   CONTENT BLOCKS
   ============================================ */

.content-block p {
    font-size: clamp(1.05rem, 1.25vw, 1.2rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.75;
    font-weight: 400; /* Regular weight for Jakarta Sans */
}

.content-block--center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.lead-text {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 400;
    color: var(--color-deep-lake);
    line-height: 1.25;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.01em;
}

.subheading {
    display: block;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-earth);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

.discretion-note {
    font-style: italic;
    color: var(--color-text-muted);
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0,0,0,0.05);
    display: inline-block;
}

/* ============================================
   FEATURE LIST
   ============================================ */

.feature-list {
    margin: var(--space-md) 0;
}

.feature-list--center {
    display: inline-block;
    text-align: left;
}

.feature-list li {
    font-size: clamp(1.1rem, 1.25vw, 1.25rem);
    color: var(--color-deep-lake);
    padding: 0.5rem 0;
    /* Use flexbox for perfect vertical alignment */
    display: flex;
    align-items: baseline; 
    gap: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Small diamond marker — elegant and professional */
.feature-list li::before {
    content: "";
    flex-shrink: 0; /* Prevent marker from squishing */
    width: 6px;
    height: 6px;
    background: var(--color-earth);
    transform: rotate(45deg);
    /* Adjust vertical position relative to baseline */
    transform-origin: center;
    margin-top: -3px; /* Fine-tune vertical alignment */
    align-self: center; /* Center relative to the line height if needed, or stick to baseline */
}

/* ============================================
   SERVICES GRID
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

.service-card {
    position: relative;
    padding: var(--space-md); /* Reduced padding */
    background: var(--color-white);
    border: 1px solid rgba(0,0,0,0.06); /* Slightly more visible border */
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Top accent line instead of bottom */
.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-lake);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-normal) var(--ease-out);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(10, 31, 46, 0.05); /* Colored shadow */
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-title {
    font-family: var(--font-serif);
    font-size: 1.5rem; /* Fixed manageable size */
    font-weight: 400;
    color: var(--color-deep-lake);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.service-description {
    font-size: 0.95rem; /* Smaller body text */
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ============================================
   PRINCIPLES SECTION
   ============================================ */

.principles-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    color: var(--color-white);
    pointer-events: none;
    opacity: 0.1; /* More subtle */
}

.principles-decoration svg {
    width: 100%;
    height: 100%;
}

.principles-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
    position: relative;
    z-index: 1;
}

.principles-intro {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-xl);
}

.principles-quote {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
    color: var(--color-white);
    margin: 0 0 var(--space-2xl);
    padding: 0;
    border: none;
}

.principles-tagline {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--color-earth-light);
    text-transform: uppercase;
}

/* ============================================
   CONTACT SECTION - REDESIGNED
   ============================================ */

.contact-section {
    background: linear-gradient(to bottom, var(--color-bg-warm) 0%, #fff 100%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1.5fr;
        gap: var(--space-3xl);
        align-items: start;
    }
}

.contact-intro {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-md);
    line-height: 1.6;
    max-width: 400px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.contact-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-earth);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    color: var(--color-deep-lake);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: all var(--duration-normal) var(--ease-out);
}

.contact-link:first-of-type {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.contact-link .arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--duration-normal) var(--ease-out);
    color: var(--color-earth);
    font-family: var(--font-sans);
    font-size: 1.25rem;
}

.contact-link:hover {
    color: var(--color-earth);
    border-color: rgba(139, 109, 92, 0.3);
    padding-left: 1rem; /* Subtle shift */
}

.contact-link:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

.contact-info-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

@media (min-width: 600px) {
    .contact-info-group {
        flex-direction: row;
        justify-content: space-between;
    }
}

.location-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-deep-lake);
    line-height: 1.4;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: var(--color-deep-lake);
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-out);
    border-bottom: 1px solid transparent;
}

.social-link:hover {
    color: var(--color-earth);
    border-color: var(--color-earth);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--color-midnight);
    color: var(--color-white);
    padding: var(--space-2xl) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end; /* Align bottom */
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.footer-logo {
    width: 60px;
    height: 30px;
    opacity: 0.6;
}

.footer-copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity 1s var(--ease-out),
        transform 1s var(--ease-out);
    transition-delay: calc(var(--delay, 0) * 0.1s);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE — MOBILE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
    :root {
        --space-3xl: 4rem;
        --space-4xl: 6rem;
    }
    
    .header-nav a:not(.header-cta) {
        display: none;
    }
    
    .hero-content {
        padding-top: var(--space-4xl);
    }
    
    .split-layout--reverse .section-header,
    .split-layout--reverse .content-block {
        order: unset;
    }
    
    .section-header {
        text-align: left !important;
        align-items: flex-start !important;
    }
    
    .section-line--right, .section-line--center {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}

/* ============================================
   RESPONSIVE — LARGE SCREENS
   ============================================ */

@media (min-width: 1200px) {
    :root {
        --container-pad: 4rem;
    }
    
    .hero-content {
        padding-left: var(--container-pad);
    }
}

@media (min-width: 1440px) {
    :root {
        --container-max: 1400px;
    }
}
