@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

/* Reset and clean typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif; /* Clean, scientific font */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #FAFAFA; /* Very light, clean grey/white */
    color: #333333;
}

ul {
  padding-left: 60px; /* Increases indentation beyond the browser default */
}

/* Base Header: Full screen, centered text, bottom nav */
#main-header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
    transition: all 0.5s ease-in-out;
    position: relative;
    border-bottom: 1px solid #EAEAEA;
}

#site-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #103B65;
    transition: all 0.5s ease-in-out;
}

#site-logo {
    max-height: 400px; /* Adjust this number to make the logo larger or smaller */
    width: auto;
    display: block;
}

#main-nav {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    transition: all 0.5s ease-in-out;
}

#main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

#main-nav a {
    text-decoration: none;
    color: #777777; /* A slightly lighter, flatter gray */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

#main-nav a:hover {
    color: #333333; /* Darkens slightly on hover */
}

#main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: #3A6510; /* The leafy green Accent */
    transition: width 0.3s ease;
}

#main-nav a:hover::after {
    width: 100%;
    left: 0;
    background: #3A6510;
}

.centered-image-container {
    text-align: center;
}

.centered-image-container img {
    width: 100%;
    height: auto;
}

.centered-image-container-half {
    text-align: center;
}

.centered-image-container-half img {
    width: 50%;
    height: auto;
}

/* =========================================
   THE SCROLLED & INTERIOR HEADER STATE
   ========================================= */

/* Applies when the homepage is scrolled OR permanently on interior pages */
body.scrolled #main-header,
#main-header.interior-header {
    height: 80px;
    position: fixed;
    top: 0;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

body.scrolled #site-title,
#main-header.interior-header #site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

body.scrolled #main-nav,
#main-header.interior-header #main-nav {
    position: relative;
    bottom: 0;
    width: auto;
}

body.scrolled #site-logo {
    max-height: 70px;
}

body.scrolled #hero-section {
    display: none;
}

/* Content spacing */
.content-panel {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* =========================================
   REUSABLE INTERIOR PAGE TITLES
   ========================================= */

.interior-page-title {
    text-align: left;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #EAEAEA; /* A clean, structural divider line */
    width: 100%;
}

.interior-page-title h1 {
    font-size: 2rem;
    font-weight: 300; /* Keeps the text light and clean */
    color: #103B65; /* The Clinical Deep Blue accent */
    letter-spacing: 2px;
    margin: 0;
    text-align: left;
}

/* =========================================
   ABOUT PAGE: DYNAMIC FAQ STYLES
   ========================================= */

.about-container {
    padding-top: 120px; /* Clears the sticky header */
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden; /* Prevents horizontal scrollbars during animations */
}

/* The invisible box holding each Q&A pair */
.qa-block {
    min-height: 80vh; /* Ensures plenty of scrolling space between questions */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

/* The Question: Initial Massive State */
.dynamic-question {
    font-size: 4rem;
    font-weight: 300;
    color: #103B65; /* The clinical accent color */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); /* Ultra-smooth lab-like transition */
}

/* The Answer: Initial Hidden State */
.dynamic-answer {
    opacity: 0;
    max-width: 65%;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555555;
    transform: translateY(40px); /* Starts slightly pushed down */
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.2s; /* The 0.2s adds a slight delay after the question moves */
    margin-bottom: 2rem;
}

.dynamic-answer p {
    margin-bottom: 1.5rem; 
}

.dynamic-answer p:last-child {
    margin-bottom: 0;
}

/* --- ALTERNATING LAYOUT LOGIC --- */

/* Left Question Layout */
.left-question .dynamic-question { left: 10%; text-align: left; }
.left-question .dynamic-answer { margin-left: auto; margin-right: 5%; text-align: left; }

/* Right Question Layout */
.right-question .dynamic-question { right: 10%; text-align: right; }
.right-question .dynamic-answer { margin-right: auto; margin-left: 5%; text-align: left; }


/* =========================================
   THE "ACTIVE" SCROLLED STATE (Triggered by JS)
   ========================================= */

/* What happens to the question when you scroll to it */
.qa-block.active .dynamic-question {
    font-size: 1.8rem;
    font-weight: 700;
    top: 15%; 
    max-width: 25%; /* Forces the question to wrap and prevents it from bleeding into the answer */
    line-height: 1.3; /* Tightens the spacing when the question breaks onto multiple lines */
}

/* Force Left/Right alignment in the active state */
.left-question.active .dynamic-question { left: 5%; }
.right-question.active .dynamic-question { right: 5%; }

/* What happens to the answer when you scroll to it */
.qa-block.active .dynamic-answer {
    opacity: 1;
    transform: translateY(0); /* Slides up into place */
    margin-bottom: 2rem !important; 
    display: block;
}

.qa-block .dynamic-answer p:last-child {
    margin-bottom: 0 !important;
}

/* =========================================
   WHAT WE DO PAGE: SERVICES STYLES
   ========================================= */

.interior-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 2rem 4rem 2rem; /* Accounts for sticky header */
    flex-grow: 1;
}

/* Intro Content Spacing & Typography */
.intro-content {
    margin-bottom: 4rem; /* Adds disciplined whitespace before the service blocks begin */
}

.intro-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 1.5rem; /* Restores the blank line between paragraphs */
}

