/* ==========================================================================
   CALIFORNIA FIRST STRATEGIES - WEBSITE STYLES
   Theme: Black, Red, White, and Gold
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS VARIABLES & COLOR PALETTE
   -------------------------------------------------------------------------- */
:root {
    /* Primary Colors */
    --black: #0a0a0a;
    --black-light: #141414;
    --black-lighter: #1a1a1a;
    --black-card: #111111;

    /* California Red */
    --red: #c41e3a;
    --red-dark: #9e1830;
    --red-light: #d93654;

    /* White Spectrum */
    --white: #fafafa;
    --white-muted: #e8e8e8;
    --white-dim: #b0b0b0;

    /* California Gold */
    --gold: #d4af37;
    --gold-light: #e8c547;
    --gold-dark: #b8972f;
    --gold-muted: rgba(212, 175, 55, 0.3);

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Raleway', 'Helvetica Neue', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.3);

    /* Layout */
    --container-max: 1200px;
    --nav-height: 80px;
}

/* --------------------------------------------------------------------------
   BASE STYLES & RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

/* Film Grain Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--white);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    color: var(--white-dim);
    margin-bottom: var(--space-sm);
}

.text-gold {
    color: var(--gold);
}

.text-center {
    text-align: center;
}

/* --------------------------------------------------------------------------
   LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-intro {
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    text-align: center;
    font-size: 1.1rem;
}

section {
    padding: var(--space-xl) 0;
    position: relative;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--black);
    box-shadow: var(--shadow-gold);
}

.btn-full {
    width: 100%;
}

/* Button Ripple Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* --------------------------------------------------------------------------
   NAVIGATION
   -------------------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.logo-accent {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white-muted);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-medium);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196, 30, 58, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        linear-gradient(135deg, var(--black) 0%, var(--black-light) 50%, var(--black) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
    align-items: center;
    max-width: var(--container-max);
    padding: 0 var(--space-md);
    width: 100%;
}

.hero-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
}

.hero-title {
    margin-bottom: var(--space-md);
}

.title-line {
    display: block;
}

.title-gold {
    color: var(--gold);
    position: relative;
}

.title-gold::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gold);
    animation: underlineGrow 1s ease forwards;
    animation-delay: 1.2s;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 500;
    font-style: italic;
    color: var(--gold);
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--white-dim);
    max-width: 500px;
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1s;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.2s;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
}

.hero-frame {
    width: 280px;
    height: 280px;
    border: 2px solid var(--gold-muted);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-frame::before,
.hero-frame::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-muted);
}

.hero-frame::before {
    top: 15px;
    left: 15px;
}

.hero-frame::after {
    top: 30px;
    left: 30px;
    opacity: 0.5;
}

.frame-content {
    padding: var(--space-lg);
}

.california-silhouette {
    width: 220px;
    height: auto;
    opacity: 0.9;
    pointer-events: none;
}

.capital-marker {
    animation: subtleGlow 3s ease-in-out infinite;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.5s;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white-dim);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   ABOUT SECTION
   -------------------------------------------------------------------------- */
.about {
    background: var(--black-light);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    align-items: center;
}

.about-quote {
    position: relative;
}

.about-quote blockquote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 500;
    font-style: italic;
    color: var(--white);
    line-height: 1.4;
    position: relative;
    padding-left: var(--space-md);
    border-left: 3px solid var(--gold);
}

.quote-mark {
    color: var(--gold);
    font-size: 1.5em;
}

.about-content h2 {
    margin-bottom: var(--space-md);
}

.about-content p {
    font-size: 1.0625rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--gold);
    display: inline;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--gold);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--white-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: var(--space-xs);
}

/* Diagonal Divider */
.diagonal-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom right, transparent 49.5%, var(--black) 50%);
}

/* --------------------------------------------------------------------------
   SERVICES SECTION
   -------------------------------------------------------------------------- */
.services {
    background: var(--black);
    padding-top: var(--space-2xl);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.service-card {
    background: var(--black-card);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    transition: border-color var(--transition-medium);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    border-color: var(--gold);
}

.service-card.featured {
    border-color: var(--gold-muted);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    color: var(--gold);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--white);
}

.service-description {
    margin-bottom: var(--space-md);
    color: var(--white-dim);
}

.service-features {
    margin-bottom: var(--space-md);
}

.service-features li {
    padding: var(--space-xs) 0;
    color: var(--white-muted);
    font-size: 0.9375rem;
    position: relative;
    padding-left: var(--space-md);
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--gold);
}

.service-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--red), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.service-card:hover .service-accent {
    transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   PORTFOLIO SECTION
   -------------------------------------------------------------------------- */
.portfolio {
    background: var(--black-light);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--white-dim);
    color: var(--white-dim);
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-item.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    background: var(--black-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-medium);
}

.portfolio-placeholder {
    width: 60%;
    color: var(--white-dim);
    opacity: 0.3;
}

.portfolio-placeholder svg {
    width: 100%;
    height: auto;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 175, 55, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.portfolio-overlay h4 {
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: var(--space-xs);
}

.portfolio-overlay p {
    font-size: 0.875rem;
    color: var(--black);
    opacity: 0.8;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   PROCESS SECTION
   -------------------------------------------------------------------------- */
.process {
    background: var(--black);
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: var(--space-xl);
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--red));
}

.process-step {
    position: relative;
    padding-bottom: var(--space-lg);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    position: absolute;
    left: -60px;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--black);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.step-content {
    background: var(--black-card);
    padding: var(--space-md);
    border-left: 3px solid var(--red);
    margin-left: var(--space-md);
}

