/* ============================================================
   RIRON.NET - Swiss Precision Meets Neon Voltage
   ============================================================ */

/* Color Palette */
:root {
    --color-yellow: #FFE66D;
    --color-red: #FF6B6B;
    --color-mint: #A8E6CF;
    --color-cyan: #4ECDC4;
    --color-purple: #6C5CE7;
    --color-navy: #25253E;
    --color-dark: #1A1A2E;
    --color-light: #E8E8F0;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --gutter: 24px;
    --grid-max-width: 1200px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-dark);
    color: var(--color-light);
    overflow-x: hidden;
    position: relative;
}

/* Noise Texture Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3CfeColorMatrix in='noise' type='saturate' values='0' /%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    mix-blend-mode: overlay;
}

/* Grid Overlay for Startup Animation */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    padding: var(--gutter);
    max-width: var(--grid-max-width);
    margin: 0 auto;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    animation: gridReveal 1.5s ease-out forwards;
}

@keyframes gridReveal {
    0% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0.03;
    }
}

.grid-overlay::before {
    content: '';
    position: absolute;
    top: var(--gutter);
    left: var(--gutter);
    right: var(--gutter);
    bottom: var(--gutter);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    width: calc(100% - 2 * var(--gutter));
    height: calc(100% - 2 * var(--gutter));
    pointer-events: none;
}

/* Grid Column Dividers */
.grid-overlay::after {
    content: '';
    position: absolute;
    top: var(--gutter);
    left: var(--gutter);
    right: var(--gutter);
    bottom: var(--gutter);
    background: linear-gradient(90deg,
        var(--color-cyan) 0%,
        var(--color-cyan) calc(8.333% - 12px),
        transparent calc(8.333% - 12px),
        transparent calc(8.333% + 12px),
        var(--color-cyan) calc(8.333% + 12px),
        var(--color-cyan) calc(16.666% - 12px),
        transparent calc(16.666% - 12px),
        transparent calc(16.666% + 12px),
        var(--color-cyan) calc(16.666% + 12px),
        var(--color-cyan) calc(25% - 12px),
        transparent calc(25% - 12px),
        transparent calc(25% + 12px),
        var(--color-cyan) calc(25% + 12px),
        var(--color-cyan) calc(33.333% - 12px),
        transparent calc(33.333% - 12px),
        transparent calc(33.333% + 12px),
        var(--color-cyan) calc(33.333% + 12px),
        var(--color-cyan) calc(41.666% - 12px),
        transparent calc(41.666% - 12px),
        transparent calc(41.666% + 12px),
        var(--color-cyan) calc(41.666% + 12px),
        var(--color-cyan) calc(50% - 12px),
        transparent calc(50% - 12px),
        transparent calc(50% + 12px),
        var(--color-cyan) calc(50% + 12px),
        var(--color-cyan) calc(58.333% - 12px),
        transparent calc(58.333% - 12px),
        transparent calc(58.333% + 12px),
        var(--color-cyan) calc(58.333% + 12px),
        var(--color-cyan) calc(66.666% - 12px),
        transparent calc(66.666% - 12px),
        transparent calc(66.666% + 12px),
        var(--color-cyan) calc(66.666% + 12px),
        var(--color-cyan) calc(75% - 12px),
        transparent calc(75% - 12px),
        transparent calc(75% + 12px),
        var(--color-cyan) calc(75% + 12px),
        var(--color-cyan) calc(83.333% - 12px),
        transparent calc(83.333% - 12px),
        transparent calc(83.333% + 12px),
        var(--color-cyan) calc(83.333% + 12px),
        var(--color-cyan) calc(91.666% - 12px),
        transparent calc(91.666% - 12px),
        transparent calc(91.666% + 12px),
        var(--color-cyan) calc(91.666% + 12px)
    );
    width: 1px;
    pointer-events: none;
    opacity: 0;
}

/* Main Container and Layout */
.site-container {
    position: relative;
    z-index: 1;
}

main {
    width: 100%;
}