/* Centered Graphics */
.centered-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0; /* Creates 3rem of whitespace above and below the graphics */
}

.centered-image-container img {
    max-width: 100%;
    height: auto;
    /* Optional: Add a subtle border or shadow if you want the sketches bounded */
    /* border: 1px solid #e0e0e0; */
}

.service-block {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* The 33% / 66% Split */
.service-image-container {
    flex: 1; /* Represents 1 part of the available space */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    border-radius: 4px;
}

.service-text-container {
    flex: 2; /* Represents 2 parts of the available space */
}

.service-text-container {
    flex: 0 0 66%;
}

.service-text-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #103B65; /* Clinical Deep Blue Accent */
}

/* The "Read More" Toggle */
.read-more-toggle {
    color: #888888;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: color 0.2s ease;
}

.read-more-toggle:hover {
    color: #103B65;
}

/* Hidden Expanded Content */
.service-expanded-content {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eeeeee;
}

.service-expanded-content p {
    margin-bottom: 2rem;
}

/* Enquire Button */
.enquire-btn {
    display: inline-block;
    background-color: #103B65;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.enquire-btn:hover {
    background-color: #3A6510; /* Flips to leafy green on hover */
}

/* =========================================
   HOMEPAGE: HERO SECTION
   ========================================= */
#hero-section {
    height: 100vh; /* Takes up 100% of the viewport height */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF
}

.hero-container {
    text-align: center;
    padding: 0 20px;
}

.hero-logo {
    max-width: 80%; /* Ensures the logo scales down on mobile */
    max-height: 50vh; /* Prevents it from getting absurdly tall on massive screens */
    width: auto;
    display: block;
    margin: 0 auto;
}

/* =========================================
   HOMEPAGE: ANNOTATION SECTION
   ========================================= */

.annotation-section {
    /* We make this section 400% the height of the screen so the user has plenty of room to "scroll" through the timeline */
    min-height: 100vh; /* Changed from 400vh */ 
    background-color: #ffffff;
    position: relative;
}

.sticky-container {
    height: 100vh; /* Locks to the screen height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.firm-name {
    font-size: 5rem;
    font-weight: 700;
    color: #333333;
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.note {
    font-family: 'Caveat', cursive;
    color: #103B65; /* Schematic Blue */
    font-size: 2rem;
    position: absolute;
    opacity: 0; /* Hidden by default until GSAP takes over */
    max-width: 350px;
    line-height: 1.2;
    z-index: 5;
}

/* Base positioning for the notes so they hover around the words */
.note-the {
    top: 25%;
    left: 15%;
    color: #3A6510; /* Leafy Green */
}

.note-rhetorical {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%); /* Centers it under the word */
    text-align: center;
    color: #65103A; /* Plum */
}

.note-lab {
    top: 30%;
    right: 15%;
    text-align: right;
}

/* =========================================
   HOMEPAGE: QUESTIONS SECTION
   ========================================= */

.questions-section {
    min-height: 100vh; /* Changed from 500vh */
    background-color: #ffffff; /* Or whatever background color you prefer */
    position: relative;
}

.questions-container {
    flex-direction: column; /* Stacks the prompt above the endings */
    text-align: center;
    padding: 0 2rem;
}

