/* ============================================
   SENTIENT FONT — Display serif
   ============================================ */
@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Extralight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-ExtralightItalic.otf') format('opentype');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sentient';
    src: url('fonts/Sentient-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ============================================
   DESIGN SYSTEM — thiti.design tokens
   ============================================ */
:root {
    /* Colors */
    --bg: #f9f8f5;
    --text: #0c0c0c;
    --text-70: rgba(12, 12, 12, 0.7);
    --text-50: rgba(12, 12, 12, 0.5);
    --text-25: rgba(12, 12, 12, 0.25);
    --border: #e5e5e5;
    --border-subtle: #efefef;
    --surface-dark: #131313;
    --surface-dark-2: #1f1f1f;
    --surface-dark-3: #252525;
    --accent-green: #22c55e;

    /* Typography */
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --container-outer: 1440px;
    --container: 1280px;
    --padding: 48px;
    --section-gap: 96px;
    --inner-gap: 24px;
    --grid-gap: 20px;

    /* Transitions */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.2s var(--ease);
    --t-normal: 0.4s var(--ease);
    --t-slow: 0.6s var(--ease);

    /* Radius */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-full: 9999px;
}

/* ============================================
   DARK MODE TOKENS
   ============================================ */
[data-theme="dark"] {
    --bg: #111110;
    --text: #f0ede8;
    --text-70: rgba(240, 237, 232, 0.7);
    --text-50: rgba(240, 237, 232, 0.5);
    --text-25: rgba(240, 237, 232, 0.2);
    --border: #2a2a28;
    --border-subtle: #1c1c1a;
}

/* Dark mode element overrides */
[data-theme="dark"] .now-playing__link {
    background: #1c1c1a;
    border-color: #2a2a28;
}

[data-theme="dark"] .hero__map-card-inner {
    background: #1c1c1a;
}

[data-theme="dark"] .behind-pixels__quote {
    background: #1a1a18;
    border-left-color: var(--text-25);
}

[data-theme="dark"] .services__item-card__inner {
    background: #1c1c1a;
    border-color: #2a2a28;
}

[data-theme="dark"] .btp-photo {
    background: #1c1c1a;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .behind-pixels__photos {
    background-image: radial-gradient(circle, #333330 1px, transparent 1px);
}

[data-theme="dark"] .contact__cta-btn {
    background: var(--text);
    color: var(--bg);
}

[data-theme="dark"] .contact-modal__content {
    background: #1a1a18;
}

[data-theme="dark"] .pw-overlay__page {
    background: var(--bg);
}

[data-theme="dark"] .pw-overlay__field {
    background: #1c1c1a;
    border-color: #2a2a28;
}

[data-theme="dark"] .pw-overlay__input {
    background: transparent;
    color: var(--text);
}

[data-theme="dark"] .pw-overlay__submit {
    background: var(--text);
    color: var(--bg);
}

[data-theme="dark"] .work-cursor {
    background: rgba(240, 237, 232, 0.12);
    border-color: rgba(240, 237, 232, 0.2);
}

/* ── Theme Toggle ───────────────────────────── */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-50);
    padding: 4px;
    transition: color var(--t-fast);
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text);
    opacity: 1;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Light mode → show moon (to go dark), hide sun */
.theme-toggle__sun {
    display: none;
}

.theme-toggle__moon {
    display: flex;
}

/* Dark mode → show sun (to go light), hide moon */
[data-theme="dark"] .theme-toggle__sun {
    display: flex;
}

[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--t-fast);
}

a:hover {
    opacity: 0.6;
}

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

ul {
    list-style: none;
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}

.grain-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================
   CONTAINER UTILITY
   ============================================ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding);
}

/* ============================================
   NAVIGATION — thiti.design exact
   ============================================ */
.nav {
    position: relative;
    background: var(--bg);
}

.nav__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav__logo {
    display: flex;
    align-items: center;
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    position: relative;
}

.nav__logo:hover {
    opacity: 1;
}

.nav__logo-text {
    display: inline-block;
    min-width: 1px;
}

.nav__logo-cursor {
    display: inline-block;
    font-weight: 300;
    color: var(--text);
    animation: cursor-blink 0.7s step-end infinite;
    margin-left: 1px;
}

@keyframes cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Now Playing hover card */
.now-playing {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    z-index: 200;
}

.nav__logo:hover .now-playing {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
    pointer-events: auto;
}

.now-playing__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    white-space: nowrap;
}

.now-playing__cover {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.now-playing__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.now-playing__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-50);
    letter-spacing: 0.02em;
}

