/* CSS Variables for Color Palette */
:root {
    --primary-red: #E63946;
    --primary-blue: #457B9D;
    --primary-yellow: #F4D35E;
    --primary-black: #0A0A0A;
    --primary-white: #F8F9FA; /* Slightly off-white for contrast */
    --accent-green: #2A9D8F; /* A vibrant green for secondary accents if needed */
    --text-color: var(--primary-black);
    --bg-color: var(--primary-white);

    /* Fonts */
    --font-heading-bangers: 'Bangers', cursive;
    --font-heading-luckiestguy: 'Luckiest Guy', cursive;
    --font-body-comicneue: 'Comic Neue', cursive;
}

/* Base Styles & Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body-comicneue);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden; /* Prevent horizontal scroll from overlapping elements */
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    background-color: var(--primary-yellow);
    color: var(--primary-black);
    padding: 8px;
    font-family: var(--font-body-comicneue);
    text-decoration: none;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
}

/* Comic Body - Halftone Texture */
.comic-body {
    background-image: radial-gradient(var(--primary-white) 15%, transparent 15%), radial-gradient(var(--primary-white) 15%, transparent 15%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    background-color: var(--bg-color);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading-bangers);
    text-transform: uppercase;
    color: var(--primary-black);
    margin-bottom: 0.5em;
    line-height: 1.1;
    text-shadow: 2px 2px 0 var(--primary-yellow), 4px 4px 0 var(--primary-red);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: 0.1em;
    color: var(--primary-blue);
    text-shadow: 3px 3px 0 var(--primary-red), 6px 6px 0 var(--primary-yellow);
}

h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    letter-spacing: 0.08em;
    color: var(--primary-red);
    text-shadow: 2px 2px 0 var(--primary-black), 4px 4px 0 var(--primary-yellow);
}

h3 {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    text-shadow: 1px 1px 0 var(--primary-black), 2px 2px 0 var(--primary-red);
}

p, ul, ol, blockquote, .section-description, .stat-description, .team-role, .portfolio-category, .modal-role {
    font-family: var(--font-body-comicneue);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-color);
    margin-bottom: 1em;
}

.author {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--primary-red);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 700;
}

a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    z-index: 2; /* Ensure it overlaps panels */
}

.section-subtitle {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.8rem, 5vw, 3rem);
    text-align: center;
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--primary-yellow);
    text-shadow: 2px 2px 0 var(--primary-red), 4px 4px 0 var(--primary-black);
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2em auto;
}

.button-primary, .button-secondary {
    display: inline-block;
    padding: 12px 25px;
    border: 3px solid var(--primary-black);
    border-radius: 8px;
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    letter-spacing: 0.05em;
    color: var(--primary-black);
    text-shadow: 1px 1px 0 var(--primary-white);
    position: relative;
    z-index: 1;
}

.button-primary {
    background-color: var(--primary-red);
    box-shadow: 6px 6px 0 var(--primary-yellow);
}

.button-secondary {
    background-color: var(--primary-blue);
    box-shadow: 6px 6px 0 var(--primary-red);
}

.button-primary:hover, .button-secondary:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--primary-yellow);
    background-color: var(--primary-red); /* Keep primary red on hover for both */
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}

/* Comic Panel Base Style */
.comic-panel {
    background-color: var(--bg-color);
    border: 4px solid var(--primary-black);
    padding: 25px;
    margin: 15px; /* Exaggerated spacing */
    box-shadow: 10px 10px 0 var(--primary-black);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 10px;
}

.panel-layout {
    padding: 50px 0;
    margin-bottom: 40px; /* Exaggerated spacing between sections */
    position: relative;
    z-index: 0;
}

.panel-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="1" cy="1" r="1" fill="%23e0e0e0"/></svg>');
    background-size: 10px 10px;
    opacity: 1;.5;
    z-index: -1;
}

/* Pop Effects */
.pop-effect {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.pop-effect:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 12px 12px 0 var(--primary-black) !important;
}