.question-prompt {
    font-size: 3rem;
    color: #333333;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Container for the rotating phrases */
.question-endings {
    position: relative;
    height: 200px; /* Gives enough height for the longest paragraph to wrap */
    width: 100%;
    max-width: 800px;
}

.ending {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 2.5rem;
    font-weight: 700;
    opacity: 0; /* Hidden by default */
    line-height: 1.3;
}

/* Color Classes */
.color-green { color: #3A6510; }
.color-plum { color: #65103A; }
.color-blue { color: #103B65; }

/* The final punchline */
.punchline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #333333;
    width: 100%;
    max-width: 900px;
    opacity: 0; /* Hidden by default */
}

/* =========================================
   GLOBAL FOOTER
   ========================================= */
.site-footer {
    background-color: #103B65;
    color: #ffffff;
    padding: 1rem 5%;
    text-align: right;
    font-size: 0.9rem;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}

.site-footer a {
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .divider {
    margin: 0 15px;
    opacity: 0.5; /* Fades the divider slightly so the links remain the focal point */
}

/* =========================================
   MOBILE RESPONSIVE STYLES
========================================= */
@media (max-width: 768px) {
    /* Stack the service blocks vertically */
    .service-block {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .service-image-container img {
        max-width: 150px; /* Keeps the sketches from being too huge */
    }

    .service-text-container {
        flex: 1 1 100%; /* Overrides the 66% width */
    }

    /* Scale down GSAP Homepage Typography */
    .firm-name {
        font-size: 2.5rem;
        flex-wrap: wrap; 
        justify-content: center;
    }

    /* Shrink the annotations and tuck them closer to the center */
    .note {
        font-size: 1.2rem;
        max-width: 250px;
    }
    .note-the { left: 5%; top: 15%; }
    .note-rhetorical { bottom: 10%; left: 50%; }
    .note-lab { right: 5%; top: 20%; }

    /* Shrink the Questions Section text */
    .question-prompt { font-size: 2rem; }
    .ending, .punchline { font-size: 1.5rem; }

       /* Style the hamburger button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        position: absolute;
        right: 2rem;
        top: 1.5rem; /* Adjusts it to sit nicely in the scrolled header */
        z-index: 1100;
    }
    
    .menu-toggle .bar {
        width: 25px;
        height: 3px;
        background-color: #103B65;
    }

    /* Hide the normal menu and turn it into a full-screen overlay */
    #main-nav {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1050;
    }

    /* This class will be added by JavaScript when the hamburger is clicked */
     /* This forces the mobile menu to override the scrolled and interior states */
    #main-nav.mobile-active,
    body.scrolled #main-nav.mobile-active,
    #main-header.interior-header #main-nav.mobile-active {
        display: flex;
        position: fixed; /* Overrides the relative position */
        top: 0;
        bottom: auto; /* Overrides the bottom: 0 rule */
        left: 0;
        width: 100%; /* Overrides the width: auto rule */
        height: 100vh;
        background-color: #FFFFFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1050;
    }

    /* Constrains the large home page logo on small screens */
    #site-logo {
        max-width: 80vw; /* Keeps it strictly within 80% of the screen width */
        height: auto;    /* Lets the height scale down proportionally */
    }

    /* Stack the links vertically */
    #main-nav ul {
        flex-direction: column;
        padding-left: 0; /* Overrides your global 60px padding */
        align-items: center;
        gap: 2.5rem;
    }

    /* =========================================
       ABOUT PAGE: MOBILE Q&A FIX
    ========================================= */
    
    /* Allow the block to shrink and stack naturally */
    .qa-block {
        min-height: auto;
        padding: 4rem 1.5rem;
        justify-content: flex-start;
    }

    /* Un-anchor the question, make it full width, and position it above the answer */
    .qa-block .dynamic-question,
    .qa-block.active .dynamic-question,
    .left-question .dynamic-question,
    .right-question .dynamic-question,
    .left-question.active .dynamic-question,
    .right-question.active .dynamic-question {
        position: relative; /* Overrides absolute positioning so it doesn't overlap */
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        max-width: 100%;
        text-align: left; /* Aligns all mobile questions to the left for readability */
        margin-bottom: 2rem;
    }

    /* Adjust the massive desktop font sizes down for mobile */
    .qa-block .dynamic-question {
        font-size: 2.5rem;
    }
    .qa-block.active .dynamic-question {
        font-size: 2rem;
    }

    /* Make the answer full width and remove the side-squishing margins */
    .qa-block .dynamic-answer,
    .left-question .dynamic-answer,
    .right-question .dynamic-answer,
    .qa-block.active .dynamic-answer {
        max-width: 100%;
        margin: 0 !important; /* Overrides the left/right auto margins */
    }
} 