.now-playing__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.now-playing__waveform {
    display: flex;
    align-items: center;
    gap: 2.5px;
    height: 18px;
    margin-left: 4px;
}

.now-playing__waveform span {
    display: block;
    width: 2.5px;
    border-radius: 2px;
    background: var(--accent-green);
    animation: waveform 1s ease-in-out infinite;
}

.now-playing__waveform span:nth-child(1) {
    height: 6px;
    animation-delay: 0s;
}

.now-playing__waveform span:nth-child(2) {
    height: 12px;
    animation-delay: 0.15s;
}

.now-playing__waveform span:nth-child(3) {
    height: 8px;
    animation-delay: 0.3s;
}

.now-playing__waveform span:nth-child(4) {
    height: 14px;
    animation-delay: 0.45s;
}

.now-playing__waveform span:nth-child(5) {
    height: 6px;
    animation-delay: 0.6s;
}

@keyframes waveform {

    0%,
    100% {
        transform: scaleY(0.4);
    }

    50% {
        transform: scaleY(1);
    }
}

.nav__right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-50);
    letter-spacing: 0.01em;
    transition: color var(--t-fast);
}

.nav__link:hover {
    color: var(--text);
    opacity: 1;
}

/* ============================================
   HERO — thiti.design exact
   ============================================ */
.hero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 48px;
    padding-top: 160px;
}

.hero__content {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero__text {
    flex: 1;
    min-width: 0;
}

.hero__video {
    flex-shrink: 0;
    width: 320px;
    overflow: visible;
    margin-bottom: 0;
}

.hero__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
    max-width: 1100px;
    margin-bottom: 24px;
}

.hero__link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    text-decoration-color: var(--text-25);
    transition: text-decoration-color 0.3s ease, text-decoration-style 0s;
    position: relative;
}

.hero__link:hover {
    opacity: 1;
    text-decoration-style: solid;
    text-decoration-color: var(--text);
}

/* Headout — purple/pink/orange gradient text sweep (once) */
/* Headout — purple/pink/orange sweep using background-position (jitter-free) */
.hero__link--headout {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #f97316, var(--text) 70%, var(--text) 100%);
    background-size: 300% 100%;
    background-position: 100% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__link--headout.is-visible {
    animation: headout-sweep 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes headout-sweep {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 100% 0;
    }
}


.hero__preview {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

.hero__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero__link:hover .hero__preview {
    opacity: 1;
    filter: blur(0px);
    transform: translateX(-50%) rotate(3deg);
}

.hero__preview--rotate {
    transform: translateX(-50%) rotate(0deg);
}

.hero__link:hover .hero__preview--rotate {
    opacity: 1;
    filter: blur(0px);
    transform: translateX(-50%) rotate(5deg);
}

.hero__role {
    color: var(--text);
}

.hero__description {
    font-family: var(--font-body);
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-50);
    max-width: 720px;
    margin-bottom: 48px;
}

.hero__details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.hero__detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero__detail-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-25);
    letter-spacing: 0.15px;
    line-height: 1.5;
    text-transform: uppercase;
}

.hero__detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
    letter-spacing: 0.15px;
}

.hero__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: var(--r-full);
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 6px;
}

.hero__dot--green {
    background: var(--accent-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Location map hover card */
.hero__detail--location {
    position: relative;
    cursor: default;
}

.hero__map-card {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    width: 280px;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
    z-index: 50;
}

.hero__detail--location:hover .hero__map-card {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.hero__map-card-inner {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero__map-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: var(--border-subtle);
}

.hero__map-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__map-pin {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.hero__map-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-50);
}

.hero__time {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   GHOST SPACE (between hero and work)
   ============================================ */
.ghost-space {
    height: calc(var(--section-gap) * 2);
}

/* ============================================
   SECTION HEADER — reusable pattern
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}

.section-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.15px;
}

/* ============================================
   FEATURED WORK — thiti.design exact
   ============================================ */
.work {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
}

.work__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.work-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    cursor: none;
}

/* Custom cursor — "View" glass circle */
.work-cursor {
    position: fixed;
    top: -40px;
    left: -40px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    will-change: transform;
}

.work-card:hover {
    opacity: 1;
}

.work-card__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 0;
    background: var(--border-subtle);
    position: relative;
}

/* Inner element for zoom effect */
.work-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-card__image::after {
    transform: scale(1.04);
}

.work-card__image--1,
.work-card__image--1::after {
    background: url('assets/dex_case/1.png') center/cover no-repeat;
}

.work-card__image--2,
.work-card__image--2::after {
    background: url('assets/Headout_studio.png') center/cover no-repeat;
}

.work-card__image--3,
.work-card__image--3::after {
    background: url('assets/headout_acquisition.png') center/cover no-repeat;
}

.work-card__image--4,
.work-card__image--4::after {
    background: linear-gradient(145deg, #8ba4b8, #4a6378, #2d3e4e);
}

.work-card__info {
    padding: 16px 4px 0;
}

.work-card__title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.work-card__tags {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.work-card__tag {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-25);
}

.work-card__tag+.work-card__tag::before {
    content: ', ';
}

.work-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-50);
    text-decoration: none;
    position: relative;
    transition: color var(--t-fast);
}

