/* ==========================================================================
   asjunx — shared design system (cinematic)
   Letterboxed frame (black bars top and bottom), Newsreader titles that
   are written stroke by stroke (cine.js), Geist for reading, subtitle-style
   captions, light film grain. One button design everywhere: an outline pill
   ("See more") and a filled pill in the section colour (calls to action).
   Loaded on every page before the page's own <style>.
   ========================================================================== */

@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #050505;
  --ink: #f1ede6;
  --ink-2: rgba(241,237,230,0.64);
  --ink-3: rgba(241,237,230,0.46);
  --rule: rgba(241,237,230,0.12);
  --rule-2: rgba(241,237,230,0.3);
  --panel: #0c0c0c;

  --drone: #3fbf6b;
  --edits: #f2552f;
  --shots: #ea4f7c;
  --accent: #f2552f;
  --accent-rgb: 242,85,47;
  --red: #e5483a;
  --sec: var(--ink);           /* the current page's section colour */

  --serif: 'Newsreader', 'Times New Roman', serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: var(--serif);     /* older name used by page styles */
  --body: var(--sans);

  --bar: clamp(48px, 7vh, 64px);          /* letterbox bars */
  --bar-b: calc(var(--bar) * 0.66);
  --nav-h: var(--bar);
  --edge: max(clamp(18px, 4vw, 56px), calc((100vw - 2240px) / 2));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: var(--ease);
  --radius: 4px;

  /* Older names, still used by inline styles inside page scripts */
  --black: var(--bg); --white: var(--ink); --white-dim: var(--ink-2); --white-ghost: #3a3a3a;
  --surface: #0e0e0e; --surface-rgb: 14,14,14; --surface2: #111; --surface3: #171717;
  --border: var(--rule); --border2: var(--rule-2);
  --glow: var(--drone); --glow-rgb: 63,191,107;
  --radius-s: var(--radius); --radius-m: var(--radius); --radius-l: var(--radius); --radius-xl: var(--radius);
}
body[data-mesh="drone"] { --sec: var(--drone); }
body[data-mesh="edits"] { --sec: var(--edits); }
body[data-mesh="shots"] { --sec: var(--shots); }
body[data-mesh="neutral"], body[data-mesh="home"] { --sec: var(--accent); }
@media (max-width: 768px) { :root { --bar: 52px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; -webkit-text-size-adjust: 100%; background: var(--bg); }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  background: transparent; color: var(--ink); /* the page colour is on <html>, so the photo background can show */
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  min-height: 100vh; overflow-x: hidden; padding-bottom: var(--bar-b);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Film grain (cine.js) */
.grain { position: fixed; inset: -50%; z-index: 2000; pointer-events: none; opacity: 0.055; background-size: 160px; animation: grain 1.6s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0,0); } }

/* Page background (cine.js): featured drone photos, blurred and dimmed, slowly dissolving */
.page-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.page-bg img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover;
  filter: blur(18px) brightness(0.32) saturate(1.05); opacity: 0; transition: opacity 2.4s ease; }
.page-bg img.on { opacity: 1; }
/* Nothing on screen needs it (e.g. the home page's black opening covers it): skip drawing it */
.page-bg.off { visibility: hidden; }
.page-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(5,5,5,0) 0%, rgba(5,5,5,0.55) 100%); }
/* Home and Drone show the photo clearly through the blur instead of near-black */
body[data-mesh="drone"] .page-bg img, .home .page-bg img { filter: blur(18px) brightness(0.48) saturate(1.1); }
body[data-mesh="drone"] .page-bg::after, .home .page-bg::after { background: radial-gradient(ellipse at 50% 40%, rgba(5,5,5,0) 0%, rgba(5,5,5,0.4) 100%); }

