/* =============================================
   SP Ventures — Distinct Design
   Palette: Light hero, Deep Slate + Terracotta
   Fonts: Playfair Display (serif) + Source Sans 3
   ============================================= */

:root {
    --slate-900: #1E293B;
    --slate-800: #2C3E50;
    --slate-700: #3D5266;
    --slate-600: #556B7D;
    --slate-400: #94A3B8;
    --slate-300: #CBD5E1;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50: #F8FAFC;
    --terra: #C0785C;
    --terra-light: #D4937A;
    --terra-dark: #A86448;
    --terra-bg: #FBF5F1;
    --text-primary: #1A1A2E;
    --text-secondary: #555770;
    --text-muted: #94A3B8;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.65; color: var(--text-secondary); background: var(--white); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--text-primary); font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); letter-spacing: -0.02em; line-height: 1.12; }
h1 em { font-style: italic; color: var(--terra); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-sans); }
h4 { font-size: 1.05rem; font-weight: 600; font-family: var(--font-sans); }
.overline { display: block; font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--terra); margin-bottom: 16px; }
.overline-light { color: rgba(255,255,255,0.5); }
.lead-text { font-size: 1.125rem; line-height: 1.75; color: var(--text-primary); font-weight: 400; margin-bottom: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-weight: 600; font-size: 0.875rem; padding: 14px 32px; border-radius: 6px; border: none; cursor: pointer; transition: all 0.25s ease; letter-spacing: 0.02em; }
.btn-primary { background: var(--slate-900); color: var(--white); }
.btn-primary:hover { background: var(--slate-700); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(30,41,59,0.18); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1.5px solid var(--slate-300); }
.btn-ghost:hover { border-color: var(--terra); color: var(--terra-dark); }
.btn-full { width: 100%; justify-content: center; padding: 16px 32px; }

/* ===== NAVIGATION ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 20px 0; background: transparent; transition: all 0.3s ease; }
.navbar.scrolled { background: rgba(255,255,255,0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--slate-100); padding: 14px 0; }
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; z-index: 1001; }
.logo-text { font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; color: var(--text-primary); letter-spacing: -0.01em; }
.logo-dot { color: var(--terra); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.01em; }
.nav-links a:hover { color: var(--terra-dark); }
.nav-cta { font-weight: 600 !important; color: var(--white) !important; background: var(--slate-900); padding: 9px 22px !important; border-radius: 6px; transition: all 0.2s ease !important; }
.nav-cta:hover { background: var(--slate-700) !important; }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.2s ease; }

/* ===== HERO (Light — completely different from Perkways/MileHomes dark heroes) ===== */
.hero { padding: 180px 0 120px; min-height: 100vh; display: flex; align-items: center; background: var(--white); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; right: 0; width: 45%; height: 100%; background: var(--terra-bg); clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); z-index: 0; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: center; position: relative; z-index: 1; }
.hero-eyebrow { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--terra); margin-bottom: 24px; }
.hero h1 { color: var(--text-primary); margin-bottom: 24px; }
.hero h1 em { color: var(--terra); }
.hero-subtitle { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.85; max-width: 520px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--slate-200); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.hero-stat { background: var(--white); padding: 36px 28px; }
.hero-stat-num { display: block; font-family: var(--font-serif); font-size: 2.4rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.hero-stat-label { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

/* ===== ABOUT ===== */
.about { padding: 120px 0; border-top: 1px solid var(--slate-100); }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; }
.about-left h2 { margin-top: 0; }
.about-right p { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); margin-bottom: 16px; }

/* ===== APPROACH ===== */
.approach { padding: 120px 0; background: var(--slate-50); }
.approach-header { max-width: 600px; margin-bottom: 64px; }
.approach-header h2 { margin-bottom: 16px; }
.approach-header p { font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.75; }
.approach-list { display: flex; flex-direction: column; }
.approach-item { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--slate-200); }
.approach-item:last-child { border-bottom: 1px solid var(--slate-200); }
.approach-num { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; color: var(--slate-300); line-height: 1.6; }
.approach-body h3 { margin-bottom: 8px; color: var(--text-primary); }
.approach-body p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.75; max-width: 700px; }

/* ===== PORTFOLIO ===== */
.portfolio { padding: 120px 0; }
.portfolio-header { max-width: 560px; margin-bottom: 40px; }
.portfolio-header h2 { margin-top: 0; }
.portfolio-filters { display: flex; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 500; padding: 9px 20px; border-radius: 100px; border: 1px solid var(--slate-200); background: var(--white); color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; }
.filter-btn:hover { border-color: var(--terra); color: var(--terra-dark); }
.filter-btn.active { background: var(--slate-900); color: var(--white); border-color: var(--slate-900); }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.portfolio-card { background: var(--slate-50); border-radius: 10px; padding: 24px; transition: all 0.3s ease; position: relative; border: 1px solid transparent; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; }
.portfolio-card:hover { background: var(--white); border-color: var(--slate-200); box-shadow: 0 8px 32px rgba(0,0,0,0.06); transform: translateY(-3px); }
.portfolio-card.hidden { display: none; }
.portfolio-card.card-wide { grid-column: span 2; }
.card-top { margin-bottom: auto; }
.card-badge { display: inline-block; font-size: 0.625rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--slate-800); color: var(--white); }
.card-badge.badge-us { background: var(--terra); }
.card-info { margin-top: 24px; }
.card-category { display: block; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terra); margin-bottom: 6px; }
.card-info h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.card-loc { font-size: 0.8125rem; color: var(--text-muted); }

