/*
Theme Name: Rekode
Theme URI: https://rekode.no
Author: Roy Walle
Author URI: https://rekode.no
Description: Modern, professional theme for Rekode - organizational diagnostics and trust-based leadership
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rekode
*/

/* ============================================
   CUSTOM PROPERTIES (CSS VARIABLES)
   ============================================ */
:root {
    /* Colors */
    --color-primary: #1F4E79;
    --color-primary-light: #2A6399;
    --color-primary-dark: #153A5C;
    --color-secondary: #AFC2CF;
    --color-background: #E1E8ED;
    --color-accent: #FF6B35;
    --color-text: #1A1A1A;
    --color-text-light: #4A4A4A;
    --color-white: #FFFFFF;
    --color-success: #28A745;
    --color-warning: #FFC107;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    
    /* Font Sizes */
    --fs-xs: 0.75rem;      /* 12px */
    --fs-sm: 0.875rem;     /* 14px */
    --fs-base: 1rem;       /* 16px */
    --fs-lg: 1.125rem;     /* 18px */
    --fs-xl: 1.25rem;      /* 20px */
    --fs-2xl: 1.5rem;      /* 24px */
    --fs-3xl: 1.875rem;    /* 30px */
    --fs-4xl: 2.25rem;     /* 36px */
    --fs-5xl: 3rem;        /* 48px */
    --fs-6xl: 3.75rem;     /* 60px */
    
    /* Spacing */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-2xl: 4rem;     /* 64px */
    --space-3xl: 6rem;     /* 96px */
    
    /* Layout */
    --container-width: 1200px;
    --container-padding: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-base: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

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

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

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

@media (max-width: 768px) {
    h1 { font-size: var(--fs-4xl); }
    h2 { font-size: var(--fs-3xl); }
    h3 { font-size: var(--fs-2xl); }
    h4 { font-size: var(--fs-xl); }
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
}

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

a:hover {
    color: var(--color-accent);
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer-bottom .fp-case__text {
    color: #ffffff !important;
}

.footer-bottom a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.footer-bottom a:hover {
    color: #ff6b35 !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

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

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

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

.bg-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.bg-secondary {
    background-color: var(--color-background);
}

.bg-white {
    background-color: var(--color-white);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: var(--fs-base);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

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

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: var(--fs-lg);
}

.btn-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-base);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.logo:hover {
    color: var(--color-accent);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: var(--fs-base);
    padding: 0.5rem 0;
    position: relative;
}

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

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

.main-nav a:hover {
    color: var(--color-accent);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--fs-2xl);
    color: var(--color-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        padding: var(--space-3xl) var(--space-lg);
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .main-nav a {
        font-size: var(--fs-lg);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.03) 49%, rgba(255, 255, 255, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.03) 49%, rgba(255, 255, 255, 0.03) 51%, transparent 52%);
    background-size: 40px 40px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    color: var(--color-white);
    font-size: var(--fs-6xl);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease;
}

.hero .tagline {
    font-size: var(--fs-2xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero .lead {
    font-size: var(--fs-lg);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero .btn-group {
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: var(--fs-4xl);
    }
    
    .hero .tagline {
        font-size: var(--fs-xl);
    }
}

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

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-base);
    transition: all var(--transition-base);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-3xl);
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.card h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.card p {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
    display: grid;
    gap: var(--space-xl);
}

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

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

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

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--fs-sm);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-links {
    list-style: none;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--fs-sm);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}