/* Handwritten titles (cine.js): each letter's strokes are drawn, then filled */
.write-word { display: inline-block; overflow: visible; }
.write-word path.s { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.write-word path.f { fill: currentColor; fill-opacity: 0; stroke: none; }
.writing.written .write-word path.f { fill-opacity: 1; }
.writing.written .write-word path.s { stroke-opacity: 0; }

/* Viewfinder corners that trace themselves on (cine.js adds them to .yt-hero and [data-finder]) */
.finder { position: absolute; inset: 12px calc(var(--edge) * 0.45); pointer-events: none; z-index: 3; }
.finder svg { position: absolute; width: 22px; height: 22px; overflow: visible; }
.finder path { fill: none; stroke: var(--c, var(--sec)); stroke-width: 1.2; opacity: 0.75; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.3s var(--ease) 0.07s; }
.finder .tl { top: 0; left: 0; } .finder .tr { top: 0; right: 0; transform: scaleX(-1); }
.finder .bl { bottom: 0; left: 0; transform: scaleY(-1); } .finder .br { bottom: 0; right: 0; transform: scale(-1, -1); }
.traced .finder path, .scene.active .finder path { stroke-dashoffset: 0; }

/* ---------- Type helpers ---------- */
.t-display { font-family: var(--serif); font-weight: 400; line-height: 0.95; }
.t-label { font-size: 13px; color: var(--ink-2); }
.sq { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sec); flex-shrink: 0; }

/* ---------- Page switching + reveal ---------- */
.page { display: none; min-height: 100vh; }
.page.active { display: block; animation: pageIn 0.3s var(--ease); }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

