/* Homepage. Palette comes from the studio portrait: navy wall, lamp amber, warm paper. */
.kh-main { padding: 0 !important; max-width: none !important; width: 100%; }

.kh {
    --ink: #0b1626;
    --ink-2: #13233a;
    --paper: #f7f3ea;
    --card: #fffdf8;
    --text: #15202f;
    --muted: #5f6673;
    --line: #e3dccd;
    --amber: #f4b24a;
    --amber-deep: #a9660c;
    --on-ink: #f7f3ea;
    --on-ink-muted: #b7c0cc;
    --shadow: 0 24px 50px -28px rgba(11, 22, 38, .4);
    background: var(--paper);
    color: var(--text);
    font-family: 'Anek Bangla', 'Inter', system-ui, sans-serif;
}
.dark .kh {
    --paper: #0d1929;
    --card: #14233a;
    --text: #f1ece1;
    --muted: #a7b1bf;
    --line: #26374f;
    --amber-deep: #f4b24a;
    --shadow: 0 24px 50px -28px rgba(0, 0, 0, .7);
}
.kh *, .kh *::before, .kh *::after { box-sizing: border-box; }
.kh a { color: inherit; text-decoration: none; }
.kh h1, .kh h2, .kh h3, .kh p, .kh ol, .kh dl, .kh dd, .kh figure { margin: 0; padding: 0; }
.kh ol { list-style: none; }
.kh a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.kh-wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.kh-section { padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3rem, 7vw, 6rem); }

/* Buttons and links */
.kh-btn {
    display: inline-flex; align-items: center; gap: .6rem;
    background: var(--amber); color: #1b1305 !important;
    padding: .95rem 1.7rem; border-radius: 10px;
    font-weight: 700; font-size: 1.05rem;
    box-shadow: 0 14px 30px -14px rgba(244, 178, 74, .75);
    transition: transform .2s ease, background .2s ease;
}
.kh-btn:hover { background: #ffc566; transform: translateY(-2px); }
.kh-btn:active { transform: translateY(1px) scale(.99); }
.kh-link { font-weight: 600; border-bottom: 1px solid rgba(247, 243, 234, .4); padding-bottom: 2px; transition: border-color .2s ease; }
.kh-link:hover { border-color: var(--amber); }
.kh-more { font-weight: 600; color: var(--amber-deep) !important; white-space: nowrap; }
.kh-more span { display: inline-block; transition: transform .2s ease; }
.kh-more:hover span { transform: translateX(4px); }

/* Cover */
.kh-cover { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--on-ink); }
.kh-cover::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, var(--ink) 34%, rgba(11, 22, 38, .86) 47%, rgba(11, 22, 38, 0) 68%),
        linear-gradient(0deg, var(--ink) 0, rgba(11, 22, 38, 0) 22%);
}
.kh-cover-photo {
    position: absolute; z-index: -2; top: 0; right: 0; height: 100%; width: 72%;
    object-fit: cover; object-position: 72% 20%;
}
.kh-cover-inner { min-height: min(calc(100dvh - 5.5rem), 820px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(2rem, 4vw, 3.25rem); }
.kh-byline { font-weight: 600; font-size: 1.05rem; color: var(--amber); }
.kh-byline span { color: var(--on-ink-muted); font-weight: 400; margin-left: .6rem; }
.kh-cover-title {
    margin-top: 1.4rem !important;
    font-size: clamp(3rem, min(6.6vw, 10.5dvh), 5.6rem); line-height: 1.08; font-weight: 800; letter-spacing: -.012em;
}
.kh-cover-title em { font-style: normal; color: var(--amber); }
.kh-cover-lead { margin-top: 1.6rem !important; max-width: 31rem; font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.75; color: #d6dce5; }
.kh-cover-actions { margin-top: 2.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; }
.kh .kh-facts { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); display: flex; gap: clamp(1.75rem, 4vw, 3.5rem); }
.kh-facts dd { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.1; }
.kh-facts dt { margin-top: .2rem; font-size: .95rem; color: var(--on-ink-muted); }

/* Ribbon */
.kh-ribbon { overflow: hidden; background: var(--amber); color: #1b1305; padding-block: .85rem; }
.kh-ribbon-track { display: flex; width: max-content; animation: kh-slide 38s linear infinite; }
.kh-ribbon span { padding-inline: 1.9rem; font: 600 1rem 'Inter', sans-serif; white-space: nowrap; position: relative; }
.kh-ribbon span::after { content: "/"; position: absolute; right: -.15rem; opacity: .4; }
@keyframes kh-slide { to { transform: translateX(-50%); } }

/* Section heads */
.kh-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.kh-head h2, .kh-index h2, .kh-about h2, .kh-close h2 { font-weight: 800; letter-spacing: -.008em; line-height: 1.16; }
.kh-head h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.kh-head p { color: var(--muted); font-size: 1.05rem; }
.kh-head .kh-more { margin-left: auto; }

/* Shelf */
.kh-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 1.8vw, 1.5rem); }
.kh-item { min-width: 0; }
.kh-item a { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .25s ease, box-shadow .25s ease; }
.kh-item a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.kh-item-media { display: block; aspect-ratio: 1; overflow: hidden; background: var(--line); }
.kh-item-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.kh-item a:hover img { transform: scale(1.04); }
.kh-item-body { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: .75rem; padding: 1rem 1.1rem 1.15rem; }
.kh-item-title { font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.kh-item-price { font-weight: 700; font-size: 1.15rem; color: var(--amber-deep); }
.kh-item-price s { margin-left: .4rem; font-weight: 400; font-size: .92rem; color: var(--muted); }

.kh-item-lead { grid-column: span 2; grid-row: span 2; }
.kh-item-lead a { background: var(--ink); color: var(--on-ink); }
.kh-item-lead .kh-item-media { aspect-ratio: auto; flex: 1; min-height: 0; }
.kh-item-lead .kh-item-body { flex: none; padding: 1.4rem 1.6rem 1.6rem; }
.kh-item-lead .kh-item-title { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.35; }
.kh-item-lead .kh-item-price { font-size: 1.4rem; color: var(--amber); }
.kh-item-lead .kh-item-price s { color: var(--on-ink-muted); }

/* Category index */
.kh-index { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); padding-top: 0; }
.kh-index h2 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); position: sticky; top: 7rem; align-self: start; }
.kh-index li + li { border-top: 1px solid var(--line); }
.kh-index li:first-child a { padding-top: .4rem; }
.kh-index li a { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: baseline; gap: 1rem; padding-block: 1.35rem; transition: padding-left .25s ease, color .25s ease; }
.kh-index li a:hover { padding-left: .6rem; color: var(--amber-deep); }
.kh-index-no { color: var(--muted); }
.kh-index-name { font-size: clamp(1.25rem, 2.3vw, 1.8rem); font-weight: 600; line-height: 1.3; }
.kh-index-count { color: var(--muted); white-space: nowrap; }

