

:root {
  color-scheme: light dark;

  --bg-hero:        light-dark(#ffedb0, #1c130d);
  --bg-work:        light-dark(#ffedb0, #1c130d);
  --bg-about:       light-dark(#ffc98a, #2a1a10);
  --bg-contact:     light-dark(#f7a9c4, #301a12);
  --bg-footer:      light-dark(#e8497a, #ffcf5c);
  --text:           light-dark(#4a1942, #ffe9c7);
  --text-on-footer: light-dark(#ffedb0, #1c130d);
  --accent:         light-dark(#e8497a, #ffcf5c);
  --play-arrow:     light-dark(#ffedb0, #ffedb0);

  --font-serif: "Fredoka", "Helvetica Neue", Arial, sans-serif;
  --font-sans:  "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --h-weight: 700;
  --h-scale: .9;
  --h-tracking: -0.02em;

  --media-bg: #000;
  --rule: color-mix(in srgb, var(--text) 20%, transparent);
  --stars:
    radial-gradient(1.6px 1.6px at 24px 38px, color-mix(in srgb, var(--text) 85%, transparent), transparent 100%),
    radial-gradient(1px 1px at 88px 112px, color-mix(in srgb, var(--text) 45%, transparent), transparent 100%),
    radial-gradient(1.3px 1.3px at 152px 26px, color-mix(in srgb, var(--text) 65%, transparent), transparent 100%),
    radial-gradient(1px 1px at 214px 148px, color-mix(in srgb, var(--text) 50%, transparent), transparent 100%),
    radial-gradient(1.8px 1.8px at 284px 64px, color-mix(in srgb, var(--text) 80%, transparent), transparent 100%),
    radial-gradient(1.1px 1.1px at 348px 190px, color-mix(in srgb, var(--text) 55%, transparent), transparent 100%),
    radial-gradient(1.4px 1.4px at 46px 214px, color-mix(in srgb, var(--text) 70%, transparent), transparent 100%),
    radial-gradient(1px 1px at 120px 256px, color-mix(in srgb, var(--text) 40%, transparent), transparent 100%),
    radial-gradient(1.6px 1.6px at 196px 238px, color-mix(in srgb, var(--text) 75%, transparent), transparent 100%),
    radial-gradient(1px 1px at 256px 16px, color-mix(in srgb, var(--text) 50%, transparent), transparent 100%),
    radial-gradient(1.3px 1.3px at 332px 104px, color-mix(in srgb, var(--text) 60%, transparent), transparent 100%),
    radial-gradient(1px 1px at 8px 148px, color-mix(in srgb, var(--text) 45%, transparent), transparent 100%),
    radial-gradient(1.2px 1.2px at 364px 260px, color-mix(in srgb, var(--text) 55%, transparent), transparent 100%),
    radial-gradient(1px 1px at 72px 8px, color-mix(in srgb, var(--text) 40%, transparent), transparent 100%);

  --u: calc(100vw / 1562);
  --gap: 11px;
  --colw: calc((100vw - 8vw - 23 * var(--gap)) / 24);
  --pitch: calc(var(--colw) + var(--gap));

  --fs-body: clamp(13px, 1.024vw, 19px);
  --side: 4vw;          
  --hdr-compact: 72px;  
  --logo-ratio: 1.4576; 
}

:root[data-mode="light"] { color-scheme: light; }
:root[data-mode="dark"]  { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;   
}
body {
  position: relative;
  background: var(--bg-about);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 700; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: var(--h-weight);
  letter-spacing: var(--h-tracking);
  color: inherit;
}
h1 { font-size: calc((3.6vw + 1rem) * var(--h-scale));  line-height: 1.056; }   
h2 { font-size: calc((2.16vw + 1rem) * var(--h-scale)); line-height: 1.114; }   
h3 { font-size: calc((1.44vw + 1rem) * var(--h-scale)); line-height: 1.142; }   
h4 { font-size: calc((0.72vw + 1rem) * var(--h-scale)); line-height: 1.171; }   

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: calc(202 * var(--u));
  padding: 0 var(--side);
  transition: height .25s ease;
}
.logo { display: block; text-decoration: none; }

.logo__mark {
  --logo-h: calc(140 * var(--u));
  display: block;
  height: var(--logo-h);
  width: calc(var(--logo-h) * var(--logo-ratio));
  background-color: var(--text);
  -webkit-mask: url("../assets/logo.png") no-repeat left center;
  mask: url("../assets/logo.png") no-repeat left center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: height .25s ease, width .25s ease;
}

.site-header.is-scrolled {
  background: var(--bg-work);
  border-bottom-color: var(--rule);
}
.site-header.is-scrolled .site-header__inner { height: var(--hdr-compact); }
.site-header.is-scrolled .logo__mark { --logo-h: 44px; }

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.2vw, 2.6rem);
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.9vw, 2.4rem);
}

.header-utils {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 2.1rem);
}
.nav a {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.02vw, 18px);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease, opacity .18s ease;
}
.nav a:hover,
.nav a.is-active { border-bottom-color: currentColor; }

.lang {
  display: flex;
  align-items: center;
  gap: clamp(.45rem, .72vw, .85rem);
}
.lang__btn {
  font: inherit;
  font-family: var(--font-serif);
  font-size: clamp(12px, .92vw, 16px);
  letter-spacing: .04em;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 3px;
  cursor: pointer;
  opacity: .45;
  transition: opacity .18s ease, border-color .18s ease;
}
.lang__btn:hover { opacity: .8; }
.lang__btn.is-active { opacity: 1; border-bottom-color: currentColor; }
.lang__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; opacity: 1; }

.social { display: inline-flex; color: inherit; text-decoration: none; }
.social svg {
  width: clamp(18px, 1.28vw, 26px);
  height: clamp(18px, 1.28vw, 26px);
}
.social:hover { opacity: .65; }

.mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity .18s ease;
}
.mode-toggle svg {
  width: clamp(18px, 1.28vw, 26px);
  height: clamp(18px, 1.28vw, 26px);
}
.mode-toggle:hover { opacity: .65; }
.mode-toggle__moon { display: none; }
.mode-toggle.is-dark .mode-toggle__sun { display: none; }
.mode-toggle.is-dark .mode-toggle__moon { display: block; }

.sec { position: relative; width: 100%; }
.sec--hero    { background: var(--bg-hero);    height: calc(520 * var(--u)); }
.sec--work    { background: var(--bg-work);    height: calc(1808 * var(--u)); }
.sec--about   { background: var(--bg-about);   height: calc(1097 * var(--u)); }
.sec--contact { background: var(--bg-contact); height: calc(859 * var(--u)); }
.sec--footer  { background: var(--bg-footer);  height: calc(325 * var(--u)); color: var(--text-on-footer); }

.sec--hero, .sec--work, .sec--about, .sec--contact {
  background-repeat: repeat;
  background-size: 380px 280px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) .sec--hero,
  :root:not([data-mode="light"]) .sec--work,
  :root:not([data-mode="light"]) .sec--about,
  :root:not([data-mode="light"]) .sec--contact {
    background-image: var(--stars);
  }
}
:root[data-mode="dark"] .sec--hero,
:root[data-mode="dark"] .sec--work,
:root[data-mode="dark"] .sec--about,
:root[data-mode="dark"] .sec--contact {
  background-image: var(--stars);
}

