/* ========================================
   Cornerstone — Luxury Redesign
   ======================================== */

/* CSS Variables */
:root {
    --color-primary: #B8963E;
    --color-primary-dark: #9A7D35;
    --color-secondary: #F8F9FA;
    --color-accent: #C9A84C;
    --color-text: #D1D5DB;
    --color-text-light: #9CA3AF;
    --color-bg: #0C1320;
    --color-bg-alt: #101828;
    --color-surface: #141E2D;
    --color-border: #1C2A3A;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Bodoni Moda', 'Didot', Georgia, serif;

    --transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    --transition-slow: all 0.6s cubic-bezier(.25,.8,.25,1);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-secondary);
    font-family: var(--font-family-heading);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section { padding: clamp(4rem, 10vw, 8rem) 0; }

.section-header { margin-bottom: 3.5rem; }

.section-eyebrow {
    font-family: var(--font-family);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 300;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 150, 62, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ========================================
   Loader
   ======================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: loaderPulse 1.6s ease-in-out infinite;
}

.loader-logo {
    height: 48px;
    width: auto;
}

.loader-text {
    font-family: var(--font-family);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    color: var(--color-text-light);
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.97); }
    50% { opacity: 1; transform: scale(1); }
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(12, 19, 32, 0.95);
    backdrop-filter: blur(20px);
    border-bottom-color: var(--color-border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-secondary);
}

.logo-icon-img { height: 32px; width: auto; }

.logo-text {
    font-family: var(--font-family);
    font-weight: 500;
    letter-spacing: 0.25em;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    transition: var(--transition);
}

.nav-links a:hover { color: #fff; }

.nav-cta {
    padding: 0.5rem 1.25rem !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.12em !important;
}

.nav-cta:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--color-secondary);
    transition: var(--transition);
}

/* ========================================
   Hero — Full-screen Video
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-video.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(12, 19, 32, 0.45) 0%,
        rgba(12, 19, 32, 0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-eyebrow {
    font-family: var(--font-family);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-title .highlight {
    color: var(--color-primary);
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: rgba(255,255,255,0.6);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hero-scroll span {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   Marquee
   ======================================== */
.marquee {
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    background: var(--color-bg);
}

.marquee-inner {
    display: flex;
    gap: 2.5rem;
    white-space: nowrap;
    animation: marqueeScroll 20s linear infinite;
    width: max-content;
}

.marquee-inner span {
    font-family: var(--font-family);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   Projects Section
   ======================================== */
.section-projects {
    background: var(--color-bg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 340px;
    text-decoration: none;
    transition: transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.project-card:hover { transform: scale(1.015); }

.project-card-large {
    grid-column: 1 / -1;
    min-height: 440px;
}

.project-card-wide {
    grid-column: 1 / -1;
    min-height: 300px;
}

.project-card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.6s cubic-bezier(.25,.8,.25,1);
}

.project-card:hover .project-card-bg { transform: scale(1.05); }

.project-card-content {
    position: relative;
    z-index: 1;
    padding: clamp(2rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 70%);
}

.project-label {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.project-card h3 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: #fff;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    max-width: 480px;
    line-height: 1.6;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: var(--transition);
}

.project-card:hover .project-link { letter-spacing: 0.2em; }

/* ========================================
   Statement Section
   ======================================== */
.section-statement {
    padding: clamp(5rem, 12vw, 10rem) 0;
    background: var(--color-bg-alt);
}

.statement-text {
    font-size: clamp(1.75rem, 4vw, 3.25rem);
    font-weight: 300;
    text-align: center;
    line-height: 1.35;
    color: var(--color-secondary);
    max-width: 900px;
    margin: 0 auto;
}

.statement-text em {
    color: var(--color-primary);
    font-style: italic;
}

/* ========================================
   Services Section
   ======================================== */
.section-services {
    background: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
}

.service-item {
    padding: clamp(2rem, 4vw, 3rem);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-slow);
}

.service-item:hover {
    background: var(--color-surface);
}

.service-number {
    font-family: var(--font-family-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    color: var(--color-primary);
    opacity: 0.4;
    line-height: 1;
    margin-bottom: 1.25rem;
    display: block;
}

.service-item h3 {
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.service-item p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ========================================
   About Section
   ======================================== */
.section-about {
    background: var(--color-bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.about-left .section-title {
    text-align: left;
    line-height: 1.15;
}

.about-lead {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.about-right p {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.stat { display: flex; flex-direction: column; gap: 0.25rem; }

.stat-number {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

/* ========================================
   Contact Section
   ======================================== */
.section-contact {
    background: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.contact-desc {
    color: var(--color-text-light);
    margin-top: 1rem;
    line-height: 1.7;
    max-width: 360px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-group label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 0;
    font-family: var(--font-family);
    font-size: 0.95rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--color-primary);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.contact-form .btn { align-self: flex-start; margin-top: 0.5rem; }

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand-col .logo { margin-bottom: 0.75rem; }

.footer-tagline {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.footer .logo-icon-img { height: 28px; }
.footer .logo-text { font-size: 0.8rem; }

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links h4 {
    font-family: var(--font-family);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.05em;
}

/* ========================================
   Skip Link
   ======================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    font-family: var(--font-family);
    z-index: 10000;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   Focus & Motion
   ======================================== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(.25,.8,.25,1), transform 0.8s cubic-bezier(.25,.8,.25,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 968px) {
    .project-grid { grid-template-columns: 1fr; }
    .project-card-large,
    .project-card-wide { grid-column: auto; }
    .services-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        flex-direction: column;
        background: rgba(12, 19, 32, 0.98);
        backdrop-filter: blur(20px);
        padding: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        gap: 1.25rem;
    }

    .nav-links.active { display: flex; }
    .nav-toggle { display: flex; }

    .hero-title { font-size: clamp(2.25rem, 10vw, 3.5rem); }

    .about-stats { flex-direction: column; gap: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; }

    .hero-scroll { display: none; }
}