/* Speech Bubble Effect */
.speech-bubble {
    background-color: var(--primary-yellow);
    border: 4px solid var(--primary-black);
    padding: 15px 30px;
    border-radius: 50% / 20%; /* Oval shape */
    display: inline-block;
    position: relative;
    text-align: center;
    margin-bottom: 2em;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    animation: bounceSpeech 1s infinite alternate ease-in-out;
    font-family: var(--font-heading-bangers);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--primary-blue);
    text-shadow: 2px 2px 0 var(--primary-red), 4px 4px 0 var(--primary-black);
    letter-spacing: 0.08em;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid var(--primary-black);
    transform: translateX(-50%);
    filter: drop-shadow(0px 0px 0px var(--primary-black)); /* To align with border-top shadow */
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 17px solid transparent;
    border-right: 17px solid transparent;
    border-top: 17px solid var(--primary-yellow);
    transform: translateX(-50%);
    z-index: 1; /* Above the black border part */
}

@keyframes bounceSpeech {
    from { transform: translateX(-50%) translateY(0); }
    to { transform: translateX(-50%) translateY(-10px); }
}

/* Header */
.main-header {
    background-color: var(--primary-blue);
    border-bottom: 4px solid var(--primary-black);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-white);
    text-shadow: 2px 2px 0 var(--primary-black);
    padding: 5px 10px;
    background-color: var(--primary-red);
    border: 3px solid var(--primary-black);
    border-radius: 5px;
    display: block;
    line-height: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.main-nav a {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    color: var(--primary-white);
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-shadow: 1px 1px 0 var(--primary-black);
}

.main-nav a:hover {
    background-color: var(--primary-yellow);
    color: var(--primary-black);
    transform: scale(1.1);
    text-decoration: none;
    text-shadow: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Account for fixed header */
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) brightness(0.8);
}

.hero-grid-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: center;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-panel {
    background-color: rgba(255, 255, 255, 0.9);
    border: 4px solid var(--primary-black);
    padding: 30px;
    box-shadow: 15px 15px 0 var(--primary-red);
    border-radius: 15px;
    position: relative;
    z-index: 2;
}

.hero-panel-left {
    grid-column: 1 / 2;
    transform: rotate(-3deg);
    margin-right: -50px; /* Asymmetrical positioning */
    z-index: 3;
}

.hero-panel-right {
    grid-column: 2 / 3;
    transform: rotate(3deg);
    margin-left: -50px; /* Asymmetrical positioning */
    z-index: 2;
    text-align: center;
}

.hero-visual {
    max-width: 100%;
    height: auto;
    border: 3px solid var(--primary-black);
    box-shadow: 8px 8px 0 var(--primary-blue);
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: flex-start;
    margin-top: 2em;
}

.about-text-panel {
    background-color: var(--primary-yellow);
    border: 4px solid var(--primary-black);
    padding: 30px;
    box-shadow: 10px 10px 0 var(--primary-blue);
    border-radius: 10px;
    transform: rotate(-2deg);
    margin-top: 30px;
}

.about-stats-panel {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Stacks vertically always */
    gap: 20px;
    transform: rotate(3deg);
    margin-top: 10px;
}

.stat-card {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 8px 8px 0 var(--primary-black);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.stat-card:nth-child(even) {
    background-color: var(--primary-blue);
    box-shadow: 8px 8px 0 var(--primary-yellow);
}

.stat-number {
    font-family: var(--font-heading-bangers);
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1;
    display: block;
    text-shadow: 2px 2px 0 var(--primary-black);
}

.stat-description {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    margin-top: 0.5em;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}

.core-values-text {
    background-color: var(--primary-white);
    border: 3px dashed var(--primary-red);
    padding: 20px;
    margin-top: 1em;
    border-radius: 10px;
    text-align: center;
}

/* Services Section - Tabbed Interface */
.comic-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2em;
}

.tab-button {
    background-color: var(--primary-blue);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 10px 20px;
    border-radius: 5px;
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1rem, 3vw, 1.3rem);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-shadow: 1px 1px 0 var(--primary-black);
    box-shadow: 4px 4px 0 var(--primary-black);
    position: relative;
    z-index: 2;
}

.tab-button:hover, .tab-button.active {
    background-color: var(--primary-red);
    transform: scale(1.05);
    box-shadow: 6px 6px 0 var(--primary-yellow);
}

