/* ============================================================
   ilans.net case studies - dark premium, matches the main site
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0b0b0d;
    --bg-elev: #121215;
    --bg-card: #131318;
    --ink: #ededea;
    --ink-muted: #a0a0a8;
    --ink-dim: #80808a;
    --accent: #8a7bff;
    --accent-ink: #b9afff;
    --ok: #4ade80;
    --line: #1f1f24;
    --line-strong: #2e2e35;
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --title: #ffffff;
}

/* ── LIGHT THEME (per-project, e.g. Bites) ── */
.cs-light {
    --bg: #f5f5f2;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --ink: #1b1b20;
    --ink-muted: #54545d;
    --ink-dim: #82828c;
    --accent: #2563eb;
    --accent-ink: #1d4ed8;
    --line: #e6e6ea;
    --line-strong: #d3d3da;
    --title: #15151a;
    background: var(--bg); color: var(--ink);
}
.cs-light .cs-nav { background: rgba(255,255,255,0.82); }
.cs-light .cs-hero__bg img { opacity: 0.22; filter: saturate(0.95); }
.cs-light .cs-hero__bg::after {
    background: linear-gradient(180deg, rgba(245,245,242,0.45) 0%, rgba(245,245,242,0.82) 58%, var(--bg) 100%);
}
.cs-light .cs-hero__tag { border-color: rgba(37,99,235,0.32); }
.cs-light ::selection { background: rgba(37,99,235,0.22); color: #15151a; }
.cs-light .cs-tool { background: rgba(37,99,235,0.08); color: var(--accent-ink); border-color: rgba(37,99,235,0.2); }
.cs-light .cs-shot { background: #eef0f3; border-color: #e2e2e6; }
.cs-light .cs-shot--phone { background: #ffffff; }

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(138,123,255,0.35); color: #fff; }
a { color: var(--accent-ink); text-decoration: none; }
img, video { display: block; max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.section-label {
    font-family: var(--mono);
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.section-label::after { content: ''; height: 1px; width: 48px; background: var(--line-strong); }

/* NAV */
.cs-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 0;
    background: rgba(11,11,13,0.78);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.cs-nav__inner { max-width: 1080px; margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; }
.cs-nav__logo { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: 0.1em; color: var(--ink); }
.cs-nav__logo span { color: var(--accent-ink); }
.cs-nav__back {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 500; color: var(--accent-ink);
    transition: color 0.2s;
}
.cs-nav__back svg { transition: transform 0.2s var(--ease-out); }
.cs-nav__back:hover { color: var(--accent); }
.cs-nav__back:hover svg { transform: translateX(-3px); }

/* HERO */
.cs-hero {
    position: relative;
    padding: 180px 0 80px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.cs-hero__bg {
    position: absolute; inset: 0;
    z-index: 0;
}
.cs-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.18; filter: saturate(0.9); }
.cs-hero__bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,11,13,0.5) 0%, rgba(11,11,13,0.85) 60%, var(--bg) 100%);
}
.cs-hero__content { position: relative; z-index: 1; }
.cs-hero__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.cs-hero__tag {
    font-family: var(--mono);
    font-size: 11.5px; letter-spacing: 0.06em;
    color: var(--accent-ink);
    border: 1px solid rgba(138,123,255,0.3);
    border-radius: 999px;
    padding: 5px 13px;
}
.cs-hero__title {
    font-size: clamp(46px, 8vw, 88px);
    font-weight: 600; letter-spacing: -0.03em; line-height: 1.02;
    color: var(--title); margin-bottom: 22px;
}
.cs-hero__mascot {
    display: inline-block; vertical-align: -0.16em;
    height: 1.04em; width: auto; margin-left: -0.04em;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,0.5));
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .cs-hero__mascot { animation: none; }
}
.cs-hero__subtitle {
    font-size: clamp(17px, 2.4vw, 21px);
    color: var(--ink-muted); line-height: 1.7;
    max-width: 680px; margin-bottom: 44px;
}
.cs-hero__info {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px; border-top: 1px solid var(--line); padding-top: 30px;
}
.cs-hero__info-label {
    display: block; font-family: var(--mono); font-size: 11px;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim);
    margin-bottom: 7px;
}
.cs-hero__info-value { font-size: 15px; color: var(--ink); font-weight: 500; }

