@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Color System */
    --ink: #111111;
    --vermillion: #E63946;
    --canvas: #FAFAFA;
    --warm-gray: #6B7280;
    --warm-gray-light: #9CA3AF;
    --warm-gray-lighter: #D1D5DB;
    --warm-gray-lightest: #F3F4F6;
    --white: #FFFFFF;
    --vermillion-light: rgba(230,57,70,0.08);
    --vermillion-dark: #C62D3A;

    /* Typography */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Type Scale */
    --text-hero: clamp(3rem, 6vw, 4.5rem);
    --text-h1: clamp(2.25rem, 4vw, 3rem);
    --text-h2: clamp(1.75rem, 3vw, 2.25rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-h4: 1.125rem;
    --text-body-lg: 1.125rem;
    --text-body: 1rem;
    --text-sm: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    /* Layout */
    --max-width: 1200px;
    --side-padding: clamp(1.5rem, 5vw, 4rem);
    --border: 1px solid var(--warm-gray-lighter);
    --border-strong: 2px solid var(--ink);
    
    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.4s;
}

/* RESET */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--canvas);
}

::selection {
    background-color: var(--vermillion);
    color: var(--white);
}

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

a {
    color: var(--vermillion);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

a:hover {
    color: var(--vermillion-dark);
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); margin-bottom: var(--space-md); }
h3 { font-size: var(--text-h3); margin-bottom: var(--space-sm); }
h4 { font-size: var(--text-h4); margin-bottom: var(--space-xs); }

p {
    margin-bottom: var(--space-sm);
    max-width: 72ch;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--vermillion);
    margin-bottom: var(--space-xs);
    display: block;
}

.lead {
    font-size: var(--text-body-lg);
    color: var(--warm-gray);
    line-height: 1.7;
    max-width: 60ch;
}

blockquote {
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink);
    border-left: 3px solid var(--vermillion);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    max-width: 50ch;
}

/* LAYOUT */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-padding);
}

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

.section:last-of-type {
    border-bottom: none;
}

.section-header {
    margin-bottom: var(--space-xl);
}

.section-number {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 700;
    color: var(--warm-gray-lighter);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

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

/* BRAND HEADER / DARK NAVIGATION & HERO */
.header-dark {
    background: var(--ink);
    color: var(--white);
    padding: var(--space-lg) 0 var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.header-dark::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: var(--vermillion);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 0.07;
    pointer-events: none;
}

.header-dark .container {
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: var(--space-2xl);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -0.04em;
    color: var(--white);
}

.logo span {
    color: var(--vermillion);
}

.logo:hover {
    color: var(--white);
}

.header-dark .eyebrow {
    color: var(--vermillion);
    margin-bottom: var(--space-md);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    max-width: 14ch;
}

.hero-title span {
    color: var(--vermillion);
}

/* BUTTONS & TAGS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-body);
    background-color: var(--ink);
    color: var(--white);
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.btn:hover {
    background-color: var(--vermillion);
    border-color: var(--vermillion);
    color: var(--white);
}

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

.btn-secondary:hover {
    background-color: var(--ink);
    color: var(--white);
}

.btn-light {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-light:hover {
    background-color: var(--white);
    color: var(--ink);
    border-color: var(--white);
}

.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35em 0.8em;
    border: 1px solid var(--warm-gray-lighter);
    color: var(--warm-gray);
    margin: 0.25rem 0.25rem 0.25rem 0;
}

.tag-active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

.tag-vermillion {
    background: var(--vermillion);
    color: var(--white);
    border-color: var(--vermillion);
}

/* CARDS */
.card {
    background: var(--white);
    border: var(--border);
    padding: var(--space-lg);
    transition: border-color var(--duration) var(--ease);
}

.card:hover {
    border-color: var(--ink);
}

.card-number {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--warm-gray-lighter);
    margin-bottom: var(--space-sm);
}

.card h3 { margin-bottom: var(--space-xs); }
.card p { color: var(--warm-gray); font-size: var(--text-sm); line-height: 1.6; }
.card-accent { border-left: 3px solid var(--vermillion); }