.work-card__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card__link:hover {
    color: var(--text);
}

.work-card__link:hover::after {
    width: 100%;
}

/* Locked work card */
.work-card--locked {
    cursor: default;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.work-card__lock-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    overflow: hidden;
}

.work-card__lock-hover {
    display: none;
}

.work-card--locked:hover .work-card__lock-pill {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.work-card--locked:hover .work-card__lock-text {
    display: none;
}

.work-card--locked:hover .work-card__lock-hover {
    display: inline;
}

/* Coming soon card — not clickable */
.work-card--coming-soon {
    cursor: none;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.work-card--coming-soon .work-card__link {
    pointer-events: auto;
    cursor: pointer;
}

.work-card__soon-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Featured card — full width, landscape */
.work-card--featured {
    margin-bottom: 40px;
}

.work-card--featured .work-card__image {
    aspect-ratio: 16 / 9;
}

/* More coming soon pill */
.work__more {
    text-align: center;
    margin-top: 40px;
}

.work__more-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-25);
    border: 1px solid var(--border);
    padding: 8px 24px;
    border-radius: var(--r-full);
    cursor: default;
    user-select: none;
    position: relative;
}

.work__more-pill[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    animation: tooltip-in 0.2s ease;
}

@keyframes tooltip-in {
    from {
        opacity: 0;
        filter: blur(4px);
        transform: translateX(-50%) translateY(4px);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   OTHER WORKS
   ============================================ */
.other-works {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
}

.other-works .section-header {
    padding-top: var(--section-gap);
}

.other-works__item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 48px 0;
}

.other-works__text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.other-works__title {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
}

.other-works__year {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-50);
    margin-bottom: 20px;
}

.other-works__desc {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-70);
    line-height: 1.6;
    margin-bottom: 32px;
}

.other-works__desc strong {
    font-weight: 600;
    color: var(--text);
}

.other-works__built {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-25);
}

.other-works__built img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.other-works__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0;
    overflow: hidden;
}

.other-works__image--1 {
    background: url('assets/macpie.png') center/cover no-repeat;
}

.other-works__image--2 {
    background: url('assets/LINEA.png') center/cover no-repeat;
}

/* ============================================
   WHAT I DO — thiti.design side-by-side
   ============================================ */
.services {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

.services__layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.services__title {
    flex: 1;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.15px;
    color: var(--text);
}

.services__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.services__item {
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 400;
    color: var(--text);
    line-height: 1.15;
    position: relative;
    cursor: default;
    z-index: 1;
}

.services__item:hover {
    z-index: 50;
}

.services__item-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.85);
    width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 10;
}

.services__item:nth-child(1):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(3deg) scale(1);
}

.services__item:nth-child(2):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-4deg) scale(1);
}

.services__item:nth-child(3):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(5deg) scale(1);
}

.services__item:nth-child(4):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-3deg) scale(1);
}

.services__item:nth-child(5):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(6deg) scale(1);
}

.services__item:nth-child(6):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
}

.services__item:nth-child(7):hover .services__item-card {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(4deg) scale(1);
}

.services__item-card--stack {
    display: flex;
    align-items: center;
    width: auto;
}

.services__item-card--stack .services__item-card__inner {
    width: 150px;
    flex-shrink: 0;
}

.services__item-card__inner--2 {
    margin-left: -20px;
    transform: rotate(6deg);
    position: relative;
    z-index: -1;
}

.services__item-card__inner--3 {
    margin-left: -20px;
    transform: rotate(-4deg);
    position: relative;
    z-index: -2;
}

.services__item-card__inner {
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    width: 220px;
}

.services__item-card__img {
    width: 100%;
    aspect-ratio: 1/1;
    display: block;
    object-fit: cover;
}

