:root {
    /* Design Tokens */
    --color-bg: #FAF9F6;
    /* Adjusted to Broken White / Off-White */
    --color-text: #1d1d1f;
    /* Softer black */
    --color-accent: #C51D24;
    --color-grey-light: #EBEBEB;
    --color-grey-mid: #86868b;

    /* Irish Flag Colors */
    --color-irish-green: #169B62;
    --color-irish-white: #FFFFFF;
    --color-irish-orange: #FF883E;

    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    --grid-gap: 20px;
    --container-width: 1400px;

    --spacing-xs: 1rem;
    --spacing-sm: 2rem;
    --spacing-md: 4rem;
    --spacing-lg: 8rem;
    --spacing-xl: 12rem;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-stack);
    line-height: 1.4;
    overflow: hidden;
    /* No scrolling */
    height: 100vh;
    /* Fixed height */
    display: flex;
    flex-direction: column;
    cursor: default;
    /* Always show arrow cursor */
}

main {
    flex: 1;
    /* Takes available space */
    display: flex;
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    /* Horizontal Center */
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* Typography Scale */
h1 {
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

p {
    font-size: 1.125rem;
    color: #444;
    /* Slightly darker for better contrast on off-white */
}

.section-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-grey-mid);
    margin-bottom: var(--spacing-sm);
}

/* Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-md);
}

@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: transparent;
    /* Make transparent to show pattern */
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.site-header.scrolled {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fluid-nav {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.brand-wordmark {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.desktop-nav a {
    margin-left: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 500;
}

.desktop-nav a:hover {
    color: var(--color-accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.hero-section {
    padding: 0;
    min-height: auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-headline {
    max-width: 90%;
}

/* --- Hero Word Animations --- */

.active-word {
    display: inline-block;
    position: relative;
    cursor: default;
    /* Slow fade out for color and shadow (2s), fast snap back for position */
    transition: color 2s ease-out, text-shadow 2s ease-out, transform 0.3s ease;
    will-change: color, text-shadow;
}

/* 
   Hover States 
   (High Priority - Colors are vibrant)
   Logic: 
   1. !important overrides the running animation color.
   2. transition: 0s makes the "On Hover" change instant.
   3. When hover is lost, it falls back to .active-word transition (2s fade).
   4. Animation is NOT stopped, so it resumes smoothly.
*/

.word-look:hover {
    color: var(--color-irish-green) !important;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    /* Darker shadow */
    transform: translateY(-2px);
    transition: color 0s, text-shadow 0s, transform 0.3s;
}

.word-think:hover {
    color: var(--color-irish-white) !important;
    /* Stronger shadow for white text */
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
    transform: translateY(-2px);
    transition: color 0s, text-shadow 0s, transform 0.3s;
}

.word-decide:hover {
    color: var(--color-irish-orange) !important;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
    transition: color 0s, text-shadow 0s, transform 0.3s;
}

/* 
   Idle "Sea Wave" Animation 
   (Subtle, slow, sequential pulses of color)
*/

@keyframes waveLook {

    0%,
    100% {
        color: var(--color-text);
    }

    50% {
        color: rgba(22, 155, 98, 0.6);
    }

    /* Soft Green Haze */
}

@keyframes waveThink {

    0%,
    100% {
        color: var(--color-text);
    }

    50% {
        color: #A0A0A0;
    }

    /* Soft Silver/Grey to hint at White without vanishing */
}

@keyframes waveDecide {

    0%,
    100% {
        color: var(--color-text);
    }

    50% {
        color: rgba(255, 136, 62, 0.6);
    }

    /* Soft Orange Haze */
}

.word-look {
    animation: waveLook 6s ease-in-out infinite;
}

.word-think {
    animation: waveThink 6s ease-in-out infinite;
    animation-delay: 2s;
    /* Delays create the 'wave' motion across the sentence */
}

.word-decide {
    animation: waveDecide 6s ease-in-out infinite;
    animation-delay: 4s;
}

.amp {
    font-weight: 300;
    color: var(--color-grey-mid);
}

/* Expertise */
.expertise-section {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.service-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-grey-light);
    color: #555;
    transition: padding-left 0.3s ease;
}

.service-list li:hover {
    padding-left: 10px;
    color: var(--color-text);
}

/* Work */
.work-section {
    padding: var(--spacing-lg) 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: var(--spacing-md);
}

.case-study {
    cursor: pointer;
    position: relative;
}

.case-thumb {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--color-grey-light);
    margin-bottom: var(--spacing-xs);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.case-study:hover .case-thumb {
    transform: scale(0.98);
}

/* Abstract Gradients */
.red-channel {
    background: linear-gradient(135deg, #e3e3e3 0%, #f9f9f9 100%);
}

.blue-channel {
    background: linear-gradient(135deg, #eeeeee 0%, #e0e0e0 100%);
}

.dark-channel {
    background: #1a1a1a;
}

.case-meta h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.case-meta p {
    font-size: 0.9rem;
    color: var(--color-grey-mid);
}

/* About Section */
.about-section {
    padding: var(--spacing-lg) 0;
    background-color: #F0EFEB;
    /* Slightly darker warmth for section distinction */
}

.lead-text {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
}

.body-text {
    max-width: 600px;
    margin-bottom: var(--spacing-md);
}

.brand-stamp {
    width: 100px;
    transition: transform 0.5s ease;
}

.brand-stamp:hover {
    transform: rotate(15deg);
}

.stamp-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

/* Contact */
.contact-section {
    padding: var(--spacing-xl) 0;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-wrapper h2 {
    margin-bottom: var(--spacing-sm);
}

.big-link {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    border-bottom: 3px solid var(--color-text);
    padding-bottom: 10px;
    display: inline-block;
}

.big-link:hover {
    color: var(--color-irish-green);
    /* Subtle nod to brand functionality on contact */
    border-color: var(--color-irish-green);
}

.office-details {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.detail-col h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-grey-mid);
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-grey-mid);
}

.footer-links a {
    margin-left: var(--spacing-sm);
}

.footer-links a:hover {
    color: var(--color-accent);
}

/* Mobile */
@media (max-width: 768px) {
    .hero-section {
        padding-top: var(--spacing-md);
        min-height: auto;
    }

    .expertise-grid,
    .work-grid {
        grid-template-columns: 1fr;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }
}

.soon-label {
    font-size: 1.5rem;
    color: var(--color-grey-mid);
    margin-top: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    cursor: default;
    /* Arrow cursor instead of text beam */
}

.copyright {
    cursor: default;
    /* Arrow cursor for footer text */
}

.header-logo {
    height: 90px;
    /* Reduced from 120px */
    width: auto;
    display: block;
    max-width: 100%;
    /* Ensure it doesn't overflow on very small screens */
}

.brand-red {
    color: var(--color-accent);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    /* Bolder to match logo weight */
    font-size: 1.1em;
    /* Slightly larger visual balance */
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        /* Allow scrolling on mobile */
        height: auto;
        min-height: 100vh;
    }

    .header-logo {
        height: 60px;
        /* Adjusted for better proportion on small screens */
    }

    .hero-headline h1 {
        font-size: 3rem;
        /* Prevent headline from being too massive */
    }

    .hero-section {
        padding: 0 var(--spacing-xs);
        /* Ensure side padding */
    }

    /* Fix Footer Overlap */
    /* Fix Footer Overlap & Layout for Mobile */
    .footer-row {
        flex-direction: column;
        gap: 1.5rem;
        /* Space between links block and copyright */
        padding-bottom: 3rem;
        /* Extra for safe area */
        align-items: center;
        /* Center everything horizontally */
    }

    .footer-links {
        display: flex;
        flex-direction: row;
        /* Links side-by-side */
        flex-wrap: wrap;
        /* Wrap if screen is super tiny */
        justify-content: center;
        gap: 1.5rem;
        order: 1;
        /* Force Links to Top */
        width: 100%;
    }

    .footer-links a {
        margin-left: 0;
        font-size: 1rem;
        padding: 5px;
    }

    .copyright {
        order: 2;
        /* Force Copyright to Bottom */
        opacity: 0.8;
        width: 100%;
        justify-content: center;
        /* Center the internal flex content of copyright */
    }
}

.footer-logo-img {
    height: 22px;
    /* Slightly larger for balance */
    width: auto;
    display: block;
    /* Flex item behavior */
    position: relative;
    top: 3px;
    /* Visual adjustment downwards */
}

.copyright {
    display: flex;
    align-items: center;
    /* Perfect vertical centering */
    gap: 6px;
    /* Space between text and logo */
}

.copyright .brand-red {
    display: flex;
    /* Ensure span doesn't break alignment */
    align-items: center;
}

/* Background Pattern Test */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('celtic-pattern.jpg');
    background-size: 400px;
    background-repeat: repeat;
    opacity: 0.03;
    /* 3% opacity */
    pointer-events: none;
    z-index: 0;
    filter: invert(1);
}

.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}