/* FEATURED WORK BENTO GRID (Adapted for Light Theme) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-md);
}

.bento-item {
    position: relative;
    background: var(--white);
    border: var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    transition: border-color var(--duration) var(--ease);
}

.bento-item:hover {
    border-color: var(--ink);
}

.bento-img-container {
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: var(--warm-gray-lightest);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bento-item:hover img {
    transform: scale(1.02);
}

.bento-content {
    padding: var(--space-md);
    background: var(--white);
    border-top: var(--border);
}

.bento-title {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    margin-bottom: 0.25rem;
    color: var(--ink);
    font-weight: 700;
}

.bento-category {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bento-large {
    grid-column: span 12;
    min-height: 500px;
}

.bento-medium {
    grid-column: span 6;
}

@media (max-width: 768px) {
    .bento-medium {
        grid-column: span 12;
    }
}

/* ABOUT SECTION */
.about-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border: var(--border-strong);
}

/* CONTACT FOOTER */
.footer {
    background: var(--ink);
    color: var(--white);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.footer .eyebrow {
    color: var(--vermillion);
    margin-bottom: var(--space-xl);
}

.contact-email {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 4.5vw, 4rem);
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    margin: var(--space-md) 0 var(--space-lg);
    position: relative;
    letter-spacing: -0.02em;
    word-break: break-word;
    max-width: 100%;
}

.contact-email:hover {
    color: var(--vermillion);
}

/* CASE STUDY PAGE UI - BENTO STYLE (Adapted for Light Theme) */
/* CASE STUDY PAGE UI - IMPECCABLE CRAFT */
.cs-header {
    padding: 10rem 0 6rem;
    border-bottom: 2px solid var(--ink);
    text-align: center;
}

.cs-header .eyebrow {
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.2em;
}

.cs-header h1 {
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
}

.cs-header .lead {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.5;
    color: var(--ink);
    max-width: 50ch;
    margin: 0 auto var(--space-3xl);
}

.cs-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: var(--space-2xl);
    border-top: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
    text-align: left;
}

.meta-group {
    padding: var(--space-lg);
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    background: var(--white);
}

.meta-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-value {
    font-family: var(--font-display);
    font-size: var(--text-body-lg);
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 768px) {
    .cs-meta {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------
   BRAND BOARD LAYOUT - EDITORIAL
-------------------------------------- */
.brand-board {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    margin: var(--space-3xl) auto;
    border: 2px solid var(--ink);
}

.bb-row {
    display: flex;
    width: 100%;
    border-bottom: 2px solid var(--ink);
}
.bb-row:last-child {
    border-bottom: none;
}

.bb-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-3xl);
    border-right: 2px solid var(--ink);
}
.bb-col:last-child {
    border-right: none;
}

.bb-col-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-3xl) var(--space-xl);
    min-height: 400px;
}

.bb-box-title {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bb-header-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: var(--space-sm) 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.bb-color-palette {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    width: 100%;
    flex-wrap: wrap;
    padding-top: var(--space-lg);
}

.bb-color-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.bb-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.1);
}

.bb-color-hex {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    opacity: 0.7;
    text-transform: uppercase;
    margin-top: var(--space-xs);
    color: inherit;
}

.bb-color-name {
    font-family: var(--font-display);
    font-size: var(--text-body-lg);
    font-weight: 700;
    color: inherit;
}

.bb-typography-section {
    display: flex;
    padding: 0;
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
    background: transparent;
    color: inherit;
}

.bb-type-left {
    max-width: 65%;
    color: inherit;
}

.bb-type-right {
    text-align: right;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: inherit;
}

.bb-type-right strong {
    display: block;
    font-size: 2.25rem;
    font-family: var(--font-display);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    color: inherit;
}

.bb-mockup-grid {
    width: 100%;
}
.bb-mockup-grid.masonry {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.bb-img {
    width: 100%;
    height: auto;
    display: block;
    align-self: stretch;
    min-width: 100%;
    min-height: 0;
}

.bb-img-contain {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .bb-row {
        flex-direction: column;
    }
    .bb-col {
        border-right: none;
        border-bottom: 2px solid var(--ink);
    }
    .bb-col:last-child {
        border-bottom: none;
    }
    .bb-typography-section {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xl);
    }
    .bb-type-left {
        max-width: 100%;
    }
}




/* CASE STUDY BENTO GRID SYSTEM (IMPECCABLE DESIGN UPGRADE) */
.cs-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-rows: minmax(320px, auto);
    gap: 2rem;
    margin-top: 5rem;
    margin-bottom: 6rem;
}

