/* AK Studio portfolio — dark luxury */
/* Tokens from akstudio.ae (Elementor kit + home page) */
:root {
    --bg: #121212;
    --surface: #1A1A1A;
    --card: #242424;
    --line: #2C2C2C;
    --accent: #B0D03B;
    --accent-hot: #CAFF06;
    --accent-glow: rgba(176, 208, 59, 0.61);
    --text: #FFFFFF;
    --muted: #A3A3A3;
    --grad: linear-gradient(135deg, #1B1B1B 0%, #345213 100%);
    --display: "DM Sans", "Roboto", system-ui, sans-serif;
    --sans: "Roboto", system-ui, -apple-system, sans-serif;
    --gutter: clamp(16px, 4vw, 56px);
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
em { font-style: normal; color: var(--accent); }

.eyebrow {
    font: 500 0.72rem/1 var(--sans);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1.2rem;
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 18px var(--gutter);
    background: linear-gradient(var(--bg) 40%, transparent);
    backdrop-filter: blur(6px);
}
.logo { display: inline-flex; align-items: center; font: 700 1.3rem/1 var(--display); }
.logo img { height: 40px; width: auto; }
.logo span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); font-size: 0.9rem; }
.site-nav > a:not(.btn) { color: var(--muted); transition: color .2s; }
.site-nav > a:not(.btn):hover, .site-nav > a.active { color: var(--text); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: 999px;
    background: var(--accent); color: #000; font-weight: 600; font-size: 0.92rem; font-family: var(--display);
    border: 1px solid var(--accent); cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: #000; box-shadow: 0 0 24px var(--accent-glow); }
.btn--small { padding: 9px 18px; font-size: 0.82rem; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.link-arrow { color: var(--muted); font-size: 0.9rem; transition: color .2s; }
.link-arrow:hover { color: var(--accent); }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    min-height: 72vh; display: flex; align-items: flex-end;
    padding: 0 var(--gutter) clamp(40px, 8vh, 96px);
    margin-top: -76px; padding-top: 120px;
    background: var(--grad);
}
.hero__video {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0.45;
}
.hero--video::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 2%, transparent 60%), linear-gradient(to right, #121212d9, #34521340 80%);
}
.hero__inner { position: relative; z-index: 1; max-width: 900px; }
.hero__lede { color: var(--muted); max-width: 46ch; font-size: 1.05rem; margin: 1.5rem 0 0; }

/* Sections */
.section { padding: clamp(32px, 6vw, 72px) var(--gutter); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 32px; }
.page-head { padding: clamp(48px, 10vw, 120px) var(--gutter) 0; }
.empty { color: var(--muted); }