/* ===== THESIS ===== */
.thesis { padding: 120px 0; background: var(--slate-900); }
.thesis-head { max-width: 560px; margin-bottom: 64px; }
.thesis-head h2 { color: var(--white); margin-bottom: 16px; }
.thesis-head p { color: rgba(255,255,255,0.5); font-size: 1.0625rem; line-height: 1.75; }
.thesis-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.thesis-card { background: rgba(255,255,255,0.05); border-radius: 10px; padding: 32px 28px; border: 1px solid rgba(255,255,255,0.08); transition: all 0.3s ease; }
.thesis-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.thesis-card h4 { color: var(--white); font-family: var(--font-sans); margin-bottom: 12px; font-size: 1rem; }
.thesis-card p { color: rgba(255,255,255,0.4); font-size: 0.9rem; line-height: 1.7; }

/* ===== MARKETS ===== */
.markets { padding: 120px 0; background: var(--slate-50); }
.markets-header { max-width: 560px; margin-bottom: 48px; }
.markets-header h2 { margin-bottom: 16px; }
.markets-header p { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.75; }
.markets-table { max-width: 800px; }
.market-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--slate-200); align-items: center; }
.market-row-head { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); padding-bottom: 12px; }
.market-city { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; color: var(--text-primary); }
.market-row span { font-size: 0.9rem; color: var(--text-secondary); }
.market-status { font-size: 0.75rem !important; font-weight: 600; color: var(--terra-dark) !important; }
.status-growth { color: var(--terra) !important; }

/* ===== CONTACT ===== */
.contact { padding: 120px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; }
.contact-left h2 { margin-bottom: 16px; }
.contact-left > p { color: var(--text-secondary); font-size: 1rem; line-height: 1.8; margin-bottom: 32px; }
.contact-email { display: inline-block; font-family: var(--font-serif); font-size: 1.2rem; color: var(--terra-dark); font-weight: 500; margin-bottom: 24px; transition: color 0.2s ease; }
.contact-email:hover { color: var(--terra); }
.contact-promises { display: flex; flex-direction: column; gap: 8px; }
.contact-promises span { font-size: 0.8125rem; color: var(--text-muted); padding-left: 20px; position: relative; }
.contact-promises span::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--terra); }
.contact-form { background: var(--slate-50); border-radius: 12px; padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.form-field input, .form-field select, .form-field textarea { font-family: var(--font-sans); font-size: 0.9375rem; padding: 12px 16px; border: 1px solid var(--slate-200); border-radius: 6px; background: var(--white); color: var(--text-primary); transition: all 0.2s ease; outline: none; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--slate-400); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(192,120,92,0.1); }
.form-field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 16px; }
.form-success { text-align: center; padding: 48px 24px; }
.form-success svg { color: var(--terra); margin-bottom: 16px; }
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: var(--text-secondary); }

/* ===== FOOTER ===== */
.footer { background: var(--slate-900); padding: 64px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 64px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-dot { color: var(--terra-light); }
.footer-brand > p { color: rgba(255,255,255,0.35); font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 { color: var(--white); font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.35); font-size: 0.875rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; }
.footer-bottom p { color: rgba(255,255,255,0.2); font-size: 0.8125rem; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: rgba(255,255,255,0.2); font-size: 0.8125rem; }
.footer-legal a:hover { color: rgba(255,255,255,0.5); }

/* ===== ANIMATIONS ===== */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-stats-stack { max-width: 400px; }
    .hero::before { width: 100%; clip-path: none; top: auto; bottom: 0; height: 30%; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-card.card-wide { grid-column: span 2; }
    .thesis-cards { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; justify-content: center; align-items: center; gap: 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
    .nav-links.active { opacity: 1; pointer-events: all; }
    .nav-links a { font-size: 1.1rem; color: var(--text-secondary) !important; }
    .nav-links.active .nav-cta { color: var(--white) !important; background: var(--slate-900) !important; }
    .mobile-toggle { display: flex; }
    .mobile-toggle.active span { background: var(--text-primary) !important; }
    .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .hero { padding: 130px 0 80px; min-height: auto; }
    .hero::before { display: none; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .portfolio-card.card-wide { grid-column: span 1; }
    .approach-item { grid-template-columns: 50px 1fr; gap: 16px; padding: 24px 0; }
    .thesis-cards { grid-template-columns: 1fr; }
    .market-row { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { justify-content: center; }
    .hero-stats-stack { grid-template-columns: 1fr 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 24px; }
    .market-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
    .market-row-head { display: none; }
}