/* SECTIONS */
.cs-section { padding: 90px 0; }
.cs-section--alt { background: var(--bg-elev); border-block: 1px solid var(--line); }
.cs-section__header { max-width: 720px; margin-bottom: 48px; }
.cs-section__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
    color: var(--title); margin-bottom: 20px;
}
.cs-section__title em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.08em; }
.cs-section__desc { font-size: 16.5px; color: var(--ink-muted); line-height: 1.75; }

/* GALLERIES */
.cs-gallery { display: grid; gap: 16px; }
.cs-gallery--2col { grid-template-columns: repeat(2, 1fr); }
.cs-gallery--3col { grid-template-columns: repeat(3, 1fr); }
.cs-gallery--4col { grid-template-columns: repeat(4, 1fr); }

/* UI / product screenshots (light-background shots that pop on dark) */
.cs-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
    background: #eef0f3; transition: transform 0.4s var(--ease-out), border-color 0.3s; }
.cs-shot:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.cs-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-shot--brand { aspect-ratio: 232 / 164; }
.cs-shot--phone { aspect-ratio: 207 / 432; background: #ffffff; }
.cs-shot--strip { background: #f4f5f7; }
.cs-shot--strip img { object-fit: contain; }
.cs-grid-phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; align-items: start; }
.cs-grid-brand { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cs-stack { display: flex; flex-direction: column; gap: 22px; }

/* floating transparent device mockups (phones / laptop) - soft drop shadow, no card */
.cs-mock { background: none; border: none; }
.cs-mock img { width: 100%; height: auto; display: block;
    filter: drop-shadow(0 20px 26px rgba(22,30,60,0.20)) drop-shadow(0 5px 10px rgba(22,30,60,0.12));
    transition: transform 0.4s var(--ease-out); }
.cs-mock:hover img { transform: translateY(-6px); }

/* flat white image boards (brand studies, strips) - soft floating shadow */
.cs-board { border-radius: 14px; overflow: hidden; background: #ffffff;
    box-shadow: 0 16px 38px rgba(22,30,60,0.10), 0 2px 8px rgba(22,30,60,0.05);
    transition: transform 0.4s var(--ease-out); }
.cs-board:hover { transform: translateY(-5px); }
.cs-board img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-board--brand { aspect-ratio: 232 / 164; }

/* dashboard row: 2 phones + laptop */
.cs-dash { display: grid; grid-template-columns: 1fr 1fr 2.6fr; gap: 22px; align-items: center; }

/* ad-creative grids (portrait phone ad videos) */
.cs-grid-ads5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cs-grid-ads4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cs-ad { border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
    background: var(--bg-card); transition: transform 0.4s var(--ease-out), border-color 0.3s; }
.cs-ad:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.cs-ad video, .cs-ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-ad--short { aspect-ratio: 3 / 4; }
.cs-ad--tall { aspect-ratio: 9 / 16; }

/* wide campaign reels */
.cs-reel { border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
    background: var(--bg-card); }
.cs-reel video { width: 100%; height: auto; display: block; }

@media (max-width: 760px) {
    .cs-grid-ads5 { grid-template-columns: repeat(3, 1fr); }
    .cs-grid-ads4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
    .cs-grid-ads5, .cs-grid-ads4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .cs-gallery--4col, .cs-grid-phones, .cs-grid-brand { grid-template-columns: repeat(2, 1fr); }
    .cs-dash { grid-template-columns: 1fr 1fr; }
    .cs-dash > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
    .cs-grid-phones { grid-template-columns: repeat(2, 1fr); }
    .cs-grid-brand { grid-template-columns: 1fr; }
}
.cs-gallery__item {
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-card);
    aspect-ratio: 4 / 3;
}
.cs-gallery__item--wide { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
.cs-gallery__item--tall { aspect-ratio: 3 / 4; }
.cs-gallery__item img, .cs-gallery__item video {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}
.cs-gallery__item:hover img, .cs-gallery__item:hover video { transform: scale(1.04); }
/* transparent character renders - no crop, sit on the dark surface */
.cs-gallery__item--plain {
    background: radial-gradient(120% 120% at 50% 0%, #18181f 0%, var(--bg-card) 70%);
}
.cs-gallery__item--plain img { object-fit: contain; padding: 8%; }
.cs-gallery__item--plain:hover img { transform: scale(1.06); }

/* NFT character card grid */
.cs-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cs-card {
    border-radius: 16px; overflow: hidden;
    border: 1px solid var(--line); background: var(--bg-card);
    transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.cs-card:hover { transform: translateY(-6px); border-color: rgba(138,123,255,0.4); }
.cs-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.cs-card__name {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
    color: var(--ink-muted); text-align: center; padding: 12px 8px;
}

/* full-bleed brand banner (transparent logo art) */
.cs-banner { text-align: center; padding: 8px 0 4px; }
.cs-banner img { max-width: min(560px, 80%); margin: 0 auto; filter: drop-shadow(0 10px 40px rgba(0,0,0,0.5)); }

/* ============ LAYERED SCENES - characters float OVER images ============ */
.cs-scene { position: relative; }
.cs-float { position: absolute; z-index: 4; pointer-events: none; }
.cs-float img {
    width: 100%; height: auto; display: block;
    filter: drop-shadow(0 22px 34px rgba(0,0,0,0.6));
}
/* named float placements (desktop) */
.cs-float--wizard { width: clamp(130px, 17vw, 230px); top: -58px; right: -14px; }
.cs-float--bee    { width: clamp(70px, 9vw, 120px);  bottom: -38px; left: 38%; transform: rotate(-8deg); }
.cs-float--monster{ width: clamp(120px, 16vw, 220px); bottom: -30px; left: -22px; }
.cs-float--imp    { width: clamp(90px, 12vw, 160px);  top: -46px; right: 12%; }

/* ============ KAHUNUTS TROPICAL STAGE ============ */
.cs-kahu { position: relative; overflow: hidden; padding: 90px 0;
    border-block: 1px solid var(--line); }
.cs-kahu__bg { position: absolute; inset: 0; z-index: 0; }
.cs-kahu__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.40; }
.cs-kahu__bg::after { content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,11,13,0.78) 0%, rgba(11,11,13,0.5) 35%, rgba(11,11,13,0.55) 65%, rgba(11,11,13,0.85) 100%); }
.cs-kahu > .container { position: relative; z-index: 1; }

/* coconut display boxes floating on the beach */
.cs-kahu__cards { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cs-kahu__card { position: relative; border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 24px 55px rgba(0,0,0,0.5);
    transition: transform 0.3s var(--ease-out), border-color 0.3s; }
.cs-kahu__card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.35); }
.cs-kahu__card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.cs-kahu__name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
    color: var(--ink-muted); text-align: center; padding: 11px 6px; }
