:root {
    --ink: #25231f;
    --muted: #736f67;
    --paper: #f5f1e9;
    --paper-deep: #e8e0d3;
    --white: #fffdf8;
    --accent: #b95335;
    --accent-dark: #8d3824;
    --line: rgba(37, 35, 31, .14);
    --shadow: 0 24px 70px rgba(45, 37, 27, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Alexandria", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    z-index: 20;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }

.site-header {
    height: 104px;
    max-width: 1380px;
    padding: 0 4vw;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}
.site-header.compact { height: 88px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    border: 1px solid var(--ink);
    border-radius: 50% 50% 44% 56%;
    font: 700 23px "Reem Kufi", sans-serif;
    transform: rotate(-5deg);
}
.brand > span:last-child { display: flex; flex-direction: column; }
.brand b { font: 700 19px "Reem Kufi", sans-serif; line-height: 1.1; }
.brand small { font-size: 9px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.quiet-link, .back-link { font-size: 13px; border-bottom: 1px solid var(--ink); padding-bottom: 5px; }
.back-link span { color: var(--accent); margin-right: 7px; }

.hero {
    min-height: calc(100vh - 104px);
    max-height: 900px;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    max-width: 1380px;
    margin: auto;
    padding: 5vh 5vw 10vh;
    align-items: center;
    overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.hero h1, .album-title h1 {
    font: 600 clamp(58px, 8.2vw, 126px)/.92 "Reem Kufi", sans-serif;
    letter-spacing: -.055em;
    margin: 0;
}
.hero h1 em { color: var(--accent); font-style: normal; position: relative; }
.hero h1 em::after {
    content: "";
    position: absolute;
    height: 7px;
    left: 5px;
    right: 5px;
    bottom: -5px;
    background: var(--accent);
    border-radius: 100%;
    transform: rotate(-2deg) scaleY(.35);
}
.hero-lead {
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
    max-width: 430px;
    margin: 34px 0 26px;
}
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    min-height: 49px;
    padding: 0 24px;
    background: var(--ink);
    color: white;
    border: 0;
    cursor: pointer;
    font-size: 12px;
    transition: .25s ease;
}
.primary-button:hover { background: var(--accent); transform: translateY(-2px); }
.primary-button span { color: #e4ad91; font-size: 17px; }
.hero-art { height: 620px; position: relative; }
.floating-photo {
    position: absolute;
    margin: 0;
    padding: 11px 11px 42px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .5s ease;
}
.floating-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.84); }
.photo-1 { width: 48%; height: 57%; right: 13%; top: 3%; transform: rotate(4deg); z-index: 2; }
.photo-2 { width: 43%; height: 49%; left: 4%; top: 34%; transform: rotate(-7deg); z-index: 3; }
.photo-3 { width: 40%; height: 43%; right: 8%; bottom: 3%; transform: rotate(9deg); z-index: 1; }
.photo-1:hover { transform: rotate(1deg) scale(1.02); }
.photo-2:hover { transform: rotate(-3deg) scale(1.02); }
.photo-3:hover { transform: rotate(5deg) scale(1.02); }
.scribble {
    position: absolute;
    left: 43%;
    top: 9%;
    z-index: 4;
    font: 500 30px "Reem Kufi", sans-serif;
    color: var(--accent);
    transform: rotate(-12deg);
}
.empty-frame {
    position: absolute;
    inset: 10% 12%;
    display: grid;
    place-items: center;
    border: 1px dashed var(--muted);
    transform: rotate(4deg);
    color: var(--muted);
}

.albums-section { padding: 110px max(5vw, calc((100vw - 1240px)/2)); background: #ece5da; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 46px; }
.section-heading h2 { font: 600 clamp(42px, 6vw, 76px) "Reem Kufi", sans-serif; margin: 0; }
.section-heading > p { color: var(--muted); font-size: 12px; }
.album-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px 34px; }
.album-card { min-width: 0; }
.album-cover { height: clamp(330px, 41vw, 570px); position: relative; overflow: hidden; background: #ddd3c5; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-number, .open-album {
    position: absolute;
    background: rgba(245,241,233,.92);
    backdrop-filter: blur(8px);
}
.album-number { top: 14px; right: 14px; padding: 10px 13px; font-size: 11px; }
.open-album { left: 14px; bottom: 14px; padding: 12px 15px; font-size: 10px; transform: translateY(10px); opacity: 0; transition: .3s; }
.album-card:hover .open-album { transform: none; opacity: 1; }
.album-meta { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-top: 18px; }
.album-meta h3 { margin: 0; font: 600 25px "Reem Kufi", sans-serif; }
.album-meta p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.album-meta > span { flex: none; margin-top: 8px; font-size: 10px; color: var(--muted); }
.empty-state, .admin-empty { text-align: center; padding: 80px 25px; border: 1px solid var(--line); }
.empty-state .empty-icon { color: var(--accent); font-size: 35px; }
.empty-state h3 { font: 600 28px "Reem Kufi"; margin: 12px 0 6px; }
.empty-state p { color: var(--muted); font-size: 12px; margin-bottom: 25px; }
.site-footer { min-height: 110px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); }

/* Album */
.album-main { max-width: 1450px; padding: 70px 4vw 110px; margin: auto; }
.album-title { text-align: center; padding: 25px 0 70px; }
.album-title h1 { font-size: clamp(50px, 8vw, 105px); }
.album-title > p:last-child { color: var(--muted); font-size: 13px; margin-top: 20px; }
.gallery-toolbar {
    position: sticky;
    top: 12px;
    z-index: 12;
    max-width: 800px;
    min-height: 62px;
    margin: 0 auto 38px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,253,248,.88);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: 0 10px 35px rgba(45,37,27,.06);
}
.view-switcher { display: flex; gap: 2px; }
.view-switcher button {
    width: 40px; height: 40px; padding: 11px;
    border: 0; background: transparent; cursor: pointer;
}
.view-switcher button.active { background: var(--ink); color: white; }
.view-switcher svg { width: 100%; fill: currentColor; }
.view-name { font-size: 10px; color: var(--muted); padding-left: 15px; border-left: 1px solid var(--line); }
.size-control { margin-right: auto; display: flex; align-items: center; gap: 10px; font-size: 9px; color: var(--muted); }
.size-control input { width: 105px; accent-color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 28px 18px; }
.gallery-item { min-width: 0; }
.image-open { width: 100%; display: block; position: relative; padding: 0; border: 0; background: #e8e1d5; cursor: zoom-in; overflow: hidden; }
.image-open img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s ease, filter .5s; }
.gallery-medium .image-open { aspect-ratio: 4/5; }
.gallery-small .image-open { aspect-ratio: 1; }
.gallery-large .image-open { aspect-ratio: 3/4; }
.gallery-item:hover .image-open img { transform: scale(1.035); filter: brightness(.83); }
.zoom-hint {
    position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-30%);
    color: white; font-size: 10px; opacity: 0; transition: .3s;
}
.gallery-item:hover .zoom-hint { opacity: 1; transform: translate(-50%,-50%); }
.image-info { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; font-size: 9px; color: var(--muted); }
.image-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-info b { color: var(--accent); margin-left: 8px; font-weight: 500; }
.image-info a { flex: none; width: 25px; height: 25px; padding: 4px; }
.image-info svg { fill: none; stroke: currentColor; stroke-width: 1.5; }

