/* Boboo Studio — shared structure. Colors and faces come from the page theme file. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
[lang="en"] body, .site[data-lang="en"] { word-break: normal; line-height: 1.65; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
strong { font-weight: 650; }

.site { min-height: 100%; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.wrap-narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; padding: .5rem .9rem; background: var(--fg); color: var(--bg); border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* ---------- header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--fg); }
.wordmark-mark { width: 36px; height: 36px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--mark-ring, rgba(30, 38, 56, .14)); background: #cfe6f3; }
.wordmark-text { font-family: var(--font-brand, var(--font-body)); font-weight: 600; font-size: 1.06rem; letter-spacing: -.01em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 1.75rem); }
.site-nav ul { display: flex; gap: clamp(.75rem, 2.5vw, 1.75rem); }
.site-nav a { text-decoration: none; font-size: .95rem; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; font-size: .8rem !important; letter-spacing: .04em; }
@media (max-width: 520px) { .site-nav ul { display: none; } }

/* ---------- footer */
.site-footer { margin-top: clamp(4rem, 10vw, 8rem); border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; color: var(--muted); font-size: .92rem; }
.footer-row { display: grid; gap: 1.25rem 2rem; grid-template-columns: 1fr auto; align-items: start; }
.footer-brand .wordmark-text { color: var(--fg); }
.footer-brand p { margin-top: .25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.footer-copy { grid-column: 1 / -1; font-size: .85rem; }
@media (max-width: 640px) { .footer-row { grid-template-columns: 1fr; } }

/* ---------- shared components */
.ext { display: inline-block; width: .7em; height: .7em; margin-left: .3em; vertical-align: .05em; }

.copy-btn {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: .15rem .7rem; font-size: .8rem; color: var(--muted); cursor: pointer;
}
.copy-btn:hover { color: var(--fg); border-color: var(--fg); }
.copy-btn.is-done { color: var(--accent); border-color: var(--accent); }

/* framed screenshot / media with caption */
.shot { margin: 0; display: grid; gap: .7rem; min-width: 0; }
.shot-frame {
  position: relative; overflow: hidden; border-radius: var(--shot-radius, 12px);
  background: var(--shot-bg, #0e1116); box-shadow: var(--shot-shadow, 0 1px 2px rgba(0,0,0,.08), 0 12px 32px -14px rgba(0,0,0,.35));
}
.shot-frame img, .shot-frame video { width: 100%; }
.shot-zoom { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.shot figcaption { font-size: .88rem; line-height: 1.6; color: var(--muted); }
.shot-mobile { max-width: 280px; }
.shot-mobile .shot-frame { border-radius: 22px; }

/* click-to-play video */
.player { position: relative; overflow: hidden; border-radius: var(--shot-radius, 12px); background: #000; aspect-ratio: 16 / 9; max-width: 100%; }
.player video, .player img.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-btn {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45));
}
.player-btn span {
  display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem .7rem 1rem;
  border-radius: 999px; background: rgba(12, 10, 14, .62); color: #f4efe6; font-size: .95rem;
  border: 1px solid rgba(244, 239, 230, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.player-btn svg { width: 14px; height: 14px; }
.player.is-playing .player-btn, .player.is-playing .player-poster { display: none; }

/* placeholder for media not yet recorded */
.placeholder { position: relative; aspect-ratio: 16 / 9; border-radius: var(--shot-radius, 12px); overflow: hidden; background: #111; }
.placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; filter: grayscale(.4); }
.placeholder-label { position: absolute; left: 12px; bottom: 12px; padding: .25rem .6rem; border-radius: 6px; font-size: .78rem; background: rgba(0,0,0,.6); color: #f1ece3; border: 1px dashed rgba(241,236,227,.5); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px; background: rgba(8, 9, 12, .9); }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; width: auto; max-width: 100%; border-radius: 10px; }
.lightbox-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 16px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4); color: #fff; border-radius: 999px; padding: .3rem .9rem; cursor: pointer; }