.services__item-card__img--placeholder {
    background: var(--border-subtle);
}

/* ============================================
   IMPACT / METRICS
   ============================================ */
.impact {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

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

.impact__card {
    background: var(--border-subtle);
    border-radius: var(--r-xl);
    padding: 40px 32px;
}

.impact__number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    display: block;
    margin-bottom: 16px;
}

.impact__desc {
    font-size: 14px;
    color: var(--text-50);
    line-height: 1.6;
    font-weight: 400;
}

/* ============================================
   EXPERIENCE — thiti.design 3-column table
   ============================================ */
.experience {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

.experience__table {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.experience__row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr;
    border-bottom: 1px solid var(--border-subtle);
}

.experience__row--header {
    border-bottom-color: var(--border);
}

.experience__row:last-child {
    border-bottom: none;
}

.experience__header {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-50);
    padding: 16px 0;
}

.experience__cell {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    padding: 16px 0;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.about__bio {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about__bio p {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-70);
    line-height: 1.7;
}

.about__details {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about__detail-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about__detail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.about__detail-text {
    font-size: 14px;
    color: var(--text-50);
    line-height: 1.6;
}

/* ============================================
   I'VE GOT YOUR BACK
   ============================================ */
.gyb {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

.gyb__text {
    margin-bottom: 48px;
}

.gyb__heading {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.15px;
    line-height: 1.5;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gyb__sub {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-50);
    max-width: 400px;
    line-height: 1.6;
}

.gyb__fan-track {
    position: relative;
    height: 160px;
    overflow: visible;
    display: flex;
    align-items: flex-end;
}

.gyb__fan {
    position: relative;
    height: 100%;
    width: 100%;
    flex-shrink: 0;
}

.gyb__card--hidden {
    z-index: 0 !important;
    border: none;
    box-shadow: none;
    background: transparent;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.gyb__card--hidden:hover {
    box-shadow: none;
}

.gyb__fan-track:hover .gyb__card--hidden {
    opacity: 1;
    filter: blur(0px);
}

.gyb__hidden-card {
    width: 100%;
    height: 100%;
    border-radius: var(--r-lg);
    border: 2px dashed var(--text-25);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
}

.gyb__hidden-card span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-50);
    line-height: 1.3;
}


.gyb__card {
    position: absolute;
    bottom: 0;
    width: 130px;
    height: 130px;
    border-radius: var(--r-lg);
    overflow: visible;
    border: 3px solid rgba(255, 255, 255, 0.35);
    box-shadow: 4px 10px 28px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
    will-change: transform;
    transition: box-shadow 0.3s ease;
}

.gyb__card:hover {
    box-shadow: 6px 16px 40px rgba(0, 0, 0, 0.2);
}

.gyb__card-inner {
    width: 100%;
    height: 100%;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gyb__card-inner img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.gyb__card-inner--1 {
    background: linear-gradient(160deg, #0f172a, #1e293b);
}

.gyb__card-inner--2 {
    background: linear-gradient(160deg, #3b1f6b, #6d28d9);
}

.gyb__card-inner--3 {
    background: linear-gradient(160deg, #0d7c3d, #4ade80);
}

.gyb__card-inner--4 {
    background: linear-gradient(160deg, #1e40af, #60a5fa);
}

.gyb__card-inner--5 {
    background: linear-gradient(160deg, #7c3aed, #c4b5fd);
}

.gyb__card-inner--6 {
    background: linear-gradient(160deg, #065f46, #6ee7b7);
}

.gyb__card-inner--7 {
    background: linear-gradient(160deg, #7f1d1d, #fca5a5);
}

/* ============================================
   BEHIND THE PIXELS
   ============================================ */
.behind-pixels {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

.behind-pixels__intro {
    margin-bottom: 48px;
}

.behind-pixels__heading {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.15px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.behind-pixels__subheading {
    font-size: 16px;
    color: var(--text-50);
    font-weight: 400;
    max-width: 480px;
    line-height: 1.6;
}

.behind-pixels__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 48px;
}

.behind-pixels__row--reverse {
    direction: rtl;
}

.behind-pixels__row--reverse>* {
    direction: ltr;
}

.behind-pixels__image--placeholder {
    background: #f0f1f4;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}

.behind-pixels__placeholder-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-25);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.behind-pixels__text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.behind-pixels__text p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.7;
}

.behind-pixels__quote {
    margin-top: 24px;
    background: linear-gradient(135deg, #f8f9fb 0%, #f0f2f5 100%);
    border-left: 2px solid var(--text);
    padding: 20px 24px;
    border-radius: 0 4px 4px 0;
}

.behind-pixels__quote p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.7;
    margin: 0;
}

.behind-pixels__image {
    border-radius: var(--r-sm);
    overflow: hidden;
}

.behind-pixels__img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: var(--r-sm);
}

/* ── Tilted photo/video card ─────────────────── */
.behind-pixels__image--card {
    overflow: visible;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btp-card-wrap {
    position: relative;
    width: 85%;
    margin: 24px auto;
    padding-bottom: 48px;
}

.btp-card {
    position: relative;
    transform: rotate(5deg);
    width: 100%;
}

.btp-card__media {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 40px;
    overflow: hidden;
    background: linear-gradient(160deg, #b8cfe0, #8aacc8);
    border: 3px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.13), 0 6px 20px rgba(0, 0, 0, 0.07);
}

.btp-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btp-card__sticker {
    position: absolute;
    top: 8px;
    right: -24px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 100px;
    padding: 9px 20px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    transform: rotate(12deg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 2;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

.behind-pixels__photos {
    position: relative;
    height: 340px;
    background-image: radial-gradient(circle, #d4d4d4 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: var(--r-sm);
    padding: 20px;
}

.btp-photo {
    position: absolute;
    background: #fff;
    padding: 8px 8px 32px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.04);
    width: 180px;
    transition: transform 0.3s var(--ease), z-index 0s;
}

.btp-photo:hover {
    transform: scale(1.04) rotate(0deg) !important;
    z-index: 10;
}

.btp-photo__img {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 2px;
}

.btp-photo--1 {
    transform: rotate(-9deg);
    left: 20px;
    top: 50px;
    z-index: 1;
}

.btp-photo--2 {
    transform: rotate(2deg);
    left: 130px;
    top: 20px;
    z-index: 3;
}

.btp-photo--3 {
    transform: rotate(8deg);
    left: 240px;
    top: 60px;
    z-index: 2;
}

.btp-photo--4 {
    transform: rotate(-4deg);
    left: 20px;
    top: 40px;
    z-index: 1;
}

.btp-photo--5 {
    transform: rotate(5deg);
    left: 135px;
    top: 15px;
    z-index: 3;
}

.btp-photo--6 {
    transform: rotate(-3deg);
    left: 250px;
    top: 65px;
    z-index: 2;
}

.btp-photo__img--1 {
    background: linear-gradient(145deg, #c4b5fd, #7c3aed);
}

.btp-photo__img--2 {
    background: linear-gradient(145deg, #86efac, #16a34a);
}

.btp-photo__img--3 {
    background: linear-gradient(145deg, #fca5a5, #dc2626);
}

.btp-photo__img--4 {
    background: linear-gradient(145deg, #93c5fd, #2563eb);
}

.btp-photo__img--5 {
    background: linear-gradient(145deg, #fde68a, #d97706);
}

.btp-photo__img--6 {
    background: linear-gradient(145deg, #6b7280, #1f2937);
}

.behind-pixels__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
    color: var(--text-25);
}

.behind-pixels__scroll-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.behind-pixels__dashed-line {
    flex: 1;
    border-top: 1px dashed var(--border);
}

/* ============================================
   LEARNING / CURRENTLY INTO
   ============================================ */
.learning {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding) var(--section-gap);
    border-top: 1px solid var(--border);
    padding-top: var(--section-gap);
}

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

.learning__card {
    background: var(--border-subtle);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: transform var(--t-normal);
}

.learning__card:hover {
    transform: translateY(-2px);
}

.learning__card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.learning__card-image--1 {
    background: linear-gradient(145deg, #1e40af, #60a5fa);
}

.learning__card-image--2 {
    background: linear-gradient(145deg, #7c2d12, #c2410c);
}

.learning__card-image--3 {
    background: linear-gradient(145deg, #065f46, #6ee7b7);
}

.learning__card-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 16px 20px 0;
}

.learning__card-sub {
    display: block;
    font-size: 12px;
    color: var(--text-25);
    padding: 4px 20px 20px;
}

/* ============================================
   CONTACT / CTA — thiti.design footer CTA
   ============================================ */
.contact {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--section-gap) var(--padding);
    border-top: 1px solid var(--border);
}

.contact__layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 64px;
}

.contact__content {
    text-align: left;
    max-width: 680px;
    margin: 0;
    flex: 1;
}

.contact__actions-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
}

.contact__logo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    flex-shrink: 0;
}

.contact__logo-line {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    display: inline-block;
    white-space: nowrap;
}

.contact__logo-line-wrap {
    display: flex;
    align-items: baseline;
}

.contact__logo-cursor {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 300;
    line-height: 1;
    color: var(--text-25);
    animation: blink-cursor 1s ease-in-out infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.contact__headline {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.contact__sub {
    font-size: 16px;
    color: var(--text-50);
    margin-bottom: 0;
}

.contact__actions {
    margin-bottom: 24px;
}

.contact__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    background: var(--text);
    padding: 12px 28px;
    border-radius: var(--r-full);
    transition: all var(--t-fast);
}

.contact__cta-btn:hover {
    opacity: 0.85;
}

.contact__socials {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
}

.contact__social-link {
    font-size: 14px;
    color: var(--text-25);
    font-weight: 500;
    transition: color var(--t-fast);
}

.contact__social-link:hover {
    color: var(--text);
    opacity: 1;
}

/* ============================================
   FOOTER — minimal
   ============================================ */
.footer {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px var(--padding) 48px;
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__text {
    font-size: 12px;
    color: var(--text-25);
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__link {
    font-size: 12px;
    color: var(--text-25);
    font-weight: 500;
    transition: color var(--t-fast);
}

.footer__link:hover {
    color: var(--text);
    opacity: 1;
}

/* ============================================
   CONTACT MODAL
   ============================================ */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-modal.is-open {
    opacity: 1;
    pointer-events: all;
}

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.contact-modal__content {
    position: relative;
    background: var(--bg);
    border-radius: 16px;
    padding: 40px;
    width: 420px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    transform: translateY(12px);
    filter: blur(8px);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.contact-modal.is-open .contact-modal__content {
    transform: translateY(0);
    filter: blur(0);
}

.contact-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-50);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.contact-modal__close:hover {
    background: var(--border-subtle);
    color: var(--text);
}

.contact-modal__title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15px;
    color: var(--text);
    margin-bottom: 24px;
}

.contact-modal__links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-modal__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: opacity 0.2s;
}

.contact-modal__link:last-child {
    border-bottom: none;
}

.contact-modal__link:hover {
    opacity: 0.6;
}

.contact-modal__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.contact-modal__value {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-50);
}

/* ============================================
   PASSWORD OVERLAY — full page
   ============================================ */
.pw-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.pw-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
}

.pw-overlay__page {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pw-overlay.is-open .pw-overlay__page {
    opacity: 1;
    transform: scale(1);
}

/* Back pill — centered above lock */
.pw-overlay__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--r-full);
    padding: 8px 18px 8px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-50);
    cursor: pointer;
    margin-bottom: 32px;
    transition: all 0.25s ease;
}

.pw-overlay__back:hover {
    color: var(--text);
    border-color: var(--text-25);
    background: rgba(0, 0, 0, 0.02);
}

/* Center content */
.pw-overlay__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 440px;
    width: 90%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease 0.1s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.pw-overlay.is-open .pw-overlay__center {
    opacity: 1;
    transform: translateY(0);
}

/* Lock icon ring */
.pw-overlay__lock-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-25);
    margin-bottom: 32px;
}

.pw-overlay__title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 500;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.pw-overlay__sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-50);
    line-height: 1.7;
    margin-bottom: 36px;
}

.pw-overlay__sub a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.pw-overlay__sub a:hover {
    opacity: 0.7;
}

/* Field */
.pw-overlay__field-wrap {
    width: 100%;
    max-width: 340px;
}

.pw-overlay__field {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 5px 5px 5px 22px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pw-overlay__field:focus-within {
    border-color: var(--text-25);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03);
}

.pw-overlay__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    outline: none;
    letter-spacing: 0.06em;
    min-width: 0;
}

.pw-overlay__input::placeholder {
    color: var(--text-25);
    font-weight: 400;
    letter-spacing: 0;
}

.pw-overlay__submit {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--text);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pw-overlay__submit:hover {
    opacity: 0.85;
    transform: scale(1.06);
}

.pw-overlay__error {
    font-size: 13px;
    font-weight: 500;
    color: #c53030;
    margin-top: 14px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.pw-overlay__error.is-visible {
    height: 20px;
    opacity: 1;
}

.pw-overlay__field.is-error {
    border-color: #c53030;
    animation: pw-shake 0.4s ease;
}

@keyframes pw-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* Decorative dots */
.pw-overlay__dots {
    display: flex;
    gap: 6px;
    margin-top: 48px;
}

.pw-overlay__dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border);
}

/* Footer text */
.pw-overlay__footer {
    position: absolute;
    bottom: 32px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-25);
    letter-spacing: 0.04em;
}

/* Mobile */
@media (max-width: 600px) {
    .pw-overlay__footer {
        bottom: 20px;
    }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
    will-change: opacity, transform, filter;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

.work__grid .reveal:nth-child(2) {
    transition-delay: 0.08s;
}

.work__grid .reveal:nth-child(3) {
    transition-delay: 0.16s;
}

.work__grid .reveal:nth-child(4) {
    transition-delay: 0.24s;
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 900px) {
    :root {
        --padding: 32px;
        --section-gap: 64px;
    }

    .hero__content {
        flex-direction: column;
        gap: 32px;
    }

    .hero__video {
        width: 100%;
        max-height: 280px;
    }

    .hero__headline {
        font-size: 36px;
    }

    .hero__details {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .work__grid {
        grid-template-columns: 1fr;
    }

    .other-works__item {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .services__layout {
        flex-direction: column;
        gap: 24px;
    }

    .impact__grid {
        grid-template-columns: 1fr;
    }

    .about__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .learning__grid {
        grid-template-columns: 1fr;
    }

    .behind-pixels__row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* On tablet/mobile: always show text before image */
    .behind-pixels__row .behind-pixels__image:first-child {
        order: 2;
    }

    .behind-pixels__row .behind-pixels__text:last-child {
        order: 1;
    }

    .behind-pixels__photos {
        height: 300px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 600px) {
    :root {
        --padding: 20px;
        --section-gap: 48px;
    }

    /* Nav */
    .nav__inner {
        height: 56px;
    }

    .nav__logo {
        font-size: 15px;
    }

    .nav__right {
        gap: 12px;
    }

    .nav__link {
        font-size: 13px;
    }

    /* Hero */
    .hero {
        padding-top: 32px;
        min-height: auto;
    }

    .hero__content {
        gap: 20px;
    }

    .hero__headline {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .hero__description {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .hero__description br {
        display: none;
    }

    .hero__video {
        width: 72%;
        height: auto;
        max-height: none;
        overflow: visible;
        margin-bottom: 0;
        align-self: flex-start;
    }

    .hero__video .btp-card-wrap {
        width: 100%;
        margin: 16px auto;
    }

    .hero__details {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding-top: 24px;
    }

    /* Work */
    .work__grid {
        grid-template-columns: 1fr;
    }

    .work-card__image {
        aspect-ratio: 16 / 10;
    }

    /* Other works */
    .other-works__item {
        gap: 20px;
    }

    /* Services */
    .services__item {
        font-size: 18px;
    }

    /* Impact */
    .impact__grid {
        grid-template-columns: 1fr;
    }

    /* Experience — card style on mobile */
    .experience__row--header {
        display: none;
    }

    .experience__row {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .experience__row:last-child {
        border-bottom: none;
    }

    .experience__cell {
        padding: 0;
        font-size: 13px;
    }

    .experience__cell:first-child {
        font-weight: 600;
        font-size: 14px;
        color: var(--text);
        margin-bottom: 2px;
    }

    .experience__cell:nth-child(2) {
        color: var(--text-50);
        font-size: 12px;
    }

    .experience__cell:nth-child(3) {
        color: var(--text-70);
    }

    /* Contact */
    .contact__layout {
        flex-direction: column;
        gap: 32px;
    }

    .contact__logo {
        align-items: flex-start;
    }

    .contact__actions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .contact__headline {
        font-size: 24px;
    }

    .contact__headline br {
        display: none;
    }

    /* Footer */
    .footer__inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .contact-modal__content {
        padding: 24px;
        width: 100%;
        max-width: calc(100vw - 32px);
    }

    .contact-modal__close {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .behind-pixels__photos {
        height: 220px;
    }

    .btp-photo {
        width: 110px;
        padding: 5px 5px 20px;
    }

    .btp-photo--1 {
        left: 5px;
        top: 35px;
    }

    .btp-photo--2 {
        left: 75px;
        top: 10px;
    }

    .btp-photo--3 {
        left: 150px;
        top: 40px;
    }

    .btp-photo--4 {
        left: 5px;
        top: 25px;
    }

    .btp-photo--5 {
        left: 80px;
        top: 5px;
    }

    .btp-photo--6 {
        left: 155px;
        top: 45px;
    }

    .impact__card {
        padding: 24px 20px;
    }

    .pw-overlay__lock-ring {
        margin-bottom: 24px;
    }

    .pw-overlay__sub {
        margin-bottom: 24px;
    }

    .pw-overlay__dots {
        margin-top: 32px;
    }

    .gyb__fan-track {
        height: 120px;
    }

    .gyb__card {
        width: 100px;
        height: 100px;
    }

    .reveal {
        filter: blur(4px);
    }

}

/* ============================================
   TOUCH DEVICES — hide hover-only decorations
   ============================================ */
@media (hover: none) {
    .work-cursor {
        display: none !important;
    }

    .work-card {
        cursor: pointer;
    }

    .services__item-card {
        display: none;
    }

    .now-playing {
        display: none;
    }

    .hero__preview {
        display: none;
    }

    .hero__map-card {
        display: none;
    }

    .work__more-pill[data-tooltip]:hover::after {
        display: none;
    }

    .work-card--locked:hover .work-card__lock-text {
        display: inline;
    }

    .work-card--locked:hover .work-card__lock-hover {
        display: none;
    }

    .btp-photo {
        transition: none;
    }

    .btp-photo:hover {
        transform: none !important;
        z-index: auto;
    }
}

/* ============================================
   CASE STUDY PAGE — kaamdesigns style
   ============================================ */
.cs {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding);
}

/* Hero Banner */
.cs-hero {
    position: relative;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--padding);
    margin-top: 24px;
}

.cs-hero__image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
}

.cs-hero__overlay {
    position: absolute;
    bottom: 40px;
    left: calc(var(--padding) + 40px);
}

.cs-hero__tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.cs-hero__tag {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--r-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cs-hero__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Overview — two-column */
.cs-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 64px;
    padding: 80px 0 64px;
    border-bottom: 1px solid var(--border);
}

.cs-overview__label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-50);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 4px;
}

.cs-overview__text p {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.7;
    max-width: 640px;
}

/* Metadata Grid */
.cs-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}

.cs-meta__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-meta__label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-50);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cs-meta__value {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.5;
}

/* Content Blocks — numbered sections */
.cs-block {
    padding: 80px 0 32px;
}

.cs-block__header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
}

.cs-block__label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-25);
    letter-spacing: 0.05em;
}

.cs-block__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
}

.cs-block__desc {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--text-70);
    line-height: 1.7;
    max-width: 640px;
}

