/* ═══════════════════════════════════════════════════════════════════════════
   BREAKINGGROUND - Industrial-Premium Design System
   Aligned with iOS app - "Industrial-Premium / Field Tech" aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

/* Design Tokens - Single source of truth */
@import url('design-tokens.css');

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body-large);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-primary);
    background: var(--color-surface-background);
    line-height: 1.6;
    letter-spacing: var(--font-tracking-normal);
}

/* Typography Scale - Industrial tight headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    color: var(--color-text-primary);
    letter-spacing: var(--font-tracking-tight);
}

h1 {
    font-size: var(--font-size-display-large);
    font-weight: var(--font-weight-heavy);
    letter-spacing: var(--font-tracking-tighter);
}

h2 {
    font-size: var(--font-size-display-medium);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--font-size-headline-large);
}

h4 {
    font-size: var(--font-size-headline-medium);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 75, 0.2); }
    50% { box-shadow: 0 0 30px rgba(212, 168, 75, 0.4); }
}

.animate-slide-left { animation: slideInLeft 0.7s ease-out forwards; }
.animate-slide-right { animation: slideInRight 0.7s ease-out forwards; }
.animate-fade-up { animation: fadeInUp 0.7s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }

.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav-fixed {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 247, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    transition: var(--transition-base);
}

.nav-fixed.scrolled {
    box-shadow: var(--shadow-medium);
}

.nav-item {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-body-medium);
    color: var(--color-text-secondary);
    padding: var(--spacing-2) 0;
    position: relative;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-item:hover {
    color: var(--color-text-primary);
}

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

.nav-item.active {
    color: var(--color-primary);
}

.mobile-nav-item {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-body-large);
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
}

.mobile-nav-item:hover {
    background: var(--color-surface-elevated);
    color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--color-surface-background);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.05;
    filter: grayscale(40%);
}

/* Copper accent overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(212, 168, 75, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 168, 75, 0.04) 0%, transparent 50%);
    z-index: 1;
}

/* Industrial grid lines */
.hero-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 80px,
            rgba(212, 168, 75, 0.015) 80px,
            rgba(212, 168, 75, 0.015) 81px
        );
    z-index: 1;
    pointer-events: none;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.06) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 56rem;
    margin: 0 auto;
    padding: var(--spacing-8);
}

.hero-content p {
    font-family: var(--font-family-primary);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-regular);
    max-width: 38rem;
    margin: 0 auto;
}

.hero-content em {
    font-style: italic;
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.nord-button {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-body-medium);
    letter-spacing: var(--font-tracking-wide);
    padding: var(--spacing-4) var(--spacing-8);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    text-decoration: none;
    cursor: pointer;
}

.nord-button:hover {
    transform: translateY(-2px);
}

.nord-button:active {
    transform: translateY(0);
}

/* Primary button - Copper */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-strong), var(--shadow-glow);
}

/* Secondary button - outlined */
.btn-secondary {
    background: var(--color-surface-primary);
    color: var(--color-text-primary);
    border: 1.5px solid var(--border-default);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-medium);
}

.nord-shadow { box-shadow: var(--shadow-strong); }
.nord-border { border: 1px solid var(--border-default); }

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.section-background {
    position: absolute;
    inset: 0;
    opacity: 0.03;
}

.section-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-4);
}

.section-header p {
    font-size: var(--font-size-body-large);
    color: var(--color-text-secondary);
    max-width: 36rem;
    margin: 0 auto;
}

/* Decorative section divider - Copper accent */
.section-divider {
    width: 3rem;
    height: 3px;
    background: var(--color-primary);
    margin: 0 auto var(--spacing-6);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.service-card {
    height: 100%;
    padding: var(--spacing-10);
    border-radius: var(--radius-lg);
    background: var(--color-surface-primary);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(212, 168, 75, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-6);
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

.service-card h3 {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-headline-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-3);
}

.service-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-16);
    align-items: center;
    margin-bottom: var(--spacing-24);
}

.product-section:nth-child(even) {
    direction: rtl;
}

.product-section:nth-child(even) > * {
    direction: ltr;
}

.product-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    background: var(--color-surface-primary);
}

.product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-1) var(--spacing-3);
    border-radius: var(--radius-full);
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-body-small);
    letter-spacing: var(--font-tracking-wide);
    text-transform: uppercase;
}