.tab-pane {
    display: none;
    transform: rotate(1deg); /* Slight rotation for panel effect */
    box-shadow: 12px 12px 0 var(--primary-yellow);
    background-color: var(--primary-white);
    padding: 30px;
    border-radius: 15px;
    border: 4px solid var(--primary-black);
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.tab-pane h3 {
    color: var(--primary-red);
    text-align: center;
    margin-bottom: 1em;
}

.tab-pane ul {
    list-style: none;
    padding: 0;
    margin: 1.5em 0;
    text-align: center;
}

.tab-pane li {
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    margin-bottom: 0.5em;
    font-weight: 700;
    color: var(--primary-blue);
    text-shadow: 1px 1px 0 var(--primary-white);
}
.tab-pane li::before {
    content: 'POW! ';
    font-family: var(--font-heading-bangers);
    color: var(--primary-red);
    font-size: 1.2em;
}

.tab-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2em auto 0;
    border: 3px solid var(--primary-black);
    box-shadow: 8px 8px 0 var(--primary-blue);
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 1; transform: translateY(20px) rotate(1deg); }
    to { opacity: 1; transform: translateY(0) rotate(1deg); }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 2em;
}

.feature-card {
    background-color: var(--primary-white);
    border: 4px solid var(--primary-black);
    padding: 20px;
    text-align: center;
    box-shadow: 10px 10px 0 var(--primary-red);
    border-radius: 10px;
    transform: rotate(random(-3deg, 3deg)); /* Random slight rotation */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.feature-card:nth-child(2) {
    transform: rotate(1deg);
    box-shadow: 10px 10px 0 var(--primary-blue);
}
.feature-card:nth-child(3) {
    transform: rotate(-2deg);
    box-shadow: 10px 10px 0 var(--primary-yellow);
}

.feature-visual {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border: 3px solid var(--primary-black);
    border-radius: 8px;
    margin-bottom: 1em;
    box-shadow: 4px 4px 0 var(--primary-black);
}

/* Showcase Section */
.showcase-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 40px;
}

.showcase-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.showcase-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.2);
}

.showcase-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}

.showcase-text-panel {
    background-color: rgba(255, 255, 255, 0.95);
    border: 5px solid var(--primary-black);
    padding: 40px;
    box-shadow: 20px 20px 0 var(--primary-yellow);
    border-radius: 20px;
    transform: rotate(2deg);
    margin: 0 auto;
}

.showcase-text-panel h2 {
    color: var(--primary-blue);
    text-shadow: 3px 3px 0 var(--primary-red), 6px 6px 0 var(--primary-black);
}

.showcase-text-panel p {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 1.5em;
    color: var(--primary-black);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 2em;
}

.portfolio-item {
    background-color: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: 10px 10px 0 var(--primary-blue);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.portfolio-item:nth-child(even) {
    box-shadow: 10px 10px 0 var(--primary-red);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--primary-red), 0.8);
    color: var(--primary-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 15px;
    text-align: center;
    border-radius: 6px;
    border: 2px solid var(--primary-black);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-title {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.4rem, 4vw, 2rem);
    text-shadow: 2px 2px 0 var(--primary-black);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.portfolio-category {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    text-shadow: 1px 1px 0 var(--primary-black);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 2em;
}

.team-member {
    background-color: var(--primary-yellow);
    border: 4px solid var(--primary-black);
    box-shadow: 10px 10px 0 var(--primary-red);
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.team-member:nth-child(even) {
    background-color: var(--primary-red);
    color: var(--primary-white);
    box-shadow: 10px 10px 0 var(--primary-blue);
    transform: rotate(2deg);
}
.team-member:nth-child(even) .team-name, .team-member:nth-child(even) .team-role {
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}
.team-member:nth-child(odd) {
    transform: rotate(-2deg);
}

.team-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-black);
    box-shadow: 5px 5px 0 var(--primary-black);
    margin-bottom: 1em;
}

.team-name {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--primary-blue);
    text-shadow: 1px 1px 0 var(--primary-black);
}

.team-role {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-color);
}