.reveal, .rv { opacity: 0; filter: blur(8px); transform: translateY(16px); transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s var(--ease); }
.reveal.visible, .rv.in { opacity: 1; filter: none; transform: none; }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes titleIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Top bar (nav) ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--bar); padding: 0 var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: #000;
}
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.nav-logo-img { display: block; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.nav-logo-text { font-family: var(--serif); font-size: 26px; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav-link { position: relative; padding: 6px 0; font-size: 14px; color: var(--ink-2); text-decoration: none; background: none; border: none; cursor: pointer; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--c, var(--ink)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav-link:hover, .nav-link:focus-visible, .nav-link.active { color: var(--ink); }
.nav-link.active::after { transform: scaleX(1); }
.item-drone { --c: var(--drone); }
.item-anime { --c: var(--edits); }
.item-iphone { --c: var(--shots); }
.item-home, .item-about, .item-wallpapers { --c: var(--ink); }
.nav-cta { display: none; }

.hamburger-btn { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 10px; margin-right: -10px; background: transparent; border: none; cursor: pointer; }
.hamburger-btn span { display: block; width: 100%; height: 1px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.25s; }
.hamburger-btn span:nth-child(2) { width: 65%; margin-left: auto; }
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-menu {
  position: fixed; top: var(--bar); left: 0; right: 0; bottom: 0; z-index: 999;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 24px var(--edge) calc(var(--bar-b) + 24px);
  background: rgba(0,0,0,0.97); overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.mobile-nav-menu.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-nav-menu .nav-link {
  display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 6px 0;
  font-family: var(--serif); font-size: clamp(40px, 12vw, 64px); line-height: 1.05; color: var(--ink-2);
  opacity: 0; transform: translateY(14px); filter: blur(6px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease), filter 0.3s ease, color 0.3s;
}
.mobile-nav-menu .nav-link::before { content: ''; width: 0.16em; height: 0.16em; border-radius: 50%; background: var(--c); align-self: center; }
.mobile-nav-menu .nav-link::after { display: none; }
.mobile-nav-menu .nav-link.active, .mobile-nav-menu .nav-link:hover { color: var(--ink); }
.mobile-nav-menu.open .nav-link { opacity: 1; transform: none; filter: none; }
.mobile-nav-menu.open .nav-link:nth-child(2) { transition-delay: 0.06s; }
.mobile-nav-menu.open .nav-link:nth-child(3) { transition-delay: 0.12s; }
.mobile-nav-menu.open .nav-link:nth-child(4) { transition-delay: 0.18s; }
.mobile-nav-menu.open .nav-link:nth-child(5) { transition-delay: 0.24s; }
.mobile-nav-menu.open .nav-link:nth-child(6) { transition-delay: 0.3s; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger-btn { display: flex; }
}
@media (min-width: 769px) { .mobile-nav-menu { display: none; } }

/* ---------- Bottom bar + links drawer ---------- */
.site-footer-bar, .home-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #000; }
.scene-footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--bar-b); padding: 0 var(--edge); }
.scene-footer-copyright { font-size: 12px; color: var(--ink-3); }
.view-links-btn { min-height: 30px !important; padding: 0 14px !important; font-size: 12px !important; }

.links-drawer-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.links-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.links-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1101;
  background: #080808; border-top: 1px solid var(--rule); max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(100%); transition: transform 0.3s var(--ease);
}
.links-drawer-backdrop.open .links-drawer { transform: none; }
.links-drawer-handle { width: 36px; height: 3px; border-radius: 2px; background: var(--rule-2); margin: 10px auto 0; }
@media (min-width: 769px) { .links-drawer-handle { display: none; } }
.links-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--edge); border-bottom: 1px solid var(--rule); }
.links-drawer-title { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
.links-drawer-close { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; background: transparent; color: var(--ink); border: 1px solid var(--rule-2); border-radius: 50%; transition: background 0.3s, color 0.3s; }
.links-drawer-close:hover { background: var(--ink); color: var(--bg); }
.site-footer { padding: 0; }
.footer-inner { padding: 26px var(--edge) 30px; }
.footer-links-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.footer-col-title { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink); padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.footer-legal { display: flex; flex-direction: column; gap: 9px; }
.footer-legal a { width: fit-content; font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color 0.25s; }
.footer-legal a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.footer-logo { font-family: var(--serif); font-size: clamp(64px, 12vw, 160px); line-height: 0.8; color: var(--ink); }
.footer-meta { text-align: right; font-size: 12px; color: var(--ink-3); }
.footer-text { color: var(--ink-2); }
.footer-version { margin-top: 4px; font-variant-numeric: tabular-nums; }
.footer-version:empty { display: none; }
@media (max-width: 768px) { .footer-links-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .footer-links-row { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; align-items: flex-start; } .footer-meta { text-align: left; } }

/* ==========================================================================
   Buttons — one design across the whole site
   .btn                → outline pill ("See more", secondary actions)
   .btn.cta            → filled pill in the section colour (call to action)
   Older class names map onto the same two looks.
   ========================================================================== */
.btn, .btn-primary, .btn-ghost, .watch-btn, .download-btn, .cta-btn, .pcwallpaper-promo-btn, .see-all, .gdrive-btn, .view-links-btn, .url-copy-btn, .step-link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  color: var(--ink); background: transparent; border: 1px solid var(--rule-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s, gap 0.3s var(--ease);
}
.btn::after, .btn-ghost::after, .see-all::after, .cta-btn::after, .btn-primary::after, .pcwallpaper-promo-btn::after, .watch-btn::after { content: '→'; transition: transform 0.3s var(--ease); }
.btn:hover, .btn-ghost:hover, .see-all:hover, .gdrive-btn:hover, .view-links-btn:hover, .url-copy-btn:hover, .step-link-btn.ghost:hover { border-color: var(--ink); gap: 12px; }
.btn.cta, .btn-primary, .watch-btn, .download-btn, .cta-btn, .pcwallpaper-promo-btn, .step-link-btn:not(.ghost) {
  color: #0a0a0a; background: var(--c, var(--sec)); border-color: var(--c, var(--sec)); font-weight: 600;
}
.btn.cta:hover, .btn-primary:hover, .watch-btn:hover, .download-btn:hover, .cta-btn:hover, .pcwallpaper-promo-btn:hover, .step-link-btn:not(.ghost):hover { background: var(--ink); border-color: var(--ink); color: #0a0a0a; gap: 12px; }
.btn.ext::after, .cta-btn.ext::after { content: '↗'; }
.btn.no-arrow::after, .view-links-btn::after, .gdrive-btn::after, .download-btn::after { content: none; }
.btn-green { --c: var(--drone); } .btn-orange { --c: var(--edits); } .btn-pink { --c: var(--shots); }
.btn svg, .watch-btn svg, .download-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.url-copy-btn.copied { color: #0a0a0a; background: var(--drone); border-color: var(--drone); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ==========================================================================
   Gallery pages (Drone, Edits, Shots)
   ========================================================================== */
#page-drone, #page-anime, #page-iphone, #page-allphotos, #page-allwallpapers, #page-alliphone, #page-detail { padding-top: var(--bar); }

/* Masthead: a title card */
.yt-hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(62vh, 620px); padding: clamp(48px, 10vh, 110px) var(--edge) clamp(36px, 7vh, 72px); overflow: hidden; }
.yt-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 20% 100%, color-mix(in srgb, var(--sec) 14%, transparent), transparent 60%); }
.yt-hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); animation: fadeUp 0.3s var(--ease) both; }
.yt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: yt-blink 1.6s steps(1) infinite; }
@keyframes yt-blink { 50% { opacity: 0.2; } }
.yt-hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, min(12vw, 20vh), 190px); line-height: 0.92; letter-spacing: -0.01em; color: var(--ink); margin-bottom: clamp(12px, 2.4vh, 22px); }
.yt-hero-sub { max-width: 46ch; font-size: clamp(15px, 1.2vw, 17px); color: var(--ink-2); animation: fadeUp 0.3s var(--ease) 0.11s both; }
.hero-drone-icon { position: absolute; top: clamp(48px, 10vh, 110px); right: calc(var(--edge) + 20px); width: clamp(56px, 6vw, 88px); height: auto; color: var(--sec); opacity: 0.8; pointer-events: none; animation: fadeUp 0.3s var(--ease) 0.18s both; }
@media (max-width: 900px) { .hero-drone-icon { display: none; } }