.status-badge.available {
    background: rgba(76, 175, 80, 0.12);
    color: var(--color-success);
}

.status-badge.preview {
    background: rgba(212, 168, 75, 0.12);
    color: var(--color-primary);
}

.status-badge.coming-soon {
    background: rgba(255, 167, 38, 0.12);
    color: var(--color-warning);
}

.status-badge.paused {
    background: var(--color-surface-elevated);
    color: var(--color-text-tertiary);
}

.status-badge.rnd {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════════════════════ */

.timeline-container {
    position: relative;
}

.timeline-line-vertical {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg,
        var(--color-primary),
        rgba(212, 168, 75, 0.5),
        rgba(212, 168, 75, 0.3)
    );
    opacity: 0.4;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-12);
    z-index: 2;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0.875rem;
    height: 0.875rem;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    border: 3px solid var(--color-surface-primary);
    box-shadow: var(--shadow-medium);
}

.timeline-content {
    background: var(--color-surface-primary);
    padding: var(--spacing-8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--border-default);
    position: relative;
    z-index: 5;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(212, 168, 75, 0.2);
}

/* Phase Headers */
.phase-header {
    position: relative;
    z-index: 10;
    background: var(--color-surface-primary);
    padding: var(--spacing-6) var(--spacing-10);
    margin: 0 auto var(--spacing-8);
    max-width: fit-content;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--border-default);
}

.phase-header.phase-1 {
    background: linear-gradient(135deg, var(--color-surface-accent-warm-1) 0%, var(--color-surface-primary) 100%);
    border-color: rgba(212, 168, 75, 0.25);
}

.phase-header.phase-2 {
    background: linear-gradient(135deg, var(--color-surface-accent-warm-2) 0%, var(--color-surface-primary) 100%);
    border-color: rgba(212, 168, 75, 0.20);
}

.phase-header.phase-3 {
    background: linear-gradient(135deg, var(--color-surface-accent-warm-3) 0%, var(--color-surface-primary) 100%);
    border-color: rgba(212, 168, 75, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.profile-card {
    background: var(--color-surface-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    border: 1px solid var(--border-default);
    transition: all var(--transition-base);
    text-align: center;
}

.profile-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.profile-image {
    width: 7rem;
    height: 7rem;
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-strong);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.bg-primary {
    background: linear-gradient(135deg, #1A1A1A 0%, #242424 100%);
    position: relative;
    overflow: hidden;
}

.bg-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(212, 168, 75, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(212, 168, 75, 0.08) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEXT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, #E8BD5D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GIF HOVER TO PLAY
   ═══════════════════════════════════════════════════════════════════════════ */

.gif-hover-play {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: block;
    max-height: 300px;
    border-radius: var(--radius-md);
    background: var(--color-surface-elevated);
}

.gif-hover-play::after {
    content: 'Hover to preview';
    position: absolute;
    bottom: var(--spacing-4);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    padding: var(--spacing-2) var(--spacing-5);
    border-radius: var(--radius-full);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-body-medium);
    font-weight: var(--font-weight-medium);
    opacity: 0.95;
    transition: all var(--transition-base);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-strong);
}

.gif-hover-play:hover::after {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
}

.gif-hover-play.playing::after {
    content: 'Playing...';
    opacity: 0;
}

.gif-hover-play img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.gif-hover-play:hover img {
    transform: scale(1.02);
}

/* CAD Copilot specific sizing */
img[src="CADCopilot.png"] {
    max-height: 280px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

input, select, textarea {
    font-family: var(--font-family-primary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.container-narrow {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

.container-wide {
    max-width: 76rem;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .timeline-line-vertical,
    .timeline-dot { display: none; }
    .timeline-item { margin-bottom: var(--spacing-8); }

    .product-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }

    .product-section:nth-child(even) {
        direction: ltr;
    }

    .gif-hover-play::after {
        content: 'Tap to preview';
        font-size: var(--font-size-body-small);
        padding: var(--spacing-2) var(--spacing-4);
    }

    .gif-hover-play.playing::after {
        content: 'Tap to pause';
        opacity: 1;
        background: var(--color-primary);
    }
}

@media (max-width: 640px) {
    .service-card { padding: var(--spacing-6); }

    .hero-content {
        padding: var(--spacing-4);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   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;
    }
}
