/*
Theme Name: Toivo Estate
Theme URI: https://toivoestate.com
Description: Construction and Property Management WordPress theme for Toivo Estate — a subsidiary of Toivo Investment. Features dark charcoal + copper design, responsive layout, scroll reveal animations, and full Customizer support.
Version: 1.0.0
Author: Toivo Investment
Author URI: https://toivoinvestment.com
Text Domain: toivo-estate
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ============================================================
   Toivo Estate — Shared Design System
   Reset, tokens, typography, navbar, footer, buttons, labels
   ============================================================ */

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === DESIGN TOKENS === */
:root {
    --te-charcoal: #1A1A1A;
    --te-charcoal-2: #222222;
    --te-charcoal-3: #2A2A2A;
    --te-copper: #B87333;
    --te-copper-light: #CC8844;
    --te-copper-dark: #9A5F28;
    --te-copper-muted: rgba(184, 115, 51, 0.10);
    --te-slate: #2C3E50;
    --te-slate-light: #34495E;
    --te-white: #FFFFFF;
    --te-off-white: #F9F8F6;
    --te-warm-white: #FBF9F7;
    --te-sand: #F4F0EB;
    --te-gray-100: #F0EEEA;
    --te-gray-200: #E2DED8;
    --te-gray-300: #CCC8C2;
    --te-gray-400: #9E9A94;
    --te-gray-500: #6E6B66;
    --te-gray-600: #4A4845;
    --te-gray-700: #3A3835;
    --te-green: #2E8B57;
    --te-green-bg: #EAF5EF;
    --te-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --te-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
    --te-radius: 8px;
    --te-radius-lg: 12px;
    --te-radius-xl: 16px;
    --te-radius-2xl: 24px;
    --te-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BASE === */
html { scroll-behavior: smooth; }

body {
    font-family: var(--te-font);
    color: var(--te-gray-500);
    line-height: 1.6;
    background: var(--te-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s var(--te-ease); }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }

.te-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { color: var(--te-charcoal); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
p { line-height: 1.75; }

/* === LABEL === */
.te-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--te-copper);
    margin-bottom: 14px;
}

.te-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--te-copper);
}

/* === BUTTONS === */
.te-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--te-radius);
    transition: all 0.3s var(--te-ease);
    letter-spacing: 0.01em;
}

.te-btn-copper { background: var(--te-copper); color: var(--te-white); }
.te-btn-copper:hover {
    background: var(--te-copper-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(184, 115, 51, 0.25);
}

.te-btn-dark { background: var(--te-charcoal); color: var(--te-white); }
.te-btn-dark:hover {
    background: var(--te-charcoal-2);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.2);
}

.te-btn-outline { background: transparent; border: 1.5px solid var(--te-gray-300); color: var(--te-charcoal); }
.te-btn-outline:hover { border-color: var(--te-copper); color: var(--te-copper-dark); }

.te-btn-outline-light { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.2); color: var(--te-white); }
.te-btn-outline-light:hover { border-color: var(--te-copper); color: var(--te-copper); }

.te-btn-arrow::after { content: '\2192'; transition: transform 0.3s; }
.te-btn-arrow:hover::after { transform: translateX(4px); }

/* === NAVBAR === */
.te-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.te-navbar .te-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.te-logo { display: flex; align-items: center; gap: 10px; }

.te-logo-mark {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--te-copper), var(--te-copper-dark));
    border-radius: var(--te-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--te-white);
    font-family: var(--te-serif);
    font-size: 1.2rem;
    font-weight: 400;
}

.te-logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--te-charcoal);
    letter-spacing: -0.01em;
}

.te-logo-sub {
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--te-copper);
    display: block;
    margin-top: -2px;
}

.te-nav-links { display: flex; align-items: center; gap: 32px; }

.te-nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--te-gray-500);
    position: relative;
}

.te-nav-links a:hover,
.te-nav-links a.active { color: var(--te-charcoal); }

.te-nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--te-copper);
    border-radius: 1px;
}

