/* Devesh Digital Studio: the couple's eAlbum (client-login.php). The website's colours and type, made for turning
   the pages of the album: dark and quiet, so the pictures carry the page. */
:root {
  --ink: #0d0a08; --ink-2: #17120f; --ink-3: #201914; --ink-4: #2a211b;
  --cream: #fff5ea; --muted: rgba(255, 245, 234, .66); --line: rgba(255, 245, 234, .14);
  --saffron: #ff7a1a; --marigold: #ffb23e; --chilli: #e0401a; --red: #ff8a6b;
  --head: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--cream); font: 400 16px/1.6 var(--body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 10px; }
h1, h2 { font-family: var(--head); font-weight: 700; letter-spacing: -.025em; line-height: 1.02; margin: 0; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1440px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 13px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--marigold); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot { color: var(--saffron); }
.loading { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }

/* Buttons */
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--saffron); color: #1a0900; font: 700 16px/1 var(--head); white-space: nowrap; cursor: pointer; transition: background-color .2s; }
.pbtn:hover, .pbtn:focus-visible { background: #ff9142; }
.pbtn:disabled { opacity: .6; cursor: wait; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 245, 234, .3); background: rgba(13, 10, 8, .35); color: var(--cream); font: 600 14.5px/1 var(--body); white-space: nowrap; cursor: pointer; transition: border-color .2s, color .2s; }
.ghost-btn:hover, .ghost-btn:focus-visible { border-color: var(--saffron); color: var(--marigold); }
.ghost-btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.ibtn { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); color: var(--cream); cursor: pointer; transition: border-color .2s, color .2s; }
.ibtn:hover, .ibtn:focus-visible { border-color: var(--saffron); color: var(--marigold); }