.gallery.view-masonry { display: block; columns: var(--columns); column-gap: 16px; }
.gallery.view-masonry .gallery-item { break-inside: avoid; margin-bottom: 20px; }
.gallery.view-masonry .image-open { aspect-ratio: auto; }
.gallery.view-masonry .image-open img { height: auto; min-height: 180px; }
.gallery.view-list { display: flex; flex-direction: column; max-width: 900px; margin: auto; gap: 32px; }
.gallery.view-list .gallery-item { display: grid; grid-template-columns: minmax(220px, .8fr) 1fr; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.gallery.view-list .image-open { aspect-ratio: 16/10; }
.gallery.view-list .image-info { font-size: 12px; }

.book-view { display: none; }
.book-view.active { display: block; }
.book-stage { display: flex; align-items: center; justify-content: center; gap: 20px; min-height: 630px; }
.book {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    width: min(1000px, 78vw); height: min(650px, 52vw);
    padding: 18px; background: #352b25; border-radius: 8px 14px 14px 8px;
    box-shadow: 12px 25px 70px rgba(31,24,18,.28), inset 0 0 0 3px rgba(255,255,255,.06);
    perspective: 1600px;
}
.book::before { content: ""; position: absolute; inset: 8px -7px -7px 8px; background: #d8cfbf; z-index: -1; border-radius: 5px 12px 12px 5px; }
.book-page { background: #f6f1e8; padding: clamp(15px,2vw,30px); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.book-page.left { border-radius: 3px 0 0 3px; box-shadow: inset -18px 0 30px rgba(56,44,34,.08); }
.book-page.right { border-radius: 0 3px 3px 0; box-shadow: inset 18px 0 30px rgba(56,44,34,.08); }
.book-page img { width: 100%; height: calc(100% - 28px); object-fit: contain; }
.book-page span { text-align: center; font-size: 9px; margin-top: 12px; color: var(--muted); }
.book-spine { position: absolute; z-index: 4; width: 3px; top: 18px; bottom: 18px; left: 50%; background: linear-gradient(to right, rgba(0,0,0,.13), rgba(255,255,255,.5), rgba(0,0,0,.13)); }
.book-page.turning { animation: pageTurn .45s ease; transform-origin: center; }
@keyframes pageTurn { 0% { transform: rotateY(0); opacity: 1; } 50% { transform: rotateY(-60deg); opacity: .3; } 100% { transform: rotateY(0); opacity: 1; } }
.book-arrow, .lightbox-nav { border: 1px solid var(--line); background: var(--white); width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.book-counter { text-align: center; color: var(--muted); font-size: 10px; }

.lightbox[hidden] { display: none; }
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(19,18,16,.96); color: white;
    display: grid; grid-template-columns: 70px 1fr 70px; place-items: center;
}
.lightbox-top { position: absolute; top: 0; left: 0; right: 0; height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; z-index: 2; font-size: 10px; }
.lightbox-top > div { display: flex; align-items: center; gap: 24px; }
.lightbox-close { border: 0; background: none; color: white; cursor: pointer; font-size: 34px; font-weight: 200; }
.lightbox-download { border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 4px; }
.lightbox figure { width: 100%; height: calc(100vh - 110px); margin: 70px 0 20px; display: flex; flex-direction: column; align-items: center; }
.lightbox figure img { max-width: calc(100vw - 170px); max-height: calc(100% - 35px); object-fit: contain; box-shadow: 0 15px 60px rgba(0,0,0,.4); }
.lightbox figcaption { margin-top: 13px; font-size: 10px; color: rgba(255,255,255,.6); }
.lightbox-nav { background: transparent; color: white; border-color: rgba(255,255,255,.25); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; max-height: none; padding-top: 8vh; }
    .hero-art { height: 520px; margin-top: 20px; }
    .album-cards { gap: 45px 20px; }
    .gallery { --columns-mobile: min(var(--columns), 3); grid-template-columns: repeat(3, minmax(0,1fr)); }
    .gallery.view-masonry { columns: 3; }
    .book-stage { min-height: 500px; }
}
@media (max-width: 620px) {
    .site-header { height: 78px; padding: 0 20px; }
    .brand small { display: none; }
    .hero { padding: 60px 25px 70px; }
    .hero h1 { font-size: 57px; }
    .hero-art { height: 400px; width: calc(100% + 30px); margin-right: -15px; }
    .photo-1 { width: 58%; height: 55%; }
    .photo-2 { width: 53%; }
    .photo-3 { width: 48%; }
    .albums-section { padding: 75px 20px; }
    .album-cards { grid-template-columns: 1fr; }
    .album-cover { height: 105vw; max-height: 540px; }
    .site-footer { flex-direction: column; justify-content: center; gap: 10px; }
    .album-main { padding: 45px 14px 80px; }
    .album-title { padding-bottom: 45px; }
    .gallery-toolbar { top: 5px; gap: 7px; }
    .view-name { display: none; }
    .size-control span { display: none; }
    .size-control input { width: 65px; }
    .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px 8px; }
    .gallery.view-masonry { columns: 2; column-gap: 8px; }
    .gallery.view-list .gallery-item { grid-template-columns: 1fr; gap: 5px; }
    .book-stage { min-height: 350px; gap: 6px; }
    .book { width: calc(100vw - 88px); height: 66vw; padding: 7px; }
    .book-page { padding: 7px; }
    .book-page img { height: calc(100% - 15px); }
    .book-page span { font-size: 6px; margin-top: 4px; }
    .book-spine { top: 7px; bottom: 7px; }
    .book-arrow { width: 34px; height: 34px; flex: none; }
    .lightbox { grid-template-columns: 46px 1fr 46px; }
    .lightbox figure img { max-width: calc(100vw - 95px); }
    .lightbox-nav { width: 36px; height: 36px; }
    .lightbox-top { padding: 0 16px; }
}