/* Team Modals */
.team-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1001; /* High z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.modal-open {
    overflow: hidden; /* Prevent body scrolling when modal is open */
}

.modal-content {
    background-color: var(--primary-white);
    border: 5px solid var(--primary-black);
    box-shadow: 20px 20px 0 var(--primary-blue);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    position: relative;
    text-align: center;
    transform: rotate(-2deg) scale(0.9);
    animation: modalPopIn 0.3s forwards ease-out;
}

@keyframes modalPopIn {
    from { transform: rotate(-2deg) scale(0.7); opacity: 1; }
    to { transform: rotate(-2deg) scale(1); opacity: 1; }
}

.modal-content .close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--primary-black);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    text-shadow: 2px 2px 0 var(--primary-red);
    font-family: var(--font-heading-bangers);
    transition: transform 0.2s ease-out, text-shadow 0.2s ease-out;
}

.modal-content .close-button:hover {
    color: var(--primary-red);
    transform: scale(1.2);
    text-shadow: 2px 2px 0 var(--primary-yellow);
}

.modal-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-black);
    box-shadow: 8px 8px 0 var(--primary-red);
    margin: 1em auto 1.5em;
    display: block;
}

.modal-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 0.5em;
    color: var(--primary-blue);
    text-shadow: 2px 2px 0 var(--primary-black);
}

.modal-role {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary-red);
    margin-bottom: 1em;
    text-shadow: 1px 1px 0 var(--primary-yellow);
}

.team-modal p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    margin-bottom: 1em;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 2em;
}

.testimonial-card {
    background-color: var(--primary-blue);
    color: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: 10px 10px 0 var(--primary-yellow);
    border-radius: 15px;
    padding: 30px;
    position: relative;
    transform: rotate(random(-3deg, 3deg));
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.testimonial-card:nth-child(even) {
    background-color: var(--primary-red);
    box-shadow: 10px 10px 0 var(--primary-black);
    transform: rotate(1deg);
}

blockquote {
    font-family: var(--font-body-comicneue);
    font-style: italic;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 1.5em;
    position: relative;
    text-align: center;
    line-height: 1.4;
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}
blockquote::before {
    content: "“";
    font-family: var(--font-heading-bangers);
    font-size: 5rem;
    position: absolute;
    top: -20px;
    left: 10px;
    color: rgba(var(--primary-white), 0.5);
    line-height: 1;
    z-index: 0;
}
blockquote::after {
    content: "”";
    font-family: var(--font-heading-bangers);
    font-size: 5rem;
    position: absolute;
    bottom: -40px;
    right: 10px;
    color: rgba(var(--primary-white), 0.5);
    line-height: 1;
    z-index: 0;
}

.testimonial-card .author {
    color: var(--primary-yellow);
    display: block;
    text-align: right;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    text-shadow: 1px 1px 0 var(--primary-black);
}

/* Newsletter Section */
.newsletter-section {
    background-color: var(--primary-red);
    color: var(--primary-white);
    padding: 50px 20px;
    text-align: center;
    border: 5px solid var(--primary-black);
    box-shadow: 15px 15px 0 var(--primary-blue);
    border-radius: 20px;
    transform: rotate(-1deg);
}
.newsletter-section .section-title {
    color: var(--primary-white);
    text-shadow: 2px 2px 0 var(--primary-black), 4px 4px 0 var(--primary-yellow);
}
.newsletter-section .section-description {
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}

.newsletter-form-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 500px;
    margin: 2em auto;
}

.newsletter-form-visual label {
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}

.static-input-field {
    background-color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 12px 18px;
    border-radius: 8px;
    font-family: var(--font-body-comicneue);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #888;
    width: 100%;
    box-shadow: inset 2px 2px 0 rgba(0,0,0,0.2);
    text-align: left;
}

.newsletter-form-visual .button-primary {
    background-color: var(--primary-yellow);
    color: var(--primary-black);
    box-shadow: 6px 6px 0 var(--primary-black);
    text-shadow: none;
    margin-top: 10px;
}
.newsletter-form-visual .button-primary:hover {
    background-color: var(--primary-red);
    box-shadow: 9px 9px 0 var(--primary-black);
}