@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.cs-bento-card {
    background: var(--surface, #FFFFFF);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    
    /* Impeccable aesthetics */
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 
        0px 4px 24px rgba(0, 0, 0, 0.04), 
        0px 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Staggered load effect (rough fallback if JS isn't used) */
    animation: cardFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Add slight delay to siblings for cascading effect */
.cs-bento-card:nth-child(2) { animation-delay: 0.1s; }
.cs-bento-card:nth-child(3) { animation-delay: 0.2s; }
.cs-bento-card:nth-child(4) { animation-delay: 0.3s; }
.cs-bento-card:nth-child(5) { animation-delay: 0.4s; }

.cs-bento-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0px 20px 40px rgba(0, 0, 0, 0.08), 
        0px 4px 12px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.cs-bento-card.span-col-2 { grid-column: span 2; }
.cs-bento-card.span-col-3 { grid-column: span 3; }
.cs-bento-card.span-row-2 { grid-row: span 2; }
.cs-bento-card.span-large { grid-column: span 2; grid-row: span 2; }

@media (max-width: 900px) {
    .cs-bento-grid { gap: 1.5rem; }
    .cs-bento-card { padding: 2rem; }
    .cs-bento-card.span-col-2, .cs-bento-card.span-col-3, .cs-bento-card.span-large { grid-column: span 1; }
    .cs-bento-card.span-row-2, .cs-bento-card.span-large { grid-row: span 1; }
}

/* Card Specializations */
.cs-logo-card {
    align-items: center;
    text-align: center;
    padding: 5rem 3rem;
}
.cs-logo-card img {
    width: 60%;
    max-height: 280px;
    object-fit: contain;
    filter: drop-shadow(0px 8px 16px rgba(0,0,0,0.06));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cs-logo-card:hover img {
    transform: scale(1.05);
}

.cs-text-card { 
    justify-content: center; 
    align-items: flex-start;
}
.cs-text-card h2 { 
    font-size: clamp(2rem, 4vw, 3rem); 
    margin-bottom: 1.5rem; 
    font-family: var(--font-display); 
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ink, #111);
}
.cs-text-card p { 
    font-size: 1.15rem; 
    line-height: 1.7; 
    margin-bottom: 1.25rem; 
    color: var(--text-muted, #555); 
}
.cs-text-card strong {
    color: var(--ink, #111);
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.9rem;
    text-transform: uppercase;
    display: inline-block;
    margin-right: 0.5rem;
}

.cs-palette-card { 
    flex-direction: row; 
    flex-wrap: wrap; 
    gap: 2.5rem; 
    justify-content: center; 
    align-content: center; 
}
.cs-palette-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem; 
    transition: transform 0.3s ease;
}
.cs-palette-item:hover {
    transform: translateY(-4px);
}
.cs-palette-color { 
    width: 90px; 
    height: 90px; 
    border-radius: 50%; 
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05), 0 8px 16px rgba(0,0,0,0.08); 
}
.cs-palette-hex { 
    font-size: 0.9rem; 
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; 
    color: var(--text-muted, #666);
    letter-spacing: 0.05em;
}

.cs-typography-card { 
    flex-direction: row; 
    flex-wrap: wrap; 
    justify-content: space-around; 
    align-content: center; 
    gap: 3rem; 
}
.cs-typography-item { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
}
.cs-typography-name { 
    font-size: clamp(2rem, 3vw, 2.75rem); 
    font-weight: 700; 
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink, #111);
}
.cs-typography-role { 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    color: var(--text-muted, #777); 
    font-weight: 600;
}

.cs-mockup-card { 
    padding: 0; /* Bleed images to edge for premium feel */
    background: transparent;
    border: none;
    box-shadow: none;
}
.cs-mockup-card:hover {
    transform: none;
    box-shadow: none;
}
.cs-mockup-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: var(--surface, #FFF);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.04), 0px 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cs-mockup-card:hover .cs-mockup-card-inner {
    transform: translateY(-6px);
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.08), 0px 4px 12px rgba(0, 0, 0, 0.04);
}
.cs-mockup-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Preserve aspect ratio perfectly */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.cs-mockup-card:hover img {
    transform: scale(1.03); /* Subtle zoom on hover */
}

/* EDITORIAL CHAPTER DIVIDERS */
.cs-chapter-divider {
    grid-column: 1 / -1;
    margin: 8rem 0 4rem 0;
    padding-top: 4rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.cs-chapter-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    color: var(--text-muted, #777);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}
.cs-chapter-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink, #111);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 800px;
}
.cs-chapter-desc {
    font-size: 1.25rem;
    color: var(--text-muted, #555);
    line-height: 1.6;
    max-width: 600px;
}