/* Sections */
.section { padding: clamp(56px, 10vh, 110px) var(--edge) clamp(24px, 4vh, 40px); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(20px, 3vh, 30px); }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.6vw, 84px); line-height: 0.95; letter-spacing: -0.01em; color: var(--ink); }
.section-subtitle { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.section-divider { display: none; }
@media (max-width: 768px) { .section-header { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* Subtitle-style captions */
.caption-line { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.2; color: var(--ink); }
.caption-meta { margin-top: 3px; font-size: 12px; color: var(--ink-3); }

/* Horizontal rows */
.section .scroll-row-wrap { margin-left: calc(-1 * var(--edge)); margin-right: calc(-1 * var(--edge)); }
.scroll-row-wrap { position: relative; overflow: hidden; }
.scroll-row { display: flex; gap: clamp(10px, 1.2vw, 18px); overflow-x: auto; scrollbar-width: none; padding: 4px var(--edge) 16px; scroll-snap-type: x mandatory; scroll-padding: 0 var(--edge); }
.scroll-row::-webkit-scrollbar { display: none; }

.photo-card, .wallpaper-card, .iphone-card { flex-shrink: 0; position: relative; overflow: hidden; cursor: pointer; scroll-snap-align: start; background: var(--surface2); border-radius: var(--radius); }
.photo-card { width: clamp(300px, 36vw, 560px); aspect-ratio: 2.39 / 1; }
.wallpaper-card { width: clamp(140px, 13vw, 190px); aspect-ratio: 9/16; }
.photo-card img, .wallpaper-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s var(--ease) !important; }
.photo-card:hover img, .wallpaper-card:hover img { transform: scale(1.04); }
.photo-card-overlay, .wallpaper-card-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; padding: 12px 14px;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.75) 100%);
  opacity: 0; transition: opacity 0.3s ease;
}
.photo-card:hover .photo-card-overlay, .wallpaper-card:hover .wallpaper-card-overlay { opacity: 1; }
.photo-card-title, .wallpaper-card-title { font-family: var(--serif); font-style: italic; font-size: 18px; font-weight: 400; line-height: 1.2; color: var(--ink); text-shadow: 0 1px 10px rgba(0,0,0,0.8); }
.wallpaper-card-title { font-size: 15px; }

