:root {
    /* Colour Palette - Green & Red */
    --canvas-white: #F9FAF9; 
    --midnight-ink: #1A221E; 
    --brand-red: #D32F2F; 
    --brand-dark-red: #B71C1C; 
    --brand-green: #2E7D32; 
    --brand-light-green: #4CAF50; 
    --grid-mist: #D5DED9;
    --warm-highlight: #81C784;
    --muted-grey: #5A6B62;

    /* Typography */
    --font-heading: 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 8rem;

    /* Borders */
    --border-thin: 1px solid var(--grid-mist);
    --radius-sm: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--canvas-white);
    color: var(--midnight-ink);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: var(--space-sm);
    color: var(--muted-grey);
}

a {
    color: var(--brand-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--midnight-ink);
}

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

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: var(--space-md);
}

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

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

/* Header & Navigation */
header {
    background-color: rgba(249, 250, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-thin);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px; /* Extra slim header */
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 0.95rem; /* Smaller to fit layout */
    font-weight: bold;
    color: var(--midnight-ink);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center; /* Ensures the button centers vertically with text links */
    list-style: none;
    gap: 0.5rem; /* Tighter gap to fit all items */
}

.nav-links a {
    font-size: 0.75rem; /* Smaller text */
    color: var(--midnight-ink);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--brand-red);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--midnight-ink);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--midnight-ink);
    color: var(--canvas-white);
}

.btn-primary:hover {
    background-color: var(--brand-red);
    color: var(--canvas-white);
}

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

.btn-secondary:hover {
    background-color: var(--grid-mist);
}

.header-btn {
    padding: 0.25rem 0.6rem !important; /* Compact button padding */
    font-size: 0.7rem !important; /* Smaller button text to fit */
    color: var(--canvas-white) !important;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

/* Pixel Framework Aesthetic */
.pixel-border {
    position: relative;
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--grid-mist) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-mist) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    opacity: 0.5;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: var(--border-thin);
}

.hero-content {
    max-width: 800px;
}

.hero-actions {
    margin-top: var(--space-md);
    display: flex;
    gap: 1rem;
}

.abstract-graphic {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
    opacity: 0.15;
    z-index: -1;
}

.pixel {
    background-color: var(--midnight-ink);
}
.pixel.p-red { background-color: var(--brand-red); }
.pixel.p-dark-red { background-color: var(--brand-dark-red); }
.pixel.p-light-green { background-color: var(--brand-light-green); }

/* Interactive Selector */
.selector-section {
    background-color: var(--midnight-ink);
    color: var(--canvas-white);
}

.selector-section h2 {
    color: var(--canvas-white);
}

.selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: var(--space-md);
}

.selector-btn {
    background: transparent;
    border: 1px solid var(--grid-mist);
    color: var(--canvas-white);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.selector-btn:hover, .selector-btn.active {
    background: var(--brand-red);
    border-color: var(--brand-red);
}

.selector-content-area {
    min-height: 150px;
    padding: var(--space-md);
    border: 1px solid var(--grid-mist);
    background: rgba(255,255,255,0.05);
}

.selector-panel {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.selector-panel.active {
    display: block;
}

.selector-panel p {
    color: var(--grid-mist);
}

/* Digital Experience Map */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--grid-mist);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 5px;
    width: 32px;
    height: 32px;
    background: var(--canvas-white);
    border: 2px solid var(--brand-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--midnight-ink);
    z-index: 2;
}

/* Cards */
.card {
    border: var(--border-thin);
    padding: var(--space-md);
    background: var(--canvas-white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card-image {
    width: calc(100% + (var(--space-md) * 2));
    margin: -var(--space-md) -var(--space-md) var(--space-sm) -var(--space-md);
    height: 200px;
    object-fit: cover;
    max-width: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--midnight-ink);
}

.card-body {
    flex-grow: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: var(--border-thin);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-red);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--midnight-ink);
    color: var(--canvas-white);
    padding: var(--space-lg) 0 var(--space-md);
    border-top: 4px solid var(--brand-red);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--grid-mist);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--canvas-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--muted-grey);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--canvas-white);
    border-top: var(--border-thin);
    padding: var(--space-sm) 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.cookie-text p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border: var(--border-thin);
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.cookie-btn.primary {
    background: var(--midnight-ink);
    color: var(--canvas-white);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

/* Page Headers */
.page-header {
    background-color: var(--midnight-ink);
    color: var(--canvas-white);
    padding: var(--space-xl) 0 var(--space-lg);
    border-bottom: 4px solid var(--brand-red);
}

.page-header h1 {
    color: var(--canvas-white);
}

.page-header p {
    color: var(--grid-mist);
    font-size: 1.2rem;
    max-width: 700px;
}

/* Content Blocks */
.content-block {
    margin-bottom: var(--space-md);
}

.content-block h2 {
    color: var(--brand-dark-red);
}

/* Lists */
.styled-list {
    list-style: none;
    margin-bottom: var(--space-sm);
}

.styled-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted-grey);
}

.styled-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    color: var(--brand-red);
    font-size: 0.8rem;
    top: 2px;
}

/* Responsive Overrides */
@media (max-width: 1199px) {
    .abstract-graphic { opacity: 0.05; right: -50px; }
}

@media (max-width: 991px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 50px; /* Aligned with new 50px slim header height */
        left: 0;
        width: 100%;
        background: var(--canvas-white);
        flex-direction: column;
        padding: var(--space-sm);
        border-bottom: var(--border-thin);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .abstract-graphic { display: none; }
}

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero { min-height: 60vh; }
}