.step-content h3 {
    font-size: 1.375rem;
    margin-bottom: var(--space-xs);
    color: var(--gold);
}

.step-content p {
    margin-bottom: 0;
}

.step-connector {
    position: absolute;
    left: -40px;
    top: 40px;
    width: 40px;
    height: 2px;
    background: var(--gold-muted);
}

/* --------------------------------------------------------------------------
   TECHNOLOGY SECTION
   -------------------------------------------------------------------------- */
.technology {
    background: var(--black-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.tech-content h2 {
    margin-bottom: var(--space-md);
}

.tech-content p {
    margin-bottom: var(--space-md);
    font-size: 1.0625rem;
}

.tech-features {
    margin-top: var(--space-md);
}

.tech-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    color: var(--white-muted);
}

.tech-features li svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
    flex-shrink: 0;
}

/* Phone Mockup */
.tech-visual {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    background: var(--black);
    border-radius: 30px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--black-lighter);
}

.phone-screen {
    background: linear-gradient(135deg, var(--black-light), var(--black-lighter));
    border-radius: 22px;
    padding: var(--space-md);
    min-height: 500px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--gold-muted);
}

.app-logo {
    width: 36px;
    height: 36px;
    background: var(--gold);
    color: var(--black);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.app-title {
    font-weight: 600;
    color: var(--white);
}

.app-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.app-card {
    background: var(--black-card);
    padding: var(--space-sm);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.app-card:hover {
    border-color: var(--gold-muted);
    transform: translateX(5px);
}

.card-icon {
    font-size: 1.5rem;
}

.app-card span {
    font-size: 0.9375rem;
    color: var(--white-muted);
}

/* --------------------------------------------------------------------------
   TESTIMONIALS SECTION
   -------------------------------------------------------------------------- */
.testimonials {
    background: var(--black);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.testimonial-card {
    background: var(--black-card);
    padding: var(--space-lg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
}

.testimonial-card:hover {
    border-color: var(--gold-muted);
    transform: translateY(-5px);
}

.quote-icon {
    width: 40px;
    height: 40px;
    color: var(--gold);
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.quote-icon svg {
    width: 100%;
    height: 100%;
}

.testimonial-text {
    font-size: 1.0625rem;
    font-style: italic;
    color: var(--white-muted);
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--red);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--white);
}

.author-title {
    font-size: 0.875rem;
    color: var(--gold);
}

/* --------------------------------------------------------------------------
   CONTACT SECTION
   -------------------------------------------------------------------------- */
.contact {
    background: var(--black-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white-muted);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: var(--space-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-muted);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--white-dim);
    opacity: 0.5;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--black);
}

.contact-form .btn {
    margin-top: var(--space-sm);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--black-card);
    border-left: 3px solid var(--gold);
}

.info-icon {
    width: 40px;
    height: 40px;
    color: var(--gold);
    flex-shrink: 0;
}

.info-icon svg {
    width: 100%;
    height: 100%;
}

.info-content h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--white);
}

.info-content p {
    margin-bottom: 0;
    color: var(--white-dim);
}

.info-content a {
    color: var(--white-muted);
    transition: color var(--transition-fast);
}

.info-content a:hover {
    color: var(--gold);
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-muted);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
    background: var(--black);
}

.footer-top {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--gold-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-lg);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    font-style: italic;
    color: var(--white-dim);
    font-size: 0.9375rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: var(--space-md);
    font-family: var(--font-body);
}

.footer-links ul li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: var(--white-dim);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
}

.footer-contact a {
    color: var(--white-dim);
}

.footer-contact a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding: var(--space-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--white-dim);
    margin: 0;
}

.california-icon {
    width: auto;
    height: 40px;
    opacity: 0.6;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   BACK TO TOP BUTTON
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--red);
    border: none;
    color: var(--white);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes underlineGrow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes subtleGlow {
    0%, 100% {
        opacity: 0.7;
        filter: drop-shadow(0 0 2px currentColor);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px currentColor);
    }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --space-xl: 4rem;
        --space-2xl: 5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

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

    .about-quote {
        order: -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid .service-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }

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

    .tech-visual {
        order: -1;
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

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

    .contact-info {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 3rem;
        --nav-height: 70px;
    }

    /* Navigation Mobile */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: var(--space-lg);
        gap: 0;
        transform: translateX(100%);
        transition: transform var(--transition-medium);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: var(--space-md);
        font-size: 1.125rem;
    }

    /* Hero Mobile */
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-tagline {
        font-size: 1.125rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .scroll-indicator {
        display: none;
    }

    /* Stats Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    /* Services Mobile */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-grid .service-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    /* Portfolio Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item.large {
        grid-column: span 1;
    }

    /* Process Mobile */
    .process-timeline {
        padding-left: var(--space-lg);
    }

    .timeline-line {
        left: 10px;
    }

    .step-number {
        left: -30px;
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .step-connector {
        left: -20px;
        width: 20px;
    }

    /* Testimonials Mobile */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }

    /* Contact Mobile */
    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        align-items: center;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.8125rem;
    }

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

    .portfolio-filters {
        gap: var(--space-xs);
    }

    .filter-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    .phone-mockup {
        width: 240px;
    }

    .phone-screen {
        min-height: 400px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --black: #000000;
        --white: #ffffff;
        --gold: #ffd700;
        --red: #ff0000;
    }
}