/* Drone photos sit in a raised border, like a mounted print lifting off the page.
   The mat is a real border (not padding), so the card's own clipping stops at
   the inner edge of the mat and a zooming photo never spills over it. */
body[data-mesh="drone"] .photo-card, body[data-mesh="drone"] .wallpaper-card,
body[data-mesh="drone"] .pgf-card, body[data-mesh="drone"] .wgf-card,
body[data-mesh="drone"] .detail-image-wrap, body[data-mesh="drone"] .wallpaper-detail-image, .mount {
  border: clamp(5px, 0.5vw, 8px) solid #151515; border-radius: 6px; background: #151515;
  box-shadow: 0 0 0 1px rgba(241,237,230,0.1), 0 22px 44px -16px rgba(0,0,0,0.85);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
body[data-mesh="drone"] .photo-card img, body[data-mesh="drone"] .wallpaper-card img,
body[data-mesh="drone"] .pgf-card img, body[data-mesh="drone"] .wgf-card img,
body[data-mesh="drone"] .detail-image-wrap img, body[data-mesh="drone"] .wallpaper-detail-image img, .mount img { border-radius: 2px; }
body[data-mesh="drone"] .photo-card-overlay, body[data-mesh="drone"] .wallpaper-card-overlay,
body[data-mesh="drone"] .pgf-card-overlay, body[data-mesh="drone"] .wgf-card-overlay { inset: 0; border-radius: 2px; }
body[data-mesh="drone"] .photo-card:hover, body[data-mesh="drone"] .wallpaper-card:hover,
body[data-mesh="drone"] .pgf-card:hover, body[data-mesh="drone"] .wgf-card:hover, a:hover > .mount {
  transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(241,237,230,0.14), 0 32px 56px -18px rgba(0,0,0,0.9);
}
body[data-mesh="drone"] .scroll-row { padding-top: 12px; padding-bottom: 24px; }

/* Shots: photo + caption cards */
.iphone-card { display: flex; flex-direction: column; background: transparent; overflow: visible; border-radius: 0; }
.iphone-card-photo { height: clamp(320px, 50vh, 480px); overflow: hidden; border-radius: var(--radius); background: var(--surface2); }
.iphone-card-photo img { height: 100%; width: auto; aspect-ratio: auto 3 / 4; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.iphone-card:hover .iphone-card-photo img { transform: scale(1.03); }
.iphone-card-info { width: 0; min-width: 100%; padding: 10px 2px; text-align: center; }
.iphone-card-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; line-height: 1.2; color: var(--ink); }

/* Empty / loading states */
.content-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 140px; padding: 40px 24px; text-align: center; color: var(--ink-2); }
.content-empty-title { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.content-empty-desc { font-size: 14px; color: var(--ink-2); max-width: 360px; }
.loading-pulse { display: inline-block; animation: loading-pulse-fade 1.6s ease-in-out infinite; }
@keyframes loading-pulse-fade { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* Promo band */
.pcwallpaper-promo {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  margin: clamp(24px, 5vh, 56px) var(--edge); padding: 24px clamp(20px, 3vw, 36px);
  border: 1px solid var(--rule); border-radius: 12px; background: rgba(9,9,9,0.7);
  transition: border-color 0.3s;
}
.pcwallpaper-promo:hover { border-color: var(--rule-2); }
.pcwallpaper-promo-btn::before { content: ''; position: absolute; inset: 0; }
.pcwallpaper-promo-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--sec); border: 1px solid var(--rule-2); border-radius: 50%; }
.pcwallpaper-promo-text { min-width: 0; }
.pcwallpaper-promo-title { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--ink); margin-bottom: 6px; }
.pcwallpaper-promo-sub { font-size: 14px; color: var(--ink-2); }
@media (max-width: 768px) {
  .pcwallpaper-promo { grid-template-columns: auto 1fr; }
  .pcwallpaper-promo-btn { grid-column: 1 / -1; width: 100%; }
}