/* Images */
.cs-image {
    margin-bottom: 12px;
}

.cs-image__full {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.cs-image--grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cs-image--grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cs-image__cell {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* Split — text + image side by side */
.cs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
}

.cs-split__title {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 16px;
}

.cs-split__desc {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    color: var(--text-70);
    line-height: 1.7;
}

.cs-split__image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
}

/* Process Section */
.cs-process {
    padding: 80px 0 64px;
    border-top: 1px solid var(--border);
}

.cs-process__header {
    margin-bottom: 40px;
}

.cs-process__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 680px;
}

.cs-process__content p {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--text-70);
    line-height: 1.8;
}

/* Next Project CTA */
.cs-next {
    padding: 80px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.cs-next__label {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-25);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.cs-next__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.5vw, 44px);
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease;
}

.cs-next__title:hover {
    opacity: 0.5;
}

/* Case Study Footer */
.cs-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 48px;
}

.cs-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-footer__right {
    display: flex;
    gap: 24px;
}

.cs-footer__link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-50);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cs-footer__link:hover {
    color: var(--text);
}

/* Case study responsive — tablet */
@media (max-width: 900px) {
    .cs-hero__overlay {
        bottom: 24px;
        left: calc(var(--padding) + 24px);
    }

    .cs-overview {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 48px 0 40px;
    }

    .cs-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .cs-image--grid-3 {
        grid-template-columns: 1fr;
    }

    .cs-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Case study responsive — mobile */
@media (max-width: 600px) {
    .cs-hero {
        margin-top: 16px;
    }

    .cs-hero__title {
        font-size: 24px;
    }

    .cs-hero__overlay {
        bottom: 20px;
        left: calc(var(--padding) + 16px);
    }

    .cs-hero__tags {
        gap: 6px;
        margin-bottom: 10px;
    }

    .cs-hero__tag {
        font-size: 11px;
        padding: 4px 10px;
    }

    .cs-meta {
        grid-template-columns: 1fr;
    }

    .cs-block {
        padding: 48px 0 24px;
    }

    .cs-image--grid-2 {
        grid-template-columns: 1fr;
    }

    .cs-next__title {
        font-size: 24px;
    }

    .cs-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}