/* ============================================
   Korrelated, LLC — Main Stylesheet
   ============================================ */

/* --- Font --- */
@font-face {
    font-family: 'Audiowide';
    src: url('../assets/fonts/Audiowide/Audiowide-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Custom Properties --- */
:root {
    --burnt-orange: #AF5823;
    --burnt-orange-light: #c76f3a;
    --burnt-orange-dark: #8f471c;
    --taupe: #5E524B;
    --taupe-light: #7a6d65;
    --bg-primary: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #6a6a6a;
    --font-heading: 'Audiowide', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --max-width: 1100px;
    --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--burnt-orange);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--burnt-orange-light);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(94, 82, 75, 0.15);
    transition: background var(--transition);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo img {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--burnt-orange);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all var(--transition);
    border-radius: 1px;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 64px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(175, 88, 35, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 320px;
    max-width: 80vw;
    margin: 0 auto 2rem;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-block;
    padding: 0.75rem 2.25rem;
    border: 1px solid var(--burnt-orange);
    color: var(--burnt-orange);
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    border-radius: 2px;
    transition: all var(--transition);
}

.hero-cta:hover {
    background: var(--burnt-orange);
    color: #fff;
}

/* ============================================
   About Section
   ============================================ */
#about {
    background: var(--bg-secondary);
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--burnt-orange);
    margin-bottom: 1rem;
}

.section-heading {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text {
    max-width: 720px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
}

.about-text p + p {
    margin-top: 1.25rem;
}

/* ============================================
   Process Section
   ============================================ */
#process {
    background: var(--bg-primary);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    padding: 2rem 1.25rem;
    border: 1px solid rgba(94, 82, 75, 0.2);
    border-radius: 4px;
    transition: border-color var(--transition), transform var(--transition);
}

.process-step:hover {
    border-color: var(--burnt-orange);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--burnt-orange);
    margin-bottom: 0.75rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Connector lines between steps (desktop) */
.process-connector {
    display: none;
}

/* --- Process Expand Toggle --- */
.process-expand {
    text-align: center;
    margin-top: 2.5rem;
}

.process-expand-toggle {
    background: none;
    border: none;
    color: var(--burnt-orange);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition);
}

.process-expand-toggle:hover {
    color: var(--burnt-orange-light);
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.process-expand-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

/* --- Process Detail (Expanded Content) --- */
.process-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.process-detail.open {
    max-height: 2000px;
}

.process-detail-inner {
    padding-top: 3rem;
    max-width: 720px;
    margin: 0 auto;
}

.detail-section {
    margin-bottom: 2.5rem;
}

.detail-section h3 {
    color: var(--burnt-orange);
    margin-bottom: 0.75rem;
}

.detail-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 0.75rem;
}

.detail-section em {
    color: var(--text-primary);
    font-style: italic;
}

.detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1rem;
}

.detail-section ul li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.85;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.detail-section ul li::before {
    content: '\2013';
    position: absolute;
    left: 0;
    color: var(--burnt-orange);
}

.detail-about {
    padding-top: 2rem;
    border-top: 1px solid rgba(94, 82, 75, 0.2);
}

/* ============================================
   Products Section
   ============================================ */
#products {
    background: var(--bg-secondary);
}

.product-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
    padding: 2.5rem;
    border: 1px solid rgba(94, 82, 75, 0.2);
    border-radius: 4px;
    transition: border-color var(--transition);
}

.product-card:hover {
    border-color: var(--burnt-orange);
}

.product-logo {
    flex-shrink: 0;
    width: 180px;
}

.product-info h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.product-link {
    display: inline-block;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    color: var(--burnt-orange);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.product-link:hover {
    border-bottom-color: var(--burnt-orange);
}

/* ============================================
   Contact Section
   ============================================ */
#contact {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-top: 2.5rem;
    align-items: start;
}

.contact-intro p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.contact-email-cta {
    margin-top: 1.5rem;
}

.email-link {
    color: var(--burnt-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    font-weight: 500;
}

.email-link:hover {
    color: var(--burnt-orange-light);
    text-decoration-thickness: 2px;
}

.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid rgba(94, 82, 75, 0.25);
    border-radius: 2px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--burnt-orange);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-submit {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    background: var(--burnt-orange);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background var(--transition);
}

