/* CSS VARIABLES — DESIGN TOKENS */
:root {
    --radius: 0.25rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);

    /* Brand palette (OKLCH values converted to HEX/RGB for better compatibility if needed) */
    --ink: #1A1A1A;
    --paper: #F5F5F5;
    --cobalt: #2D54E6;
    --sienna: #C15F33;

    --background: var(--paper);
    --foreground: var(--ink);
    --card: #FFFFFF;
    --card-foreground: var(--ink);
    --muted: #EEEEEE;
    --muted-foreground: #737373;
    --accent: var(--cobalt);
    --border: rgba(26, 26, 26, 0.1);
    
    --font-display: "Inter", system-ui, sans-serif;
    --font-serif: "Cormorant Garamond", "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-display);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* UTILITIES */
.container-x {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container-x { padding: 0 2.5rem; }
}

@media (min-width: 1024px) {
    .container-x { padding: 0 4rem; }
}

.display {
    font-family: var(--font-display);
    letter-spacing: -0.04em;
    line-height: 0.95;
    font-weight: 600;
}

.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--muted-foreground);
    font-weight: 500;
}

.grain {
    position: relative;
    isolation: isolate;
}

.grain::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.glass {
    background: rgba(245, 245, 245, 0.7);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(26, 26, 26, 0.08);
}

.glass-dark {
    background: rgba(26, 26, 26, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(245, 245, 245, 0.1);
}

.link-underline {
    display: inline-block;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease;
}

.link-underline:hover {
    background-size: 100% 1px;
}

/* NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.5s ease;
    padding: 1.25rem 0;
}

header.scrolled {
    padding: 0.75rem 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-sm);
    transition: all 0.5s ease;
    padding: 0.5rem 0.25rem;
}

header.scrolled .nav-wrapper {
    background: rgba(245, 245, 245, 0.7);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(26, 26, 26, 0.08);
    padding: 0.75rem 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .dot {
    height: 0.375rem;
    width: 0.375rem;
    border-radius: 50%;
    background-color: var(--accent);
    transition: transform 0.3s ease;
}

.logo:hover .dot {
    transform: scale(1.5);
}

.nav-links {
    display: none;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
}

.nav-links a {
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.nav-cta {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--foreground);
    color: var(--background);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
    .nav-cta { display: inline-flex; }
}

.nav-cta:hover {
    background-color: var(--accent);
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .menu-toggle { display: none; }
}

.menu-toggle span {
    display: block;
    height: 1px;
    width: 1.5rem;
    background-color: var(--foreground);
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(0.375rem) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-0.375rem) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    margin-top: 0.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu.open {
    display: flex;
}

/* MARQUEE */
.marquee-container {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
}

.marquee-content span {
    font-size: 0.875rem;
    letter-spacing: 0.4em;
    color: var(--muted-foreground);
    text-transform: uppercase;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* GRID LAYOUTS */
.grid { display: grid; gap: 4rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

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

.items-center { align-items: center; }
.items-end { align-items: end; }

/* SECTIONS */
section {
    padding: 8rem 0;
}

.hero {
    padding-top: 10rem;
    padding-bottom: 8rem;
}

/* SERVICES */
.services-grid {
    display: grid;
    gap: 1px;
    background-color: var(--border);
}

.service-card {
    background-color: var(--background);
    padding: 2.5rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.5s ease;
}

.service-card:hover {
    background-color: var(--foreground);
    color: var(--background);
}

.service-card .arrow {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .arrow {
    opacity: 1;
}

/* WORK */
.work-item {
    display: block;
}

.work-img-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: var(--foreground);
    border-radius: var(--radius-sm);
}

.work-img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.work-item:hover .work-img-wrapper img {
    transform: scale(1.03);
}

/* CTA */
.cta-section {
    background-color: var(--foreground);
    color: var(--background);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(245, 245, 245, 0.3);
    padding: 1.25rem 2rem;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--background);
    color: var(--foreground);
}

/* FOOTER */
footer {
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.5fr; }
}

.footer-logo { font-size: 1.5rem; }

.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links label { font-size: 0.75rem; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.875rem; }

/* MISC */
.rounded-sm { border-radius: var(--radius-sm); }
.text-muted { color: var(--muted-foreground); }
.leading-relaxed { line-height: 1.625; }
.max-w-xl { max-width: 36rem; }
.max-w-xs { max-width: 20rem; }
