/* CUBE CSS for Trifura - 2025 Brand Guidelines */

/* ========================
   COMPOSITION
   Layout and rhythm
   ======================== */

/* Custom Properties (Design Tokens) */
:root {
    /* Light mode design tokens */
    --color-text-primary: #0a0a0a;
    --color-text-secondary: #525252;
    --color-text-tertiary: #737373;
    --color-surface-primary: #ffffff;
    --color-surface-secondary: #fafafa;
    --color-surface-tertiary: #f0f0f0;
    --color-border: #e0e0e0;
    --color-accent: #1a73e8;
    --color-logo: #0a0a0a;
    
    /* Sophisticated gradients with subtle colors */
    --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #fafafa 100%);
    --gradient-section: linear-gradient(180deg, #ffffff 0%, #f5f7ff 25%, #fef7f0 75%, #ffffff 100%);
    --gradient-subtle: linear-gradient(135deg, #fafafa 0%, #f0f4ff 50%, #f8f0ff 100%);
    --gradient-glow: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, rgba(99, 102, 241, 0.06) 40%, transparent 70%);
    --gradient-hero: linear-gradient(135deg, #ffffff 0%, #f8f9ff 25%, #fef7f0 75%, #ffffff 100%);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Text scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    
    /* Flow space for rhythm */
    --flow-space: 1rem;
    
    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* Dark mode design tokens */
[data-theme="dark"] {
    --color-text-primary: #f5f5f5;
    --color-text-secondary: #d4d4d4;
    --color-text-tertiary: #a3a3a3;
    --color-surface-primary: #0a0a0a;
    --color-surface-secondary: #111111;
    --color-surface-tertiary: #1a1a1a;
    --color-border: #1a1a1a;
    --color-accent: #4285f4;
    --color-logo: #f5f5f5;
    
    --gradient-surface: linear-gradient(135deg, #111111 0%, #0f1419 50%, #0c0c0c 100%);
    --gradient-section: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 75%, #0a0a0a 100%);
    --gradient-subtle: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #2a2a3e 100%);
    --gradient-glow: radial-gradient(circle, rgba(66, 133, 244, 0.25) 0%, rgba(147, 51, 234, 0.15) 40%, transparent 70%);
    --gradient-hero: linear-gradient(135deg, #0a0a0a 0%, #0f1419 25%, #16213e 75%, #0a0a0a 100%);
}

/* Global resets and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

ul[role='list'],
ol[role='list'] {
    list-style: none;
}

html:focus-within {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    background: var(--color-surface-primary);
    transition: all 0.3s ease;
}

/* Composition: Flow */
.flow > * + * {
    margin-top: var(--flow-space, 1rem);
}

/* Composition: Wrapper */
.wrapper {
    max-width: 75rem;
    margin-inline: auto;
    padding-inline: var(--space-s);
}

/* Composition: Center */
.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Composition: Cluster */
.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    align-items: center;
}

/* Composition: Sidebar */
.sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-l);
    align-items: stretch;
}

.sidebar > :first-child {
    flex-basis: 20rem;
    flex-grow: 1;
}

.sidebar > :last-child {
    flex-basis: 0;
    flex-grow: 999;
    min-width: 50%;
}

/* Composition: Grid */
.grid {
    display: grid;
    gap: var(--space-l);
}

.grid[data-layout="50-50"] {
    grid-template-columns: 1fr 1fr;
}

/* Auto-fit grid */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--space-l);
}

/* ========================
   UTILITIES
   Single-purpose classes
   ======================== */

/* Background utilities */
.bg-surface-primary { background: var(--color-surface-primary); }
.bg-surface-secondary { background: var(--color-surface-secondary); }
.bg-surface-tertiary { background: var(--color-surface-tertiary); }

/* Gradient background utilities */
.bg-gradient-surface { background: var(--gradient-surface); }
.bg-gradient-section { background: var(--gradient-section); }
.bg-gradient-subtle { background: var(--gradient-subtle); }
.bg-gradient-hero { background: var(--gradient-hero); }

/* Text utilities */
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }

/* Font utilities */
.font-mono { font-family: var(--font-mono); }

/* Size utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

/* Weight utilities */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Spacing utilities */
.p-xs { padding: var(--space-xs); }
.p-s { padding: var(--space-s); }
.p-m { padding: var(--space-m); }
.p-l { padding: var(--space-l); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

.py-xs { padding-block: var(--space-xs); }
.py-s { padding-block: var(--space-s); }
.py-m { padding-block: var(--space-m); }
.py-l { padding-block: var(--space-l); }
.py-xl { padding-block: var(--space-xl); }
.py-2xl { padding-block: var(--space-2xl); }

/* Visual utilities */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.border { border: 1px solid var(--color-border); }

/* ========================
   BLOCKS
   Components
   ======================== */

/* Theme toggle block */
.theme-toggle {
    position: fixed;
    top: var(--space-m);
    right: var(--space-m);
    z-index: 1100;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: var(--space-xs) var(--space-s);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.theme-toggle:hover {
    background: var(--color-surface-tertiary);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.theme-icon {
    width: 14px;
    height: 14px;
}

/* Header block */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-s) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(10, 10, 10, 0.95);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo block */
.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-s);
    color: inherit;
}

.logo__lines {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
}

.logo__line {
    background: var(--color-logo);
    border-radius: 1.5px;
    transition: all 0.3s ease;
}