/* Filters */
.filters { display: flex; flex-direction: column; gap: 18px; margin-bottom: 36px; }
.filters__types { display: flex; gap: 8px; flex-wrap: wrap; }
.filters__cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters__cats::-webkit-scrollbar { display: none; }
.pill {
    font: 700 clamp(1.2rem, 2.2vw, 1.7rem)/1.2 var(--display); color: #5c5c5c;
    padding: 2px 14px 2px 0; transition: color .2s;
}
.pill:not(:last-child)::after { content: "/"; margin-left: 14px; color: var(--line); }
.pill:hover, .pill--active { color: var(--text); }
.pill--active { color: var(--accent); }
.chip {
    flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 0.8rem; color: var(--muted); white-space: nowrap; transition: all .2s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip--active { color: #000; background: var(--accent); border-color: var(--accent); }

/* Masonry grid */
.masonry { columns: 3 340px; column-gap: 14px; }
.tile { break-inside: avoid; margin: 0 0 14px; position: relative; display: block; }
.tile__open {
    all: unset; cursor: zoom-in; display: block; position: relative; overflow: hidden;
    width: 100%; aspect-ratio: var(--ar, 4 / 5); background: var(--c, var(--surface)); border-radius: var(--radius);
}
.tile--video .tile__open { cursor: pointer; }
.tile__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile img, .tile__preview {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .4s;
}
.tile img { opacity: 0; }
.tile img.is-loaded, .tile img[data-loaded] { opacity: 1; }
.tile__preview { position: absolute; inset: 0; opacity: 0; }
.tile.is-previewing .tile__preview { opacity: 1; }
.tile:hover img, .tile:hover .tile__preview { transform: scale(1.035); }
.tile__badge, .project-card .tile__badge {
    position: absolute; left: 12px; bottom: 12px; z-index: 2;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 11px; border-radius: 999px; font-size: 0.75rem; font-weight: 500;
    background: #121212b3; backdrop-filter: blur(6px); color: var(--text);
}
.tile__badge svg { width: 8px; height: 10px; fill: var(--accent); }
.tile figcaption {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 2px 0; font-size: 0.8rem;
}
.tile__title { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__cat { color: var(--muted); flex: none; }
.load-more { text-align: center; margin-top: 40px; }

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 32px 18px; }
.project-card { display: block; }
.project-card__media {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
    background: var(--c, var(--surface));
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project-card:hover img { transform: scale(1.04); }
.project-card__body { padding-top: 16px; }
.project-card__body .eyebrow { margin-bottom: 10px; }
.project-card h3 { transition: color .2s; }
.project-card:hover h3 { color: var(--accent); }
.project-card__client { color: var(--muted); font-size: 0.85rem; }

/* Project page */
.project-hero {
    position: relative; min-height: 78vh; display: flex; align-items: flex-end;
    margin-top: -76px; padding: 120px var(--gutter) clamp(32px, 6vh, 64px);
    background: var(--c); overflow: hidden;
}
.project-hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), transparent 55%); }
.project-hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; max-width: 1000px; }
.project-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; }
.facts { margin: 0; display: grid; gap: 18px; align-content: start; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; }
.facts dt { font-size: 0.72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; }
.prose { font-size: 1.1rem; color: #d6d6d6; max-width: 62ch; }
@media (max-width: 760px) { .project-info { grid-template-columns: 1fr; gap: 28px; } }

/* Footer */
.site-footer { padding: clamp(64px, 10vw, 140px) var(--gutter) 32px; border-top: 1px solid var(--line); margin-top: 48px; background: var(--grad); }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 80px; color: var(--muted); font-size: 0.8rem; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 100; background: #0d0d0df5;
    display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 1fr auto;
    animation: lb-in .25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } }
.lb-stage { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 56px 0 8px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lb-stage video { background: #000; width: auto; }
.lb-nav, .lb-close {
    background: none; border: 0; color: var(--text); cursor: pointer; font-size: 2.6rem; line-height: 1;
    opacity: .6; transition: opacity .2s, color .2s;
}
.lb-nav:hover, .lb-close:hover { opacity: 1; color: var(--accent); }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 12px; right: 18px; font-size: 2.2rem; z-index: 2; }
.lb-caption {
    grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
    padding: 14px var(--gutter) 20px; font-size: 0.88rem;
}
.lb-caption [data-lb-title] { font-family: var(--display); font-size: 1.1rem; }
.lb-meta, .lb-count { color: var(--muted); }
.lb-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-project { color: var(--accent); }
@media (max-width: 640px) {
    .lightbox { grid-template-columns: 0 1fr 0; }
    .lb-nav { display: none; }
    .site-nav > a:not(.btn):not(.active) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 600px) {
    .masonry { columns: 2; column-gap: 8px; }
    .tile { margin-bottom: 10px; }
    .tile figcaption { font-size: 0.72rem; }
    .tile__cat { display: none; }
}


/* ---------- Download deterrents ---------- */
img, video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile img, .project-card img, .project-hero img, .logo img { pointer-events: none; }
.lb-stage { position: relative; }
.lb-shield { position: absolute; inset: 0; background: transparent; }
@media print { img, video, .tile, .project-card, .hero, .project-hero { display: none !important; } }