/* About */
.kh-about { background: var(--ink); color: var(--on-ink); padding-block: clamp(4rem, 8vw, 7rem); }
.kh-about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.kh-about figure { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 18px; transform: translateY(-1rem); }
.kh-about img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; display: block; }
.kh-about h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.kh-about p:not(.kh-sign) { margin-top: 1.25rem; max-width: 36rem; color: #d6dce5; font-size: 1.12rem; line-height: 1.8; }
.kh-sign { margin-top: 1.8rem !important; color: var(--amber); font-weight: 600; font-size: 1.2rem; }
.kh-about .kh-more { display: inline-block; margin-top: .7rem; color: var(--on-ink) !important; }

/* Blog */
.kh-blog { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); }
.kh-blog-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; display: block; margin-bottom: 1.2rem; }
.kh-blog-meta { display: block; color: var(--amber-deep); font-size: .95rem; font-weight: 600; }
.kh-blog h3 { margin-top: .4rem; font-weight: 700; line-height: 1.38; transition: color .2s ease; }
.kh-blog a:hover h3 { color: var(--amber-deep); }
.kh-blog-lead h3 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.kh-blog-list h3 { font-size: 1.25rem; }
.kh-blog p { margin-top: .6rem; color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.kh-blog-list article { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.kh-blog-list article:first-child { padding-top: 0; border-top: 0; }

/* Close */
.kh-close { background: var(--ink-2); color: var(--on-ink); padding-block: clamp(4rem, 8vw, 6.5rem) clamp(4.5rem, 9vw, 7rem); }
.kh-close h2 { max-width: 46rem; font-size: clamp(2rem, 4.6vw, 3.7rem); }
.kh-close p { margin-block: 1.1rem 1.9rem; color: var(--on-ink-muted); font-size: 1.15rem; }

/* Reveal, only when JS has switched it on */
.kh-motion [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.kh-motion [data-reveal].is-in { opacity: 1; transform: none; }
.kh-motion .kh-about figure[data-reveal].is-in { transform: translateY(-1rem); }

@media (max-width: 1024px) {
    .kh-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .kh-item-lead { grid-column: 1 / -1; grid-row: auto; }
    .kh-item-lead a { flex-direction: row; }
    .kh-item-lead .kh-item-media { flex: 0 0 42%; aspect-ratio: 1; }
    .kh-item-lead .kh-item-body { flex: 1; justify-content: center; }
}
@media (max-width: 760px) {
    .kh-cover-photo { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-position: 70% 0; }
    .kh-cover::after { inset: 0 0 auto; height: 100vw; background: linear-gradient(0deg, var(--ink) 4%, rgba(11, 22, 38, .82) 30%, rgba(11, 22, 38, 0) 62%); }
    .kh-cover-inner { min-height: 0; margin-top: -9rem; padding-block: 0 2.75rem; position: relative; }
    .kh-byline span { display: block; margin-left: 0; font-size: .95rem; }
    .kh-cover-title { font-size: clamp(2.7rem, 13.2vw, 3.6rem); }
    .kh-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kh-item-lead { grid-column: span 2; }
    .kh-item-lead a { flex-direction: column; }
    .kh-item-lead .kh-item-media { flex: none; aspect-ratio: 16 / 10; }
    .kh-index, .kh-about-grid, .kh-blog { grid-template-columns: minmax(0, 1fr); }
    .kh-index h2 { position: static; }
    .kh-index li a { grid-template-columns: 2.2rem minmax(0, 1fr) auto; }
    .kh-about figure { transform: none; }
    .kh-motion .kh-about figure[data-reveal].is-in { transform: none; }
    .kh-head .kh-more { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .kh-ribbon-track { animation: none; }
    .kh *, .kh *::before { transition: none !important; }
}