.cs-kahu__badge { position: absolute; z-index: 5; top: -50px; right: -8px;
    width: clamp(82px, 11vw, 132px);
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55)); }

@media (max-width: 760px) {
    .cs-kahu__cards { grid-template-columns: repeat(2, 1fr); }
    .cs-float--wizard { width: 100px; top: -34px; right: 4px; }
    .cs-float--monster { width: 96px; bottom: -18px; left: -8px; }
    .cs-float--imp { width: 72px; top: -28px; }
    .cs-float--bee { width: 56px; }
    .cs-kahu__badge { width: 76px; top: -34px; }
}

/* ============ BLOCK C - gameplay + cinematic, characters peeking ============ */
.cs-c { position: relative; margin-top: 78px; }   /* room for characters to overlap up */
.cs-c__grid { display: grid; grid-template-columns: 36.5% 1fr; gap: 16px;
    aspect-ratio: 980 / 332; }
.cs-c__vid { position: relative; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--line); background: var(--bg-card); }
.cs-c__vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-c__char { position: absolute; z-index: 5; pointer-events: none;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)); }
.cs-c__char img { width: 100%; height: auto; display: block; }
.cs-c__char--witch { width: clamp(120px, 18vw, 248px); top: -86px; left: -16px; }
.cs-c__char--girl  { width: clamp(108px, 15vw, 208px); top: -104px; right: -8px; }
.cs-c__char--bee   { width: clamp(60px, 8vw, 112px); bottom: -30px; left: 31%; transform: rotate(-6deg); }