.logo__line--1 { width: 3px; height: 24px; }
.logo__line--2 { width: 3px; height: 32px; }
.logo__line--3 { width: 3px; height: 28px; }

.logo__wordmark {
    font-size: var(--text-xl);
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Navigation links */
.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-l);
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: var(--text-sm);
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

/* Button blocks */
.btn {
    padding: var(--space-xs) var(--space-m);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn--primary {
    background: var(--color-accent);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .btn--primary:hover {
    box-shadow: 0 10px 25px rgba(66, 133, 244, 0.25);
}

.btn--secondary {
    background: var(--color-surface-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-surface-tertiary);
    transform: translateY(-1px);
}

.btn--large {
    padding: var(--space-s) var(--space-l);
    font-size: var(--text-base);
    font-weight: 600;
}

/* Hero block */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 15%;
    width: 20rem;
    height: 20rem;
    background: var(--gradient-glow);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 30%;
    right: 20%;
    width: 15rem;
    height: 15rem;
    background: var(--gradient-glow);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.7;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero__title {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-s);
    line-height: 1.1;
}

.hero__tagline {
    font-size: var(--text-2xl);
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: var(--space-m);
}

.hero__description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .hero__image img {
    box-shadow: 0 25px 50px rgba(66, 133, 244, 0.15);
}

/* Section block */
.section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    max-width: 50rem;
    margin-inline: auto;
}

.section__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-m);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Card block */
.card {
    padding: var(--space-l);
    border-radius: var(--radius-lg);
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 20px 40px rgba(66, 133, 244, 0.1);
}

.card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-m);
    transition: all 0.3s ease;
}

.card__icon .lucide-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.card:hover .card__icon {
    transform: scale(1.1);
}

.card__title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-s);
}

.card__content {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Experience block */
.experience {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-2xl);
    align-items: center;
    max-width: 60rem;
    margin: 0 auto;
}

.experience__number {
    text-align: center;
}

.experience__big-number {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    line-height: 1;
}

.experience__label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.experience__text h2 {
    font-size: var(--text-3xl);
    font-weight: 600;
    margin-bottom: var(--space-m);
}

.experience__text p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Service features list */
.features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.features li {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
    padding-left: var(--space-m);
    position: relative;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
}

.features li .feature-icon {
    position: absolute;
    left: 0;
    width: 1rem;
    height: 1rem;
    color: var(--color-accent);
}

/* Quote block */
.quote {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    font-style: italic;
    color: var(--color-text-primary);
    margin-bottom: var(--space-m);
    max-width: 50rem;
    margin-inline: auto;
    line-height: 1.4;
    border-left: 4px solid var(--color-accent);
    padding-left: var(--space-l);
    text-align: left;
}

.quote__author {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Footer block */
.footer {
    background: var(--gradient-surface);
    padding: var(--space-2xl) 0 var(--space-l) 0;
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: var(--gradient-glow);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-l);
    margin-bottom: var(--space-l);
}

.footer__brand {
    max-width: 20rem;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    margin-bottom: var(--space-s);
}

.footer__brand p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: var(--text-sm);
}

.footer__column h4 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-s);
}

.footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__links li {
    margin-bottom: var(--space-xs);
}

.footer__links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color 0.2s ease;
}

.footer__links a:hover {
    color: var(--color-text-primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: var(--space-m);
    border-top: 1px solid var(--color-border);
    margin-bottom: var(--space-s);
}

.footer__left {
    flex: 1;
}

.footer__right {
    flex-shrink: 0;
}

.footer__copyright {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.footer__company-info {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

.footer__gdpr-notice {
    padding-top: var(--space-s);
    border-top: 1px solid var(--color-border);
}

.footer__gdpr-notice p {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

.footer__legal {
    display: flex;
    gap: var(--space-m);
}

.footer__legal a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__legal a:hover {
    color: var(--color-text-primary);
}

/* ========================
   EXCEPTIONS
   Context-specific overrides
   ======================== */

/* Large logo variant for hero */
.logo[data-size="large"] .logo__line--1 { width: 6px; height: 40px; }
.logo[data-size="large"] .logo__line--2 { width: 6px; height: 50px; }
.logo[data-size="large"] .logo__line--3 { width: 6px; height: 45px; }
.logo[data-size="large"] .logo__wordmark { font-size: var(--text-4xl); }

/* CTA section styling */
.section[data-variant="cta"] {
    background: var(--gradient-subtle);
    text-align: center;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-2xl) 0;
}

.section[data-variant="cta"] h2 {
    margin-bottom: var(--space-m);
}

.section[data-variant="cta"] p {
    margin-bottom: var(--space-xl);
}

/* Mobile responsive exceptions */
@media (max-width: 768px) {
    .hero__content {
        grid-template-columns: 1fr;
        gap: var(--space-l);
        text-align: center;
    }
    
    .experience {
        grid-template-columns: 1fr;
        gap: var(--space-l);
        text-align: center;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--space-m);
    }
    
    .footer__bottom {
        flex-direction: column;
        gap: var(--space-m);
    }
    
    .theme-toggle {
        position: static;
        margin: var(--space-m) auto var(--space-s) auto;
        display: block;
        width: fit-content;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .quote {
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--color-accent);
        padding-left: 0;
        padding-top: var(--space-m);
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding-inline: var(--space-xs);
    }
    
    .auto-grid {
        grid-template-columns: 1fr;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .grid[data-layout="50-50"] {
        grid-template-columns: 1fr;
    }
}