:root {
    color-scheme: light;
    --navy: #081d2d;
    --navy-soft: #103149;
    --ink: #10283b;
    --muted: #607181;
    --gold: #e7b559;
    --gold-light: #f7d998;
    --canvas: #f3f5f3;
    --line: #dce4e7;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.page-width { width: min(100% - 48px, 1320px); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 100; padding: 12px 16px; background: #fff; color: var(--navy); border-radius: 6px; }
.skip-link:focus { top: 12px; }

.site-header { position: relative; z-index: 10; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 92px; gap: 28px; }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand strong { display: block; font-size: 16px; letter-spacing: .16em; white-space: nowrap; }
.brand small, .footer-brand small { display: block; margin-top: 4px; color: #aabcc7; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 45px); }
.site-nav a { color: #c4d3dd; font-size: 13px; font-weight: 700; transition: color .2s; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--gold-light); }
.header-link { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 42px; padding: 0 17px; border: 1px solid rgba(231,181,89,.6); border-radius: 7px; color: var(--gold-light); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.header-link:hover { background: rgba(231,181,89,.13); }

.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 73% 38%, #123f57 0, transparent 39%), linear-gradient(125deg, #071a28 0%, #0b2a3d 68%, #071c2a 100%); color: #fff; }
.hero::before { position: absolute; top: 0; right: 5%; bottom: 0; width: 42%; content: ""; border-inline: 1px solid rgba(255,255,255,.05); pointer-events: none; }
.hero__glow { position: absolute; right: -180px; top: -220px; width: 650px; height: 650px; border-radius: 50%; background: rgba(231,181,89,.08); filter: blur(80px); pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(35px, 6vw, 100px); padding-block: clamp(60px, 8vw, 108px) 86px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--gold-light); font-size: 11px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow__line { width: 28px; height: 1px; background: var(--gold); }
.hero h1 { max-width: 660px; margin: 28px 0 20px; font-size: clamp(54px, 6.2vw, 92px); font-weight: 800; letter-spacing: -.055em; line-height: .99; }
.hero h1 em, .conception h2 em { color: var(--gold-light); font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; }
.hero__copy > p { max-width: 530px; margin: 0; color: #bbced8; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.8; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 29px; margin-top: 35px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; min-height: 54px; padding: 0 22px; border-radius: 7px; font-size: 13px; font-weight: 800; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button--gold { background: var(--gold); color: #132432; }
.button--gold:hover { background: var(--gold-light); }
.text-link { color: #dce8ed; font-size: 13px; font-weight: 700; }
.text-link span { margin-left: 8px; color: var(--gold); }
.text-link:hover { color: #fff; }
.hero__note { display: flex; align-items: center; gap: 11px; margin-top: 55px; color: #8da8b6; font-size: 12px; letter-spacing: .03em; }
.hero__note-mark { width: 26px; height: 26px; border: 1px solid rgba(231,181,89,.6); border-radius: 50%; background: radial-gradient(circle, var(--gold) 2px, transparent 3px); }
.hero__visual { position: relative; min-width: 0; padding: 22px 33px 0 0; }
.hero__frame { position: relative; height: clamp(370px, 37vw, 540px); overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 160px 12px 12px 12px; background: #294456; box-shadow: 0 35px 80px rgba(0,0,0,.3); }
.hero__frame::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(transparent, rgba(2,16,28,.75)); pointer-events: none; }
.hero__frame > img { width: 100%; height: 100%; object-fit: cover; }
.hero__frame-label { position: absolute; z-index: 1; right: 30px; bottom: 27px; left: 34px; display: grid; gap: 7px; }
.hero__frame-label span { color: var(--gold-light); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.hero__frame-label strong { font-size: clamp(20px, 2.1vw, 28px); letter-spacing: -.02em; }
.hero__inset { position: absolute; right: 0; bottom: -45px; width: 37%; overflow: hidden; border: 6px solid var(--navy); border-radius: 9px; box-shadow: 0 18px 40px rgba(0,0,0,.38); }
.hero__inset img { width: 100%; aspect-ratio: 1.18; object-fit: cover; }
.hero__inset span { position: absolute; right: 9px; bottom: 9px; padding: 6px 8px; border-radius: 3px; background: var(--gold); color: var(--navy); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.hero__orbit { position: absolute; top: 9%; right: -23px; writing-mode: vertical-rl; color: rgba(255,255,255,.36); font-size: 9px; font-weight: 700; letter-spacing: .25em; }
.hero__bottom { position: relative; display: flex; gap: clamp(20px, 4vw, 55px); padding-block: 19px; border-top: 1px solid rgba(255,255,255,.12); color: #82a0af; font-size: 10px; font-weight: 800; letter-spacing: .21em; }
.hero--video { display: flex; flex-direction: column; min-height: calc(100vh - 92px); min-height: max(680px, calc(100svh - 92px)); background: #0b2537 url('../img/khmd-gallery/project-6.png') center / cover no-repeat; }
.hero--video::before { display: none; }
.hero__video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.hero__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(3,18,30,.94) 0%, rgba(3,18,30,.83) 37%, rgba(3,18,30,.4) 75%, rgba(3,18,30,.25) 100%), linear-gradient(0deg, rgba(3,18,30,.68), transparent 34%); pointer-events: none; }
.hero__video-layout { position: relative; z-index: 2; display: flex; flex: 1; align-items: end; justify-content: space-between; gap: 32px; padding-block: clamp(92px, 12vh, 155px) 74px; }
.hero--video .hero__copy { max-width: 810px; }
.hero--video h1 { max-width: 810px; font-size: clamp(64px, 8vw, 116px); text-shadow: 0 4px 22px rgba(0,0,0,.24); }
.hero--video .hero__copy > p { max-width: 620px; color: #e3edf1; }
.hero--video .hero__note { color: #d0e0e8; }
.hero--video .hero__bottom { z-index: 2; width: min(100% - 48px, 1320px); color: #c6d7df; }
.hero__video-control { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; min-height: 46px; margin-bottom: 5px; padding: 0 16px; border: 1px solid rgba(255,255,255,.58); border-radius: 6px; background: rgba(5,25,38,.66); color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; backdrop-filter: blur(10px); }
.hero__video-control:hover { background: rgba(5,25,38,.9); }
.hero__video-control [data-video-control-icon] { font-size: 19px; line-height: 1; }

.gallery-section { padding-block: clamp(75px, 9vw, 122px) clamp(85px, 9vw, 130px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.eyebrow--dark { color: #977039; }
.section-heading h2 { margin: 17px 0 14px; color: var(--ink); font-size: clamp(36px, 4.3vw, 59px); letter-spacing: -.052em; line-height: 1.1; }
.heading-dot { color: #c58d3d; }
.section-heading p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.section-heading__index { padding-bottom: 8px; color: #aebdc2; font-size: 11px; font-weight: 800; letter-spacing: .2em; white-space: nowrap; }
.section-heading__index span { margin-inline: 5px; color: #c79853; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 38px 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 40px; padding: 0 16px; border: 1px solid #d8e0e2; border-radius: 5px; background: transparent; color: #516372; cursor: pointer; font-size: 12px; font-weight: 800; transition: background .2s, color .2s, border-color .2s; }
.filter:hover { border-color: #a58b62; color: var(--ink); }
.filter.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
.gallery-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.gallery-count strong { color: var(--ink); font-size: 15px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 34px rgba(13,40,57,.04); transition: transform .25s, box-shadow .25s; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 19px 45px rgba(13,40,57,.11); }
.project-card--featured { border-color: #d5bd8c; }
.project-card__image { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #d9e1e4; cursor: zoom-in; text-align: left; }
.project-card__image img { width: 100%; height: clamp(210px, 19vw, 270px); object-fit: cover; transition: transform .45s; }
.project-card:hover .project-card__image img { transform: scale(1.055); }
.project-card__view { position: absolute; right: 15px; bottom: 15px; padding: 9px 11px; border-radius: 5px; background: rgba(7,28,43,.88); color: #fff; font-size: 11px; font-weight: 700; }
.project-card__body { position: relative; min-height: 166px; padding: 23px 24px 28px; }
.project-card__category { color: #a77632; font-size: 10px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.project-card__body h3 { max-width: 90%; margin: 12px 0 9px; color: var(--ink); font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -.02em; }
.project-card__body p { max-width: 90%; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.project-card__number { position: absolute; top: 23px; right: 24px; color: #c3cdd0; font-size: 13px; font-weight: 800; }

.conception { position: relative; overflow: hidden; padding-block: 76px; background: linear-gradient(105deg, #092234, #123a52); color: #fff; }
.conception::after { position: absolute; top: -110px; right: 12%; width: 410px; height: 410px; border: 1px solid rgba(231,181,89,.16); border-radius: 50%; content: ""; pointer-events: none; }
.conception__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr .75fr; align-items: end; gap: 55px; }
.conception h2 { margin: 18px 0 0; font-size: clamp(34px, 4.1vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.conception__grid > p { max-width: 470px; margin: 0 0 6px; color: #b8cbd4; font-size: 15px; line-height: 1.85; }
.site-footer { background: #061724; color: #acc0ca; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 105px; font-size: 11px; }
.footer-brand { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.footer-brand img { width: 45px; height: 45px; object-fit: contain; }
.site-footer__inner > a:last-child { color: var(--gold-light); white-space: nowrap; }

.lightbox { position: fixed; width: min(94vw, 1150px); max-width: none; max-height: 92vh; padding: 0; overflow: visible; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; background: #091e2d; color: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.lightbox::backdrop { background: rgba(2,13,22,.86); backdrop-filter: blur(7px); }
.lightbox__content { overflow: auto; max-height: 92vh; }
.lightbox__content img { display: block; width: 100%; max-height: 76vh; object-fit: contain; background: #061724; }
.lightbox__caption { display: grid; gap: 4px; padding: 18px 22px; }
.lightbox__caption strong { font-size: 17px; }
.lightbox__caption span { color: #aebfcb; font-size: 13px; }
.lightbox__close { position: absolute; z-index: 2; top: -17px; right: -17px; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: var(--gold); color: var(--navy); cursor: pointer; font-size: 27px; line-height: 1; }

@media (max-width: 1050px) {
    .site-nav { gap: 18px; }
    .hero__grid { grid-template-columns: 1fr 1fr; gap: 25px; }
    .hero__frame { height: 430px; }
    .gallery-grid { gap: 16px; }
    .project-card__body { padding-inline: 18px; }
}
@media (max-width: 800px) {
    .site-header__inner { min-height: 78px; }
    .brand img { width: 52px; height: 52px; }
    .brand strong { font-size: 13px; }
    .site-nav { display: none; }
    .hero__grid { grid-template-columns: 1fr; padding-block: 55px 78px; }
    .hero h1 { max-width: 580px; }
    .hero__note { margin-top: 30px; }
    .hero__visual { max-width: 650px; padding-right: 25px; }
    .hero__frame { height: clamp(300px, 64vw, 480px); }
    .hero--video { min-height: calc(100vh - 78px); min-height: max(680px, calc(100svh - 78px)); }
    .hero__video-layout { padding-block: 70px 45px; }
    .hero--video h1 { font-size: clamp(60px, 10vw, 84px); }
    .hero__video { object-position: 58% center; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .conception__grid { grid-template-columns: 1fr; gap: 25px; }
}
@media (max-width: 550px) {
    .page-width { width: min(100% - 32px, 1320px); }
    .site-header__inner { gap: 9px; }
    .brand { gap: 6px; }
    .brand img { width: 43px; height: 43px; }
    .brand strong { font-size: 11px; letter-spacing: .08em; }
    .brand small { font-size: 8px; letter-spacing: .04em; }
    .header-link { min-height: 36px; padding: 0 9px; font-size: 10px; }
    .hero__grid { padding-top: 45px; }
    .hero--video { min-height: max(690px, calc(100svh - 78px)); }
    .hero__video-layout { flex-direction: column; align-items: flex-start; justify-content: center; gap: 24px; padding-block: 64px 28px; }
    .hero--video h1 { font-size: clamp(48px, 12vw, 69px); }
    .hero--video .hero__note { margin-top: 30px; }
    .hero__video-control { align-self: flex-end; }
    .hero h1 { margin-top: 19px; font-size: clamp(48px, 12vw, 69px); }
    .hero__actions { gap: 19px; }
    .hero__frame { height: 330px; border-radius: 95px 8px 8px 8px; }
    .hero__inset { bottom: -26px; width: 39%; border-width: 4px; }
    .hero__bottom { justify-content: space-between; gap: 8px; font-size: 8px; letter-spacing: .08em; }
    .section-heading__index { display: none; }
    .gallery-toolbar { display: block; }
    .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; }
    .filter { flex: 0 0 auto; }
    .gallery-count { display: block; margin-top: 11px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .project-card__image img { height: 230px; }
    .project-card__body { min-height: 0; }
    .conception { padding-block: 60px; }
    .site-footer__inner { flex-wrap: wrap; justify-content: space-between; padding-block: 24px; }
    .site-footer__inner > span { order: 3; width: 100%; }
}
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; --canvas: #0b2030; --ink: #f0f5f6; --muted: #a5bbc7; --line: #264557; }
    .gallery-section { background: var(--canvas); }
    .project-card { background: #122d40; box-shadow: none; }
    .project-card--featured { border-color: #8f7348; }
    .filter { border-color: #325064; color: #bbced7; }
    .filter:hover { color: #fff; }
    .filter.is-active { border-color: var(--gold); background: var(--gold); color: #172534; }
    .eyebrow--dark, .project-card__category { color: var(--gold-light); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero__video, .hero__video-control { display: none; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