.te-nav-cta { padding: 10px 22px; font-size: 0.85rem; }

.te-parent-link {
    font-size: 0.75rem !important;
    color: var(--te-gray-400) !important;
    border-left: 1px solid var(--te-gray-200);
    padding-left: 20px !important;
    margin-left: 8px !important;
}

.te-parent-link:hover { color: var(--te-copper) !important; }

/* Mobile Menu Toggle */
.te-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    cursor: pointer;
    z-index: 1001;
}

.te-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--te-charcoal);
    border-radius: 2px;
    transition: all 0.3s var(--te-ease);
}

.te-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.te-menu-toggle.active span:nth-child(2) { opacity: 0; }
.te-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === PAGE HERO (Inner Pages) === */
.te-page-hero {
    padding: 160px 0 100px;
    background: var(--te-charcoal);
    position: relative;
    overflow: hidden;
}

.te-page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(184, 115, 51, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.te-page-hero .te-container { position: relative; z-index: 1; }

.te-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 24px;
}

.te-hero-breadcrumb a { color: rgba(255, 255, 255, 0.5); }
.te-hero-breadcrumb a:hover { color: var(--te-copper); }
.te-hero-breadcrumb span { color: var(--te-copper); }

.te-page-hero h1 {
    font-family: var(--te-serif);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 400;
    color: var(--te-white);
    margin-bottom: 20px;
    max-width: 700px;
}

.te-page-hero h1 em { font-style: italic; color: var(--te-copper); }

.te-page-hero > .te-container > p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 580px;
    line-height: 1.8;
}

.te-hero-stats { display: flex; gap: 48px; margin-top: 40px; }

.te-hero-stat strong {
    display: block;
    font-family: var(--te-serif);
    font-size: 1.8rem;
    color: var(--te-copper);
    font-weight: 400;
}

.te-hero-stat span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* === FOOTER === */
.te-footer {
    background: var(--te-charcoal);
    padding: 64px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.te-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.te-footer-brand p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 16px;
    max-width: 260px;
    line-height: 1.7;
}

.te-footer-col h4 {
    color: var(--te-white);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.te-footer-col a {
    display: block;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.te-footer-col a:hover { color: var(--te-copper); }

.te-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

.te-footer .te-logo-mark { width: 32px; height: 32px; font-size: 1rem; }
.te-footer .te-logo-text { color: var(--te-white); }

/* === SCROLL REVEAL === */
.te-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--te-ease), transform 0.7s var(--te-ease);
}

.te-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.te-reveal-delay-1 { transition-delay: 0.1s; }
.te-reveal-delay-2 { transition-delay: 0.2s; }
.te-reveal-delay-3 { transition-delay: 0.3s; }
.te-reveal-delay-4 { transition-delay: 0.4s; }

/* === RESPONSIVE — 1024px === */
@media (max-width: 1024px) {
    .te-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .te-hero-stats { gap: 32px; }
}

/* === RESPONSIVE — 768px === */
@media (max-width: 768px) {
    .te-menu-toggle { display: flex; }

    .te-nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--te-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 999;
        padding: 100px 24px 40px;
    }

    .te-nav-links.open { display: flex; }

    .te-nav-links a {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--te-charcoal);
    }

    .te-nav-links a.active::after { display: none; }

    .te-parent-link {
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        margin-top: 8px !important;
    }

    .te-nav-cta {
        padding: 14px 32px;
        font-size: 0.92rem;
        margin-top: 12px;
    }

    .te-page-hero { padding: 140px 0 70px; }
    .te-page-hero h1 { font-size: 2rem; }
    .te-hero-stats { gap: 24px; flex-wrap: wrap; }

    .te-footer-grid { grid-template-columns: 1fr; }
    .te-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* === RESPONSIVE — 480px === */
@media (max-width: 480px) {
    .te-container { padding: 0 16px; }
    h2 { font-size: 1.6rem; }
    .te-btn { padding: 12px 24px; font-size: 0.85rem; }
}