/* Featured video */
.featured-video-section { padding: clamp(48px, 9vh, 96px) var(--edge) 0; }
.featured-label { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-2); }
.featured-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sec); }
.featured-video-card[style*="380px"] { grid-template-columns: minmax(0, 1fr) minmax(280px, 400px) !important; }
.featured-video-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: clamp(20px, 3vw, 40px); padding-bottom: clamp(16px, 3vh, 24px); cursor: pointer; }
.featured-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface2); border-radius: var(--radius); }
.featured-thumb img { transition: transform 0.3s var(--ease); }
.featured-video-card:hover .featured-thumb img { transform: scale(1.02); }
.featured-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.play-btn, .video-card-play { display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); background: rgba(0,0,0,0.35); transition: transform 0.3s var(--ease), background 0.3s; }
.play-btn { width: 68px; height: 68px; }
.play-btn svg { width: 22px; height: 22px; margin-left: 3px; }
.play-btn svg path, .video-card-play svg path { fill: #fff; }
.featured-video-card:hover .play-btn, .video-card:hover .video-card-play { transform: scale(1.08); background: rgba(0,0,0,0.55); }
.featured-video-info { display: flex; flex-direction: column; justify-content: flex-end; gap: 20px; }
.featured-video-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 60px); line-height: 1; color: var(--ink); }
.watch-btn { width: fit-content; }

/* Video grid */
.video-grid-section { padding: clamp(48px, 9vh, 96px) var(--edge) 40px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 28px 16px; }
.video-card { cursor: pointer; }
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 10px; background: var(--surface2); border-radius: var(--radius); }
.video-thumb img { transition: transform 0.3s var(--ease); }
.video-card:hover .video-thumb img { transform: scale(1.03); }
.video-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.video-card-play { width: 46px; height: 46px; }
.video-card-play svg { width: 15px; height: 15px; margin-left: 2px; }
.video-card-title { font-family: var(--serif); font-style: italic; font-size: 18px; font-weight: 400; line-height: 1.25; color: var(--ink); margin-bottom: 4px; text-align: center; }
.video-card-meta { display: flex; justify-content: center; gap: 12px; font-size: 12px; color: var(--ink-3); }
.video-card-meta span[style] { color: var(--sec) !important; }