.grid-wrapper {
    max-width: var(--grid-max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
}

/* Grid Column Utilities */
.grid-col-1 { grid-column: span 1; }
.grid-col-2 { grid-column: span 2; }
.grid-col-3 { grid-column: span 3; }
.grid-col-4 { grid-column: span 4; }
.grid-col-5 { grid-column: span 5; }
.grid-col-6 { grid-column: span 6; }
.grid-col-7 { grid-column: span 7; }
.grid-col-8 { grid-column: span 8; }
.grid-col-9 { grid-column: span 9; }
.grid-col-10 { grid-column: span 10; }
.grid-col-11 { grid-column: span 11; }
.grid-col-12 { grid-column: span 12; }

.grid-offset-1 { margin-left: calc(8.333% + var(--gutter) / 2); }
.grid-offset-2 { margin-left: calc(16.666% + var(--gutter)); }
.grid-offset-3 { margin-left: calc(25% + 1.5 * var(--gutter)); }

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

h1 {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 500;
}

p {
    line-height: 1.6;
    font-weight: 400;
}

.section-body {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    margin-top: 1.5rem;
}

.section-caption {
    font-size: clamp(0.875rem, 0.95vw, 1rem);
    font-weight: 300;
    color: var(--color-light);
    opacity: 0.8;
    font-style: italic;
    margin-top: 1.5rem;
}

.body-text {
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

.display-text {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-top: 1.5rem;
}

.display-font {
    font-family: var(--font-display);
    font-weight: 700;
}

.typography-label {
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-cyan);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.typography-demo {
    margin-bottom: 2rem;
}

/* Section Styling */
section {
    padding: 6rem var(--gutter);
    position: relative;
    overflow: hidden;
}

.hero-section {
    padding: 10rem var(--gutter) 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--color-yellow);
    text-shadow: 0 0 30px rgba(255, 230, 109, 0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    color: var(--color-cyan);
    font-family: var(--font-display);
    font-weight: 500;
}

.hero-content {
    animation: slideIn 0.8s ease-out;
}

.hero-accent {
    animation: slideInRight 0.8s ease-out 0.2s both;
}

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

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

/* Accent Blocks */
.accent-block {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.accent-block:hover {
    box-shadow: 0 0 40px currentColor;
    transform: scale(1.05);
}

.accent-yellow {
    background-color: var(--color-yellow);
}

.accent-red {
    background-color: var(--color-red);
}

.accent-mint {
    background-color: var(--color-mint);
}

.accent-cyan {
    background-color: var(--color-cyan);
}

.accent-purple {
    background-color: var(--color-purple);
}

/* Neon Grid Section */
.neon-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    margin-top: 2rem;
}

.neon-block {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.neon-block:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px currentColor;
}

.neon-label {
    font-family: var(--font-display);
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 600;
    color: var(--color-navy);
    text-align: center;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Philosophy Section */
.philosophy-section {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.5) 0%, rgba(37, 37, 62, 0.3) 100%);
}

.philosophy-content {
    display: contents;
}

/* City Section */
.city-section {
    background: rgba(108, 92, 231, 0.05);
}

.city-content {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.city-accent {
    animation: fadeIn 0.8s ease-out 0.5s both;
}

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

/* Typography Section */
.typography-section {
    background: rgba(74, 205, 196, 0.03);
}

/* Texture Section */
.texture-section {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.8) 0%, rgba(37, 37, 62, 0.5) 100%);
}

/* Revelation Section */
.revelation-section {
    background: rgba(255, 107, 107, 0.02);
}

.revelation-content {
    margin-bottom: 3rem;
}

.accent-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gutter);
    grid-column: 1 / -1;
}

.accent-row .accent-block {
    aspect-ratio: 0.8 / 1;
}

/* Interaction Section */
.interaction-section {
    background: rgba(168, 230, 207, 0.02);
}

.interactive-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gutter);
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.pulse-trigger {
    padding: 1.5rem 1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid;
    border-radius: 0;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.pulse-trigger[data-color="#FFE66D"] {
    color: var(--color-yellow);
    border-color: var(--color-yellow);
}

.pulse-trigger[data-color="#FF6B6B"] {
    color: var(--color-red);
    border-color: var(--color-red);
}

.pulse-trigger[data-color="#4ECDC4"] {
    color: var(--color-cyan);
    border-color: var(--color-cyan);
}

.pulse-trigger:hover {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px currentColor;
    transform: scale(1.05);
}

/* Conclusion Section */
.conclusion-section {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6) 0%, rgba(108, 92, 231, 0.1) 100%);
    padding: 8rem var(--gutter);
}

.conclusion-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--color-cyan);
    margin-bottom: 2rem;
}

.conclusion-text {
    font-size: clamp(1.1rem, 1.3vw, 1.25rem);
    color: var(--color-light);
    max-width: 600px;
}

/* Section Title */
.section-title {
    color: var(--color-yellow);
    text-shadow: 0 0 20px rgba(255, 230, 109, 0.2);
    margin-bottom: 1rem;
}

/* Parallax Effect */
[data-parallax] {
    position: relative;
    z-index: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --grid-max-width: 100%;
        --gutter: 16px;
    }

    section {
        padding: 4rem var(--gutter);
    }

    .hero-section {
        padding: 6rem var(--gutter) 4rem;
        min-height: auto;
    }

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

    .neon-block {
        aspect-ratio: auto;
        min-height: 150px;
    }

    .accent-row {
        grid-template-columns: 1fr;
    }

    .accent-row .accent-block {
        aspect-ratio: 1;
    }

    .interactive-blocks {
        grid-template-columns: 1fr;
    }

    .grid-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }

    .grid-col-8 {
        grid-column: span 6;
    }

    .grid-col-6 {
        grid-column: span 6;
    }

    .grid-col-4 {
        grid-column: span 6;
    }

    .grid-offset-2 {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --gutter: 12px;
    }

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

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

    .grid-col-8,
    .grid-col-6,
    .grid-col-4,
    .grid-col-3 {
        grid-column: span 1;
    }

    .hero-title {
        font-size: 2rem;
    }
}