.form-submit:disabled {
    background: var(--taupe);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-submit:hover:not(:disabled) {
    background: var(--burnt-orange-light);
}

.form-success {
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--burnt-orange);
    border-radius: 2px;
    text-align: center;
}

.form-success p {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.form-error,
[data-fs-error] {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(94, 82, 75, 0.15);
    padding: 2.5rem 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-divider {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: .5;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

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

/* ============================================
   Legal Pages (Privacy & Terms)
   ============================================ */
.legal-page {
    padding-top: calc(64px + 4rem);
    padding-bottom: 4rem;
    min-height: 100vh;
    background: var(--bg-primary);
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-page .effective-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.2rem;
    color: var(--burnt-orange);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-page p,
.legal-page li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-page ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.4rem;
}

.legal-page h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-top: 1.8rem;
    margin-bottom: 0.75rem;
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
}

.legal-page th,
.legal-page td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(94, 82, 75, 0.25);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legal-page th {
    color: var(--burnt-orange);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legal-page a {
    color: var(--burnt-orange);
    text-decoration: underline;
    text-decoration-color: rgba(175, 88, 35, 0.3);
    text-underline-offset: 2px;
}

.legal-page a:hover {
    text-decoration-color: var(--burnt-orange);
}

/* ============================================
   Parallax Backgrounds
   ============================================ */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    right: 0;
    bottom: -20%;
    z-index: 0;
    will-change: transform;
}

.parallax-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Per-section background images (desktop) */
.parallax-bg--hero    { background-image: url('../assets/images/backgrounds/hero-bg.jpg'); }
.parallax-bg--about   { background-image: url('../assets/images/backgrounds/about-bg.jpg'); }
.parallax-bg--process { background-image: url('../assets/images/backgrounds/process-bg.jpg'); }
.parallax-bg--products{ background-image: url('../assets/images/backgrounds/products-bg.jpg'); }
.parallax-bg--contact { background-image: url('../assets/images/backgrounds/contact-bg.jpg'); }

/* Per-section overlays */
#hero .parallax-overlay {
    background: linear-gradient(
        180deg,
        rgba(17, 17, 17, 0.65) 0%,
        rgba(17, 17, 17, 0.8) 50%,
        rgba(17, 17, 17, 0.92) 100%
    );
}

#about .parallax-overlay {
    background: rgba(26, 26, 26, 0.84);
}

#process .parallax-overlay {
    background: rgba(17, 17, 17, 0.86);
}

#products .parallax-overlay {
    background: rgba(26, 26, 26, 0.84);
}

#contact .parallax-overlay {
    background: linear-gradient(
        180deg,
        rgba(17, 17, 17, 0.72) 0%,
        rgba(17, 17, 17, 0.88) 100%
    );
}

/* Content sits above parallax backgrounds */
.parallax-section > .container,
.parallax-section > .hero-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   Floating Geometric Elements
   ============================================ */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-shape {
    position: absolute;
    will-change: transform;
}

.float-shape--1 { top: 12%; left: 6%; }
.float-shape--2 { top: 30%; right: 4%; }
.float-shape--3 { top: 52%; left: 3%; }
.float-shape--4 { top: 72%; right: 8%; }
.float-shape--5 { top: 88%; left: 10%; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    section { padding: 4rem 0; }

    /* Disable parallax on mobile */
    .parallax-bg {
        top: 0;
        bottom: 0;
        transform: none !important;
    }

    /* Smaller images for mobile */
    .parallax-bg--hero    { background-image: url('../assets/images/backgrounds/hero-bg-mobile.jpg'); }
    .parallax-bg--about   { background-image: url('../assets/images/backgrounds/about-bg-mobile.jpg'); }
    .parallax-bg--process { background-image: url('../assets/images/backgrounds/process-bg-mobile.jpg'); }
    .parallax-bg--products{ background-image: url('../assets/images/backgrounds/products-bg-mobile.jpg'); }
    .parallax-bg--contact { background-image: url('../assets/images/backgrounds/contact-bg-mobile.jpg'); }

    .floating-elements {
        display: none;
    }

    /* Nav mobile */
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(17, 17, 17, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    /* Hero */
    .hero-logo {
        width: 240px;
    }

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

    /* Process */
    .process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Product */
    .product-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .product-logo {
        width: 140px;
        margin: 0 auto;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }

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

    .container {
        padding: 0 1.25rem;
    }
}