/* Detail page */
.detail-back { display: inline-flex; align-items: center; gap: 10px; margin: 20px var(--edge); min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule-2); font-size: 14px; color: var(--ink); background: none; cursor: pointer; transition: border-color 0.3s, gap 0.3s var(--ease); }
.detail-back::before { content: '←'; }
.detail-back:hover { border-color: var(--ink); gap: 14px; }
.detail-container { max-width: 1180px; margin: 0 auto; padding: 0 var(--edge) 48px; }
.detail-image-wrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 28px; background: var(--surface2); border-radius: var(--radius); animation: fadeUp 0.3s var(--ease) both; }
.detail-meta-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; margin-bottom: 20px; }
.detail-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.4vw, 84px); line-height: 0.98; color: var(--ink); margin-bottom: 12px; }
.detail-location { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--sec); }
.detail-location svg { width: 12px; height: 12px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.detail-tag { font-size: 12px; color: var(--ink-2); border: 1px solid var(--rule-2); padding: 5px 12px; border-radius: 999px; }
.detail-desc-wrap { border-top: 1px solid var(--rule); padding-top: 22px; margin-bottom: 32px; }
.detail-desc-label { margin-bottom: 10px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-2); }
.detail-desc-text { max-width: 62ch; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.detail-desc-empty { font-size: 14px; color: var(--ink-3); }
.wallpaper-detail-layout, .iphone-detail-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: 40px; }
.wallpaper-detail-image, .iphone-detail-image { position: relative; width: 300px; aspect-ratio: 9/16; overflow: hidden; background: var(--surface2); border-radius: var(--radius); animation: fadeUp 0.3s var(--ease) both; }
.wallpaper-detail-content, .iphone-detail-content { display: flex; flex-direction: column; padding-top: 4px; }
.iphone-detail-image { aspect-ratio: auto; height: auto; }
.iphone-detail-image img { height: auto !important; }
.download-area { display: flex; align-items: center; gap: 20px; }
.download-icon { width: 16px; height: 16px; }
.download-info { font-size: 13px; color: var(--ink-2); }
@media (max-width: 768px) {
  .detail-meta-row { flex-direction: column; gap: 16px; }
  .wallpaper-detail-layout, .iphone-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .wallpaper-detail-image, .iphone-detail-image { width: 100%; max-width: 260px; }
  .download-area { flex-direction: column; align-items: stretch; gap: 12px; }
  .download-btn { width: 100%; }
}

/* Full grid pages */
.grid-page-header {
  position: sticky; top: var(--bar); z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 64px; padding: 8px var(--edge); background: rgba(5,5,5,0.82); border-bottom: 1px solid var(--rule); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.grid-back-btn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule-2); font-size: 14px; color: var(--ink); background: none; cursor: pointer; transition: border-color 0.3s; }
.grid-back-btn:hover { border-color: var(--ink); }
.grid-page-title { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); text-align: center; }
.gdrive-btn { justify-self: end; }

.filter-bar { display: flex; flex-direction: column; gap: 12px; padding: 20px var(--edge) 6px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-row-label { min-width: 70px; margin-right: 6px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); }
.filter-chip { font-family: var(--sans); font-size: 13px; font-weight: 500; white-space: nowrap; min-height: 34px; padding: 0 14px; color: var(--ink-2); background: transparent; border: 1px solid var(--rule-2); border-radius: 999px; cursor: pointer; transition: color 0.25s, border-color 0.25s, background 0.25s; }
.filter-chip:hover { color: var(--ink); border-color: var(--ink); }
.filter-chip.active { color: #0a0a0a; background: var(--sec); border-color: var(--sec); }

.photo-grid-full, .wallpaper-grid-full { display: grid; gap: 12px; padding: 16px var(--edge) 48px; }
.photo-grid-full { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.wallpaper-grid-full { grid-template-columns: repeat(auto-fill, minmax(min(170px, 45%), 1fr)); }
.pgf-card, .wgf-card { position: relative; overflow: hidden; cursor: pointer; background: var(--surface2); border-radius: var(--radius); animation: fadeUp 0.3s var(--ease) both; }
.pgf-card { aspect-ratio: 16/9; }
.wgf-card { aspect-ratio: 9/16; }
.pgf-card img, .wgf-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.pgf-card:hover img, .wgf-card:hover img { transform: scale(1.04); }
.pgf-card-overlay, .wgf-card-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 12px; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.75) 100%); opacity: 0; transition: opacity 0.3s ease; }
.pgf-card:hover .pgf-card-overlay, .wgf-card:hover .wgf-card-overlay { opacity: 1; }
.pgf-card-title, .wgf-card-title { font-family: var(--serif); font-style: italic; font-size: 17px; font-weight: 400; color: var(--ink); text-shadow: 0 1px 10px rgba(0,0,0,0.8); }

