/* styles/style.css */

/* --- Base Reset & Variables --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #1A1F2C;
    --color-card-bg: #2D3748;
    --color-text: #F9ECEC;
    --color-accent: #F0C4C4;
    --color-cta: #FF9EAF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding: 0;
}

/* --- Layout Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Navigation --- */
header {
    border-bottom: 2px solid var(--color-card-bg);
    background-color: rgba(26, 31, 44, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* --- Navigation & Logo Styles --- */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px; /* Pushes text away from the image graphic */
    opacity: 0; /* animations */
    animation: logoFadeIn 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; /* animations */
    animation-delay: 0.2s; /* animations */
}

.logo img {
    height: 80px; /* Kept slightly smaller so it stays elegant with text */
    width: auto;
    padding-left: 5px;
}

.logo-text {
    font-family: 'Original Surfer', sans-serif;
    font-weight: bold;
    color: var(--color-accent);
    font-size: 1.2rem;
    word-break: keep-all;
}

/* Hide checkbox completely */
.menu-checkbox {
    display: none;
}

/* Style the Burger Button Wrapper */
.menu-button {
    cursor: pointer;
    padding: 10px;
    display: block;
    z-index: 101;
}

/* Create the middle line of the burger icon */
.burger-icon {
    background: var(--color-text);
    display: block;
    height: 2px;
    position: relative;
    width: 24px;
    transition: background 0.2s ease-out;
}

/* Create top and bottom lines using pseudo-elements */
.burger-icon::before,
.burger-icon::after {
    background: var(--color-text);
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all 0.2s ease-out;
    width: 100%;
}

.burger-icon::before { top: 6px; }
.burger-icon::after { top: -6px; }

/* Mobile Menu Overlay Layout (Default Mobile State) */
.nav-menu {
    background-color: var(--color-bg);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;          
    display: inline-block;       
    border-radius: 6px;          
    width: auto;                 
    text-align: center;
    
    /* animations */
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.nav-menu a.active {
    transform: translateY(0);
    background-color: var(--color-cta);
    color: var(--color-bg) !important;
}

.nav-menu a:hover {
    background-color: var(--color-cta);
    color: var(--color-bg);
    transform: translateY(-1px);
}

/* --- Interactive Functionality --- */

/* Open Menu when Checkbox is Checked */
.menu-checkbox:checked ~ .nav-menu {
    height: calc(100vh - 100%);
    padding: 40px 0;
    opacity: 1;
}

/* Turn Burger into an 'X' when Open */
.menu-checkbox:checked ~ .menu-button .burger-icon {
    background: transparent;
}
.menu-checkbox:checked ~ .menu-button .burger-icon::before {
    transform: rotate(-45deg);
    top: 0;
}
.menu-checkbox:checked ~ .menu-button .burger-icon::after {
    transform: rotate(45deg);
    top: 0;
}

/* --- Core Page Layout & Typography --- */
main {
    padding: 40px 0;
}

h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.lead-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* --- Intro Text Section --- */
.intro-section {
    padding: 40px 20px 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* --- Buttons --- */
.intro-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 14px 28px;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--color-cta);
    color: var(--color-bg);
}

.btn-secondary {
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

/* --- Content Teaser Blocks --- */
.teaser-section {
    background-color: var(--color-card-bg);
    padding: 60px 0;
}

.grid-three-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background-color: var(--color-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(240, 196, 196, 0.1);
}

.card h3 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* --- Footer --- */
footer {
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--color-card-bg);
}

/* --- Responsive Desktop Adjustments (768px+) --- */
@media (min-width: 768px) {
    .logo-text {
        font-size: 2.0rem;       /* Scales the text size back up on desktop screens */
        white-space: nowrap;     /* Safely keeps the title on one single line on wider screens */
    }

    /* Menu Switch to Desktop Row Layout */
    .menu-button {
        display: none;
    }

    .nav-menu {
        position: static;
        height: auto;
        width: auto;
        opacity: 1;
        flex-direction: row;
        gap: 30px;
        box-shadow: none;
        padding: 0;
    }

    .nav-menu a {
        width: auto;
    }

    /* Content Layout shifts */
    h1 { 
        font-size: 3.5rem; 
        max-width: 800px;
    }
    
    .intro-section {
        padding: 80px 0 120px 0;
    }

    .intro-buttons {
        flex-direction: row;
        width: auto;
    }

    .grid-three-col {
        flex-direction: row;
    }

    .card {
        flex: 1;
    }
}

/* --- About Page Specific Layouts --- */
.about-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.about-content {
    margin-bottom: 50px;
    max-width: 800px;
}

.grid-two-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Responsive Desktop Adjustment (768px+) --- */
@media (min-width: 768px) {
    .grid-two-col {
        flex-direction: row;
    }

    .grid-two-col .card {
        flex: 1;
    }
}

/* --- Services Page Layouts --- */
.services-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.services-stack {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.service-item {
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--color-cta);
}

.service-meta h2 {
    text-align: left;
    color: var(--color-accent);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.service-details p {
    margin-bottom: 0;
    padding-bottom: 20px;
}

/* --- Responsive Desktop Adjustment (768px+) --- */
@media (min-width: 768px) {
    .service-item {
        display: flex;
        gap: 40px;
        padding: 40px;
    }

    .service-meta {
        flex: 1;
    }

    .service-details {
        flex: 2;
    }

    .service-meta h2 {
        font-size: 1.8rem;
        margin-bottom: 0;
    }
}

/* --- Restructured Case Studies Page Layouts --- */
.cases-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.cases-stack {
    display: flex;
    flex-direction: column;
    gap: 60px; /* Strong separation between case blocks */
    margin-top: 40px;
}

.case-study-item {
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(240, 196, 196, 0.1);
}

.case-header {
    border-bottom: 1px solid rgba(240, 196, 196, 0.1);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.case-study-item h2 {
    text-align: left;
    color: var(--color-accent);
    font-size: 1.8rem;
    margin: 10px 0 15px 0;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.case-tags span {
    font-size: 0.85rem;
    background-color: var(--color-bg);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(240, 196, 196, 0.2);
}

.case-body {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.case-block h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.problem h3 {
    color: var(--color-cta); /* Highlights challenge */
}

.solution h3 {
    color: #A3E635; /* Fresh color variant indicating the fix */
}

/* --- Responsive Desktop Adjustment (768px+) --- */
@media (min-width: 768px) {
    .case-study-item {
        padding: 45px;
    }

    .case-body {
        flex-direction: row; /* Places Problem & Solution side-by-side */
        gap: 40px;
    }

    .case-block {
        flex: 1; /* Equal widths */
    }
 
    .case-block p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text);
    }
}

/* --- Case Studies Button Action Spacing --- */
.case-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(240, 196, 196, 0.1);
    display: flex;
}

.case-actions .btn {
    width: 100%; /* Spans full width on mobile screens for better accessibility */
}

/* --- Responsive Desktop Adjustment (768px+) --- */
@media (min-width: 768px) {
    .case-actions .btn {
        width: auto; /* Snaps back to standard content sizing on desktop viewports */
    }
}

/* --- Contact Page Form Layouts --- */
.contact-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.form-container {
    max-width: 600px;
    margin: 40px auto 0 auto; /* Centers the form block horizontally */
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(240, 196, 196, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--color-accent);
}

.form-group input,
.form-group textarea {
    background-color: var(--color-bg);
    border: 1px solid rgba(240, 196, 196, 0.2);
    color: var(--color-text);
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-cta); /* Highlights field pink on active selection */
}

.form-submit {
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

/* --- Global Animation Timelines --- */
@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px); /* Optional: Slightly drifts downward as it fades in for a premium look */
    }
    100% {
        opacity: 1;
        transform: translateY(0);    /* Settles perfectly in its layout position */
    }
}