/* ---------- Logging in ---------- */
.gate { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 110px var(--gutter) 80px; isolation: isolate; }
.gate-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 30% 20%, rgba(255, 122, 26, .22), transparent 55%), radial-gradient(ellipse at 80% 90%, rgba(224, 64, 26, .18), transparent 50%), url("../images/ealbum-1.jpg") center / cover; }
.gate-bg::after { content: ""; position: absolute; inset: 0; background: rgba(13, 10, 8, .74); backdrop-filter: blur(6px); }
.gate-logo { position: absolute; top: 24px; left: var(--gutter); }
.gate-logo img { height: 56px; width: auto; }
.gate-back { position: absolute; top: 34px; right: var(--gutter); display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; }
.gate-back:hover { color: var(--cream); }
.gate-card { width: min(440px, 100%); display: grid; gap: 16px; padding: clamp(24px, 5vw, 40px); border-radius: 28px; background: rgba(23, 18, 15, .88); border: 1px solid var(--line); box-shadow: 0 40px 80px -30px #000; }
.gate-card .eyebrow { margin: 0; }
.gate-card h1 { font-size: clamp(34px, 6vw, 44px); }
.gate-card .sub { margin: -4px 0 6px; color: var(--muted); }
.fld { display: grid; gap: 7px; }
.fld > span:first-child { font-weight: 600; font-size: 14px; }
.inp { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 16px; border-radius: 14px; border: 1px solid rgba(255, 245, 234, .2); background: var(--ink); transition: border-color .2s, box-shadow .2s; }
.inp:focus-within { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
.inp > .i { color: var(--muted); }
.inp input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font: 500 16px/1 var(--body); color: var(--cream); }
.peek { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.peek:hover { color: var(--cream); }
.msg { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 107, 74, .12); border: 1px solid rgba(255, 107, 74, .45); font-size: 14px; }
.gate-card .pbtn { width: 100%; margin-top: 4px; }
.help { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.help a { color: var(--marigold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- The album page ---------- */
.pv-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 10px 16px; background: var(--marigold); color: #1a0900; font-size: 14px; font-weight: 600; text-align: center; }
.pv-bar a { text-decoration: underline; text-underline-offset: 3px; }
.top { position: fixed; inset: 0 0 auto; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px var(--gutter); transition: background .3s, box-shadow .3s; }
.pv-bar + .top { top: 41px; }
.top.solid { background: rgba(13, 10, 8, .88); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.top-logo img { height: 46px; width: auto; }
.top-nav { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(13, 10, 8, .5); border: 1px solid var(--line); }
.top-nav a { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; }
.top-nav a:hover { background: var(--ink-3); color: var(--marigold); }
.top > :last-child { justify-self: end; }
@media (max-width: 640px) {
  .top { grid-template-columns: auto 1fr auto; }
  .top-logo img { height: 38px; }
  .top-nav { justify-self: center; }
  .top-nav a { padding: 7px 10px; font-size: 13.5px; }
  .top .ghost-btn span { display: none; }
  .top .ghost-btn { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 380px) { .top-nav a { padding: 7px 7px; } }

.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; padding: 140px var(--gutter) clamp(70px, 10vh, 120px); isolation: isolate; overflow: hidden; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; animation: drift 24s ease-out both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 10, 8, .55) 0%, rgba(13, 10, 8, .05) 30%, rgba(13, 10, 8, .35) 60%, var(--ink) 100%); }
.hero.plain::before { background: radial-gradient(ellipse at 20% 30%, rgba(255, 122, 26, .3), transparent 55%), radial-gradient(ellipse at 90% 80%, rgba(224, 64, 26, .2), transparent 50%), var(--ink); }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-in { width: min(1440px, 100%); margin-inline: auto; display: grid; justify-items: start; gap: 16px; }
.hero-in .eyebrow { margin: 0; }
.hero h1 { font-size: clamp(48px, 9vw, 128px); text-shadow: 0 6px 40px rgba(0, 0, 0, .45); overflow-wrap: anywhere; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; font-size: 17px; font-weight: 500; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .i { color: var(--marigold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; border-radius: 999px; background: rgba(13, 10, 8, .5); border: 1px solid rgba(255, 245, 234, .25); font-size: 14px; font-weight: 500; backdrop-filter: blur(4px); }
.hero-msg { max-width: 60ch; margin: 0; color: rgba(255, 245, 234, .85); font-size: 17px; white-space: pre-line; }
.hero .pbtn { margin-top: 10px; }
.hero-down { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 245, 234, .3); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-width: 640px) { .hero-down { display: none; } }

.sec { padding: clamp(56px, 9vw, 110px) 0; scroll-margin-top: 60px; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-h { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(24px, 4vw, 40px); }
.sec-h h2 { font-size: clamp(36px, 5.5vw, 68px); }
.sec-act { display: flex; flex-wrap: wrap; gap: 10px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 20px; }

/* The flip book */
.book-box { scroll-margin-top: 84px; }
/* A page turning on a phone swings out past the screen's edge. Cut it off at the edge: otherwise the phone lays the
   whole page out wider for a moment and the page jumps up. */
.book-sec { overflow: hidden; overflow: clip; }
.book-stage { position: relative; display: grid; place-items: center; padding: clamp(10px, 3vw, 30px) 0; }
.book-stage::before { content: ""; position: absolute; inset: 10% 5% 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(255, 178, 62, .14), transparent 65%); }
.book-wrap { width: 100%; margin-inline: auto; }
.book { margin-inline: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); }
.page { position: relative; background: #f4ede4; overflow: hidden; }
.leaf { width: 100%; height: 100%; background: #efe7dc no-repeat center / cover; }
.half-l .leaf { background-size: 200% 100%; background-position: left center; }
.half-r .leaf { background-size: 200% 100%; background-position: right center; }
/* Like a real book: the pages darken into the binding in the middle, and catch a little light at their outer edge */
.page::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.page.--left::after { background: linear-gradient(to left, rgba(0, 0, 0, .34), rgba(0, 0, 0, .12) 2.5%, rgba(0, 0, 0, .03) 7%, transparent 12%), linear-gradient(to right, rgba(255, 255, 255, .08), transparent 6%); }
.page.--right::after { background: linear-gradient(to right, rgba(0, 0, 0, .34), rgba(0, 0, 0, .12) 2.5%, rgba(0, 0, 0, .03) 7%, transparent 12%), linear-gradient(to left, rgba(255, 255, 255, .08), transparent 6%); }
/* The covers are stiff board */
.page[data-density="hard"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.ibtn.on { background: var(--saffron); border-color: var(--saffron); color: #1a0900; }
.hint .i { width: 16px; height: 16px; vertical-align: -3px; }
.book-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: min(760px, 100%); margin: 18px auto 0; }
.book-bar .sp { flex: 1; }
.bk-count { min-width: 130px; white-space: nowrap; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.hint { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
@media (max-width: 520px) { .book-bar .sp { display: none; } .book-bar { justify-content: center; gap: 6px; } .bk-count { min-width: 0; flex: 1; font-size: 14px; } .book-bar .ibtn { width: 42px; height: 42px; } }
/* Full screen (the browser's own, or the book filling the window where there's none, like on iPhone): the book and
   its buttons together */
.book-box.is-full { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 16px; background: var(--ink); }
.book-box:fullscreen { background: var(--ink); }
.book-box.is-full .book-stage { padding: 0; min-height: 0; }
.book-box.is-full .book-bar { margin: 0 auto; padding: 8px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); width: min(760px, 100%); }

/* Films */
.films { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 22px; }
.films.one { grid-template-columns: minmax(0, 1100px); justify-content: center; }
.film { margin: 0; display: grid; gap: 12px; }
.film video, .film iframe, .film-yt { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 20px; background: #000; overflow: hidden; }
.film-yt { position: relative; display: block; padding: 0; cursor: pointer; }
.film-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .5s; }
.film-yt:hover img { opacity: 1; transform: scale(1.03); }
.film-yt .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: var(--saffron); color: #1a0900; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: scale .2s; }
.film-yt:hover .play { scale: 1.08; }
.film-yt .play .i { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.film figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; }

.foot { padding: 40px 0 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.foot p { margin: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.foot b { color: var(--cream); }
.foot a { display: inline-flex; align-items: center; gap: 6px; }
.foot a:hover { color: var(--marigold); }

/* ---------- The large view ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 5, .97); display: grid; grid-template-rows: auto 1fr; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.lb-top .sp { flex: 1; }
.lb-count { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); padding-left: 6px; }
.lb .ibtn { background: rgba(23, 18, 15, .8); }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 0 clamp(8px, 6vw, 90px) 20px; overflow: hidden; touch-action: pan-y pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); object-fit: contain; border-radius: 6px; cursor: zoom-in; opacity: 0; transition: opacity .3s, transform .3s; user-select: none; -webkit-user-drag: none; }
.lb-stage img.in { opacity: 1; }
.lb.zoomed .lb-stage img { transform: scale(2.4); cursor: zoom-out; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(23, 18, 15, .8); cursor: pointer; }
.lb-nav:hover { border-color: var(--saffron); color: var(--marigold); }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
@media (max-width: 640px) { .lb-nav { top: auto; bottom: 18px; translate: none; } .lb-stage { padding-bottom: 86px; } .lb-stage img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); } .lb-nav.prev { left: calc(50% - 64px); } .lb-nav.next { right: calc(50% - 64px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img, .hero-down { animation: none; }
  .lb-stage img, .film-yt img { transition: none; }
}