.iphone-grid-full { columns: 4 220px; column-gap: 12px; padding: 16px var(--edge) 48px; }
.igf-card { display: block; break-inside: avoid; margin-bottom: 16px; cursor: pointer; animation: fadeUp 0.3s var(--ease) both; }
.igf-card-photo { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface2); }
.igf-card-photo img { width: 100%; height: auto; aspect-ratio: auto 3 / 4; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.igf-card:hover .igf-card-photo img { transform: scale(1.03); }
.igf-card-info { padding: 8px 2px 0; text-align: center; }
.igf-card-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 18px; line-height: 1.2; color: var(--ink); }

@media (max-width: 768px) {
  body { font-size: 14px; }
  .photo-card { width: 86vw; max-width: 420px; aspect-ratio: 16 / 9; }
  .wallpaper-card { width: 40vw; max-width: 170px; }
  .photo-card-overlay, .wallpaper-card-overlay, .pgf-card-overlay, .wgf-card-overlay { opacity: 1; }
  .iphone-card-photo { height: clamp(300px, 54vh, 440px); }
  .featured-video-card, .featured-video-card[style*="380px"] { grid-template-columns: 1fr !important; }
  .watch-btn { width: 100%; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 22px 10px; }
  .video-card-title { font-size: 16px; }
  .grid-page-header { grid-template-columns: auto 1fr auto; gap: 8px; }
  .grid-page-title { font-size: 26px; }
  .gdrive-btn { padding: 0 12px; font-size: 13px; }
  .photo-grid-full { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 8px; }
  .wallpaper-grid-full { gap: 8px; }
  .iphone-grid-full { columns: 2; column-gap: 8px; }
  .igf-card-title { font-size: 16px; }
}

/* ==========================================================================
   Devices: touch screens, short (landscape) screens, reduced motion
   ========================================================================== */
@media (hover: none) {
  .photo-card-overlay, .wallpaper-card-overlay, .pgf-card-overlay, .wgf-card-overlay { opacity: 1; }
  .photo-card:hover img, .wallpaper-card:hover img, .pgf-card:hover img, .wgf-card:hover img,
  .iphone-card:hover .iphone-card-photo img, .igf-card:hover .igf-card-photo img { transform: none; }
}
@media (pointer: coarse) {
  .filter-chip { min-height: 40px; }
  .footer-legal { gap: 0; }
  .footer-legal a { display: block; padding: 11px 0; }
  .btn, .btn-primary, .btn-ghost, .watch-btn, .download-btn, .cta-btn, .pcwallpaper-promo-btn, .see-all { min-height: 48px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --bar: 40px; }
  .yt-hero { min-height: 0; padding-top: 28px; padding-bottom: 24px; }
  .section { padding-top: 36px; }
  .mobile-nav-menu .nav-link { font-size: clamp(28px, 10vh, 44px); }
  .links-drawer { max-height: 92vh; }
}
/* ---------- Increased contrast ----------
   For visitors who turn on "Increase contrast" (macOS/iOS) or a high-contrast
   setting (Windows, Android): brighter secondary text and lines, no grain or
   soft blurs, a darker photo backdrop, and solid outlines on buttons. */
@media (prefers-contrast: more) {
  :root {
    --ink: #ffffff;
    --ink-2: rgba(255,255,255,0.9);
    --ink-3: rgba(255,255,255,0.78);
    --rule: rgba(255,255,255,0.4);
    --rule-2: rgba(255,255,255,0.75);
  }
  .grain { display: none; }
  .page-bg img { filter: blur(18px) brightness(0.18) saturate(0.9); }
  .reveal, .rv { filter: none !important; }
  .btn, .btn-ghost, .see-all, .gdrive-btn, .view-links-btn, .filter-chip, .detail-back, .grid-back-btn { border-color: var(--ink); }
  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  a { text-decoration-thickness: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .reveal, .rv { opacity: 1; filter: none; transform: none; }
  .grain { animation: none; }
}