/* ============ BLOCK E - cinematics masonry, characters overlapping bottom ====== */
.cs-e { position: relative; padding-bottom: clamp(20px, 4vw, 56px); }
.cs-e__grid { display: grid; grid-template-columns: 1.96fr 1fr; gap: 16px; align-items: start; }
.cs-e__col { display: flex; flex-direction: column; gap: 16px; }
.cs-e__tile { border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
    background: var(--bg-card); }
.cs-e__col--wide .cs-e__tile { aspect-ratio: 16 / 9; }
.cs-e__col--tall .cs-e__tile { aspect-ratio: 3 / 4; }
.cs-e__tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-e__char { position: absolute; z-index: 5; pointer-events: none;
    filter: drop-shadow(0 18px 28px rgba(0,0,0,0.6)); }
.cs-e__char img { width: 100%; height: auto; display: block; }
/* big characters overlapping up from the bottom of the left column */
.cs-e__char--tree    { width: clamp(220px, 46vw, 560px); bottom: 30px; left: -4%; z-index: 4; }
.cs-e__char--monster { width: clamp(150px, 27vw, 320px); bottom: 24px; left: 20%; }
.cs-e__char--imp     { width: clamp(96px, 16vw, 200px); bottom: 60px; left: 46%; }

@media (max-width: 760px) {
    .cs-c { margin-top: 54px; }
    .cs-c__grid { grid-template-columns: 1fr; aspect-ratio: auto; }
    .cs-c__vid { aspect-ratio: 16 / 10; }
    .cs-c__char--witch { width: 92px; top: -52px; left: -6px; }
    .cs-c__char--girl  { width: 84px; top: -60px; right: -2px; }
    .cs-c__char--bee   { width: 52px; bottom: auto; top: 38%; left: auto; right: 6px; }
    .cs-e__grid { grid-template-columns: 1fr; }
    .cs-e__char--tree { width: 150px; }
    .cs-e__char--monster { width: 104px; left: 30%; }
    .cs-e__char--imp { width: 68px; left: 60%; }
}

/* TOOLS */
.cs-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-tool {
    font-family: var(--mono); font-size: 12px;
    padding: 7px 14px; border-radius: 999px;
    background: rgba(138,123,255,0.08);
    color: var(--accent-ink);
    border: 1px solid rgba(138,123,255,0.18);
}

/* NEXT / FOOTER */
.cs-next { border-top: 1px solid var(--line); }
.cs-next a {
    display: block; padding: 70px 0; text-align: center;
    transition: background 0.3s;
}
.cs-next a:hover { background: var(--bg-elev); }
.cs-next__label {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px;
}
.cs-next__title { font-size: clamp(32px, 5vw, 52px); font-weight: 600; letter-spacing: -0.02em; color: var(--title); }
.cs-next__title em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.cs-footer { border-top: 1px solid var(--line); padding: 36px 0; }
.cs-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cs-footer p, .cs-footer a { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
    .cs-hero { padding: 130px 0 60px; }
    .cs-section { padding: 64px 0; }
    .cs-gallery--3col { grid-template-columns: repeat(2, 1fr); }
    .cs-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .cs-gallery--2col, .cs-gallery--3col { grid-template-columns: 1fr; }
    .cs-gallery__item--wide { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}