.blk {
  position: absolute;
  left: calc(var(--side) + (var(--c) - 1) * var(--pitch));
  width: calc(var(--s) * var(--colw) + (var(--s) - 1) * var(--gap));
  top: calc(var(--y) * var(--u));
}
.txt { padding-top: calc(8 * var(--u)); }

.item, .about-media { display: contents; }

.hero   { text-align: center; }
.cap    { text-align: center; }
.vtitle { text-align: center; }
.vtitle h4 + h4 { margin-top: calc(31 * var(--u)); }

.media { background: var(--media-bg); overflow: hidden; }

.media--16x9 { aspect-ratio: 16 / 9; }
.media--9x16 { aspect-ratio: 9 / 16; }
.media iframe, .media video { width: 100%; height: 100%; border: 0; object-fit: cover; }

.yt__link { position: absolute; inset: 0; display: block; text-decoration: none; }
.yt__poster { width: 100%; height: 100%; object-fit: cover; }
.yt__play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 44px;
  border-radius: 10px;
  background: var(--accent);
  transition: transform .2s ease, opacity .2s ease;
}
.yt__play::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-40%, -50%);
  border-left: 15px solid var(--play-arrow);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.yt__link:hover .yt__play { transform: translate(-50%, -50%) scale(1.08); }

.vline {
  position: absolute;
  left: calc(773 * var(--u));
  top: calc(1197 * var(--u));
  height: calc(228 * var(--u));
  width: 1px;
  background: var(--text);
}

.hline { border: 0; height: 1px; background: var(--text); }
.about-text p + p { margin-top: 1em; }
.media--creative { aspect-ratio: 1080 / 1462; }
.media--photo    { aspect-ratio: 3 / 4; background: none; }
.media--photo img { width: 100%; height: 100%; object-fit: cover; }

.contact-bullet { list-style: disc; padding-left: 1.1em; }
.contact-bullet li { min-height: 1.5em; }
.contact-text p + p { margin-top: 1em; }

.copyable {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.copyable:hover { opacity: .7; }

.localtime {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
}

.tip {
  position: fixed;
  z-index: 60;
  background: var(--text);
  color: var(--bg-hero);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.35;
  padding: .35rem .65rem;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-2px);
  transition: opacity .15s ease, transform .15s ease;
}
.tip.is-on { opacity: 1; transform: translate(-50%, -100%) translateY(-9px); }

.foot-mail { text-align: right; }
.foot-mail a { text-decoration: none; }
.foot-mail a:hover { text-decoration: underline; }
.foot-social {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 3px;
}
.sec--footer .social svg { width: 25px; height: 25px; }