/* Contact Section */
.contact-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 2em;
}

.contact-info-column {
    background-color: var(--primary-blue);
    color: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: 10px 10px 0 var(--primary-red);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transform: rotate(random(-2deg, 2deg));
}
.contact-info-column:nth-child(even) {
    background-color: var(--primary-red);
    box-shadow: 10px 10px 0 var(--primary-yellow);
    transform: rotate(1deg);
}

.contact-heading {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 0.8em;
    color: var(--primary-white);
    text-shadow: 1px 1px 0 var(--primary-black);
}

.contact-info-column p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--primary-white);
    text-shadow: 0.5px 0.5px 0 var(--primary-black);
}

.contact-message {
    font-family: var(--font-heading-bangers);
    font-size: clamp(1.8rem, 5vw, 3rem);
    text-align: center;
    margin-top: 2em;
    color: var(--primary-blue);
    text-shadow: 2px 2px 0 var(--primary-yellow), 4px 4px 0 var(--primary-red);
}

/* Footer */
.main-footer {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 30px 0;
    text-align: center;
    border-top: 4px solid var(--primary-black);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    font-family: var(--font-heading-luckiestguy);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-white);
    text-shadow: 2px 2px 0 var(--primary-yellow);
}

.main-footer p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--primary-white);
    margin: 0;
}

.main-footer nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.main-footer nav a {
    color: var(--primary-yellow);
    font-family: var(--font-body-comicneue);
    font-weight: 700;
    padding: 5px 10px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-footer nav a:hover {
    color: var(--primary-red);
    transform: scale(1.05);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav ul {
        justify-content: center;
        width: 100%;
    }

    .hero-grid-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .hero-panel-left, .hero-panel-right {
        grid-column: 1 / -1;
        transform: none; /* Remove rotation on smaller screens */
        margin: 0;
    }
    .hero-panel-right {
        order: -1; /* Image first */
    }
    .hero-visual {
        max-height: 300px;
    }

    .about-grid, .features-grid, .portfolio-grid, .team-grid, .testimonials-grid, .contact-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-text-panel, .about-stats-panel, .feature-card, .portfolio-item, .team-member, .testimonial-card, .contact-info-column {
        transform: none !important; /* Remove individual rotation on smaller screens */
        box-shadow: 8px 8px 0 var(--primary-black) !important; /* Consistent shadow */
    }
    .testimonial-card:nth-child(even), .contact-info-column:nth-child(even) {
        box-shadow: 8px 8px 0 var(--primary-black) !important; /* Override color specific shadow */
    }

    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }
    .tab-pane {
        transform: none;
        box-shadow: 8px 8px 0 var(--primary-yellow);
    }
    .showcase-text-panel {
        transform: none;
        box-shadow: 12px 12px 0 var(--primary-yellow);
    }

    .speech-bubble {
        padding: 10px 20px;
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        border-radius: 50% / 15%;
    }
    .speech-bubble::after, .speech-bubble::before {
        bottom: -15px;
        border-top: 15px solid var(--primary-black);
    }
    .speech-bubble::before {
        bottom: -12px;
        border-top: 12px solid var(--primary-yellow);
    }

    .modal-content {
        max-width: 90%;
        padding: 30px 20px;
        transform: none;
        box-shadow: 15px 15px 0 var(--primary-blue);
    }
    .modal-content .close-button {
        font-size: 2.5rem;
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    .logo a {
        font-size: 2rem;
    }
    .main-nav ul {
        gap: 8px;
    }
    .main-nav a {
        padding: 6px 10px;
    }
    .button-primary, .button-secondary {
        padding: 10px 20px;
        font-size: 1.1rem;
    }
    .section-description {
        font-size: 1rem;
    }
    .hero-panel, .comic-panel, .showcase-text-panel, .team-modal .modal-content {
        padding: 20px;
        box-shadow: 8px 8px 0 var(--primary-red) !important;
    }
    .stat-number {
        font-size: 3rem;
    }
    .stat-description {
        font-size: 1.2rem;
    }
    .newsletter-form-visual {
        padding: 0 10px;
    }
}


/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced: Team grid stabilization */
+ .team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
+ @media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
+ @media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
