/* still — shared base for both sites.
   body.theme-light = still sound design, body.theme-dark = still productions */

:root {
  --gutter: clamp(16px, 4vw, 64px);
  --t: .6s;
}

body.theme-light {
  --bg: #ececea;
  --ink: #111;
  --ink-2: rgba(17,17,17,.62);
  --ink-3: rgba(17,17,17,.38);
  --line: rgba(17,17,17,.14);
  --panel: rgba(255,255,255,.04);
}

body.theme-dark {
  --bg: #0a0a0a;
  --ink: #ecebe6;
  --ink-2: rgba(236,235,230,.64);
  --ink-3: rgba(236,235,230,.36);
  --line: rgba(236,235,230,.14);
  --panel: rgba(255,255,255,.035);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p a, .text a { border-bottom: 1px solid var(--ink-3); transition: border-color .2s ease; }
p a:hover, .text a:hover { border-bottom-color: currentColor; }

::selection { background: var(--ink); color: var(--bg); }

/* no z-index here: it would make the page one layer, with the header in it, under the pictures */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}

/* ===== header ===== */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 6vh, 64px) 0 0;
}

.wordmark {
  font-weight: 800;
  font-size: clamp(24px, 2.7vw, 36px);
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2.2vw, 30px);
  font-size: 12.5px;
  letter-spacing: .01em;
}
.site-nav a { color: var(--ink-2); transition: color .2s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 700; }

.lang { color: var(--ink-3); }
.lang a { color: var(--ink-3); }
.lang a:hover { color: var(--ink); }
.lang [aria-current="true"] { color: var(--ink); }

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 18px; }
  .site-nav { flex-wrap: wrap; gap: 14px 18px; font-size: 13.5px; }
}

main { flex: 1; padding: clamp(40px, 8vh, 96px) 0 clamp(80px, 14vh, 160px); }

/* ===== footer ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 clamp(18px, 3.5vw, 42px);
  font-size: 12.5px;
  color: var(--ink-2);
}

.crosslink { transition: color .2s ease; }
.crosslink:hover { color: var(--ink); }
.crosslink .arrow { display: inline-block; transition: transform .3s ease; }
.crosslink:hover .arrow { transform: translateX(3px); }
.crosslink b { font-weight: 700; color: var(--ink); }

.contact-icons {
  display: flex;
  gap: 4px;
  opacity: .85;
  transition: opacity .6s ease;
}
.contact-icons.is-idle { opacity: 0; transition: opacity 3s linear; }
.contact-icons .ci {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: .75;
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, opacity .2s ease;
}
.contact-icons .ci:hover { transform: translateY(-1px); opacity: 1; }
.contact-icons .ci svg { width: 22px; height: 22px; }

.sound-toggle .off { display: none; }
.sound-toggle.is-off .on { display: none; }
.sound-toggle.is-off .off { display: inline; }

@media (max-width: 640px) {
  .site-footer { flex-direction: column-reverse; align-items: flex-start; }
  .contact-icons { margin-left: -10px; }
  .contact-icons.is-idle { opacity: .85; }
}

/* ===== shared type ===== */
.page-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1.2rem;
}

.text p { margin: 0 0 1.05em; max-width: 54ch; }

.muted { color: var(--ink-2); }

/* word clouds (home + filmography) */
@keyframes drift {
  0%   { transform: translate3d(0,0,0); }
  50%  { transform: translate3d(0,-4px,0); }
  100% { transform: translate3d(0,0,0); }
}

.sound-word {
  position: absolute;
  white-space: nowrap;
  font-size: clamp(14px, 1.2vw, 20px);
  letter-spacing: .01em;
  opacity: .2;
  transition: opacity .6s linear;
  animation: drift 10s ease-in-out infinite;
  will-change: transform, opacity;
}
.sound-cloud.is-placeholder .sound-word { opacity: .18; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  .sound-word { animation: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