@media (max-width: 1279px) {
  :root {
    --fs-body: 16px;
    --side: 6vw;
  }

  .blk { position: static; width: auto; left: auto; top: auto; }
  .media { position: relative; }   
  .sec > *, .item, .about-media > * { min-width: 0; }
  .txt { padding-top: 0; }
  .item { display: flex; flex-direction: column; }
  .about-media { display: flex; }
  .vline { display: none; }

  h1 { font-size: calc(clamp(2.1rem, 6.2vw, 3.4rem) * var(--h-scale)); }
  h2 { font-size: calc(clamp(1.5rem, 4.4vw, 2.4rem) * var(--h-scale)); }
  h3 { font-size: calc(clamp(1.25rem, 3.2vw, 1.9rem) * var(--h-scale)); }
  h4 { font-size: calc(clamp(1.1rem, 2.6vw, 1.5rem) * var(--h-scale)); }

  .site-header__inner { height: auto; padding: 1.1rem var(--side); }
  .logo__mark { --logo-h: 4.2rem; }
  .site-header.is-scrolled .site-header__inner { height: auto; padding: .6rem var(--side); }
  .site-header.is-scrolled .logo__mark { --logo-h: 2.6rem; }
  .nav a { font-size: 15px; }
  .lang__btn { font-size: 14px; }
  .social svg { width: 21px; height: 21px; }
  .mode-toggle svg { width: 21px; height: 21px; }

  .sec { height: auto; padding: 0 var(--side); }
  .sec--hero    { padding-top: 9rem; padding-bottom: 2.5rem; }
  .sec--work    { padding-bottom: 5rem; }
  .sec--about   { padding-top: 3.5rem; padding-bottom: 5rem; }
  .sec--contact { padding-top: 4rem; padding-bottom: 5rem; }
  .sec--footer  { padding-top: 3rem; padding-bottom: 3rem; }

  .hero { max-width: 46rem; margin: 0 auto; }

  .sec--work {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 3.5%;
    row-gap: 3.5rem;
    align-items: start;
  }
  .item--wide { grid-column: span 2; }
  .item--tall { grid-column: span 1; }
  .vtitle { grid-column: 1 / -1; margin: 2rem 0 .5rem; }
  .vtitle h4 + h4 { margin-top: .8rem; }
  .cap { margin-top: 1rem; }

  .sec--about { display: flex; flex-direction: column; }
  .hline { order: 1; margin-bottom: 2.5rem; }
  .about-title { order: 2; margin-bottom: 2rem; }
  .about-media { order: 3; gap: 4%; align-items: flex-end; margin-bottom: 2.5rem; }
  .about-text { order: 4; max-width: 46rem; }
  .media--creative { flex: 0 1 48%; }
  .media--photo { flex: 0 1 40%; }

  .sec--contact { display: flex; flex-direction: column; }
  .contact-title { max-width: 12em; margin-bottom: 1.6rem; }
  .contact-bullet { margin: 1.5rem 0 2rem; }
  .contact-text { max-width: 40rem; }

  .sec--footer { display: flex; flex-direction: column; }
  .foot-mail { text-align: left; margin-top: .4rem; word-break: break-word; }
  .foot-social { justify-content: flex-start; margin-top: 2.5rem; }
}

@media (max-width: 860px) {
  .sec--work { grid-template-columns: repeat(2, 1fr); column-gap: 5%; }
  .item--wide { grid-column: span 2; }
  .about-media { gap: 5%; }
  .media--creative { flex: 0 1 53%; }
  .media--photo { flex: 0 1 44%; }
}

@media (max-width: 719px) {
  :root { --side: 7vw; }

  .site-header__inner { flex-wrap: wrap; row-gap: .5rem; }
  
  .header-right { width: 100%; order: 3; justify-content: space-between; flex-wrap: wrap; row-gap: .5rem; }
  .logo__mark { --logo-h: 3.6rem; }
  .site-header.is-scrolled .logo__mark { --logo-h: 2.2rem; }
  .nav { gap: 1.4rem; }
  .nav a { font-size: 14px; }
  .header-utils { gap: 1.1rem; }
  .lang { gap: .55rem; }
  .lang__btn { font-size: 13px; }

  .sec--hero { padding-top: 11rem; }
  .sec--work { row-gap: 2.8rem; }
  .about-media { gap: 6%; }
}

@media (max-width: 459px) {
  
  .nav { gap: .9rem; }
  .nav a { font-size: 13px; }
  .header-utils { gap: .8rem; }
  .lang { gap: .42rem; }
  .lang__btn { font-size: 12px; }

  .sec--work { grid-template-columns: 1fr; }
  .item--wide, .item--tall { grid-column: 1 / -1; }
  .item--tall .media { max-width: 300px; }
  .item--tall .cap { max-width: 300px; }
  .about-media { flex-direction: column; align-items: flex-start; }
  .media--creative { width: 80%; flex: none; }
  .media--photo { width: 66%; flex: none; margin-top: 1.2rem; }
}
